GS1-128 barcode parsing

N Neelam Singh 2 years 11 months ago
335 1 0

Scanner Model :- Motorola- DS4208-HC
We need to parse the GS1-128 barcode. We know they are going to use GTIN(01), lot number(10), Expiration date(17), serial number (21). Input String:- (01)07612345678900(17)100503(10)AC3453G3(21)455777
The problem is that barcode reader outputs a string, the format is like this:
01076123456789001710050310AC3453G321455777
Since there is not a separator and both serial number and lot number are a variable length according to GS1 standard, we have trouble to identify the segments.
There should be a FNC1 character at the end of a variable-length field that is not filled to maximum; so that FNC1 will appear between the G3 and the 21. what I have read is NC1 is invisible to humans but can be detected by scanners and will be reproduced in the string reported by the scanner. Simply send the string directly to a text file and examine the text with a hex reader. The FNC1 should be obvious. But we are still not able to read FNC1 in the reader.

Please register or login to post a reply

1 Replies

L Larry Molter

Neelam, when you look at the hex output you should see a Group Separator char(29) 0x1D at the end of every variable-length segment. I, too, was perplexed because when I displayed the output, there seemed to be no separator character. Upon further inspection there was the character after every variable-length field.

CONTACT
Can’t find what you’re looking for?