Developer Portal Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    Sending GTL label content to Nexeed MatControl

    Sending GTL label content to Nexeed MatControl

    vkadoun
    New Poster

    Hello,

    we try to implement Nexeed MatControl module and GTL labels (apart from common implementation with MatLabels). The problem is presence of special control ASCII characters in GTL label,  when sending the whole label content to MES:

    vkadoun_0-1697718230862.png

     

    As you can see, Cognex scanner sends the control characters as $1E or $1D  but MatControl for some reason, needs data as: &#x1E or &#x1D .

    We tried to replace the dolar characters with the required sequence, it looks good in PLC string buffer. But, when we send the data to MES (as a STRING identifier variable), it is received incorrectly, with four additional characters after every ampersand: amp;  This, of course, renders the whole string unrecognizable for MES.

    Is there some solution, how to send charecters like & or > to MES with DDL communication over OpConXML format? I guess the hash sign is not a problem.

    Thank you

     

    6 REPLIES 6

    Düscha
    New Contributor

    you using the function for replace character for MAT label from the NexeedScanner?

    Unit.ParCmd.Read.ReplaceCtrlChar := true;

    No, we don't use that functionality. Thanks for the hint, we'll try it next week. Nevertheless, the documentation states, that it encloses ASCII number between two hashes, so it is not what MatControl wants:

    vkadoun_0-1697799210010.png

     

    nexidator
    Community Moderator
    Community Moderator

    The way ReplaceCtrlChar works was actually introduced in coordination with MatControl in order to avoid the XML escape sequence problem you are describing. The source code documentation is not exactly correct, though. Actually, the characters are replaced with [#n#] where n is the decimal value of the byte, either one or two digits.

    Hello Nexidator,

    we tried the ReplaceCtrlChar function yesterday, the answer is yes and no. Yes, it is behaving like you said, and no, the MatControl still doesn't accept that.

    [)>[#30#]06[#29#]12PGTL3[#29#]9K11[#29#]1JUN33149511912766247[#29#]14D20210418[#29#]16D20200316

    vkadoun_0-1698129806165.png

    So, if there is no other option how to send the control ASCII characters directly, would it be possible to replace the chars in the scanned string in PLC and send it then to MES?

    How to properly encode characters in DDL OpConXML event, that MES recieves exactly this:     ? I believe only the ampersand is problem.

    Thanks

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist