drbitboy
Lifetime Supporting Member
SUB Print.ST16[30].Data[1] COGNEX:I.Result[0] diff
EQU diff 48 SUB Print.ST16[30].Data[2] COGNEX:I.Result[1] diff
EQU diff 48 SUB Print.ST16[31].Data[1] COGNEX:I.Result[2] diff
EQU diff 48 SUB Print.ST16[31].Data[2] COGNEX:I.Result[3] diff
EQU diff 48 OTE BarcodeMatches
Caveats/Assumptions
- diff is a SINT tag
- BarcodeMatches is a Boolean, with a value of True if the barcode matches the Print.ST16[30]+Print.ST16[31] pair.
- Print.ST16 is an array of strings
- So Print.ST16[030] is not 10
- but is '10' i.e.
- a string
- Print.ST16[30].LEN is 2
- Print.ST16[30].DATA[1] is 49 (SINT) and '1' (ASCII character)
- Print.ST16[30].DATA[2] is 48 (SINT) and '0' (ASCII character)
- but is '10' i.e.
- So Print.ST16[030] is not 10
- COGNEX:I.Result is an array of SINTs, with integer values 0 though 9, and not ASCII characters, where the SINT value 1 represents the ASCII character '1' (SINT 49)
Last edited: