What is the value of FNC1 for GS1 DataBar (RSS 14 Expanded)? - barcode

I am creating a GS1 DataBar code in ZPL and I can't find a way to encode FNC1 character to terminate variable length GS1 Application identifiers (GS1 AI). To be honest, it is not a necessity. GS1 DataBar is mostly used for fresh foods and other groceries, and so far I noticed only one variable length GS1 AI (10 - batch/lot) to be used regularly. Though I haven't done any research, so maybe I am wrong. Nevertheless, it came to my mind if it is possible in ZPL to insert FNC1 character. In other programming languages it is possible to include it, but I had no luck with ZPL. It seems, that GS1 DataBar does not work well with hex commands. When I used hex Group separator [GS] _1D it didn't even rendered the code. Other FNC1 characters like _1 from GS1 DM or >8 from GS1-128 do not work, as expected.
I found this answer on Zebra support, but it did not rendered on Labelary ZPL viewer, so I am not sure if it works. I tried including the # character directly and with hex character, but with no success.
My ZPL code:
^XA
^FO100,100^BRN,6,4,,,6
^FD010858000000000931030001251722022210ABC123^FS
^XZ
What I wonder is how to include for example serial number AI(21) after batch AI(10) at the end of the code.

Related

Zebra ZPL Code 128 SSCC encodes the escape characters also

I need to print a SSCC Code 128 barcode using Zebra ZPL. My problem is that the escape characters used are also encoded in the barcode, which should not happen.
Here is the code:
^FO50,960^BY3
^BCN,180,N,N,N,A
^FD>;>800{sscc}^FS
The sequence >;>8, which is the escape / control sequence, gets encoded in the barcode. So when I read the barcode with a scanner, I get: >;>800xxxxxx....
What am I missing here?
Reposting this as an answer. You are using Automatic mode (the A at the end of the ^BC command). Automatic mode disables escape sequences since it applies its own shift/latch logic. Use mode N (None) to allow manually encoding the data.

Alphanumerics with UCC128 barcode

I have the following ZPL code
^FO25,215^A0,N,25,25^BCN,100,N,N,N,U^FN21^FS
The customer wants this barcode as a UCC 128 barcode, but their data is alphanumeric.
Research
I looked through the ZPL docs which mentions:
option U for the mode defaults to Subset C which automatically strips out the alpha characters.
can prepend the entry with >9 or >7 to make this Subset A which allows alphanumerics.
Issue
I tried:
^FO25,215^A0,N,25,25^BCN,100,N,N,N,U^FN>721^FS
But it still removes the letters from the barcode.
Not only that, but it adds 7 as well.
There is nothing that precludes using alphanumeric with UCC-128 (aka GS1-128).
GS1-128 compliant format
What you must do for a code128 barcode to be GS1-128 compliant is to format the data correctly.
That means the barcode data must be formatted as:
<fnc1> <app-id> <value>
Where:
<FNC1> character in ZPL is >8 for all character sets.
<app-id> is the application-identifier (AI) for your barcode purpose
<value> is the (alpha-numeric) data to be encoded with the barcode
A good summary of UCC application-identifiers (AI) gives UCC-128, EAN-128 & GS1-128 Bar Code Explained (wayback archive from 2017).
Example
Let's say you would use an AI of 10 and are encoding the batch number 1702ABCD.
Then the resulting ZPL field data would be: ^FD>8101702ABCD^FS

What is the actual HEX / binary value of the GS1 FNC1 character?

I have searched many a page on wikipedia, the official GS1 specifications, but have yet to find a definite answer to the question
What is the actual HEX / binary value of the GS1 FNC1 character?
There is much information about how to use the GS1 identifiers, how to print the barcodes with ZPL and how to encode the FNC1, but I want to know the actual HEX value of that character.
The special function characters such as FNC1 through FNC4 belong to the class of "non-data characters" that can be encoded within various barcode symbologies but with do not have any direct ASCII representation in the decoded data stream. Each symbology that supports such characters has a different scheme for encoding them in its internal representation quite distinct from any byte-orientated character data.
The FNC characters serve both as flag characters (indicating something special to the reader) and as formatting characters (modifying the meaning of the encoded data). As such they are not intended to be transmitted directly in the data received by the host system from a basic barcode reader, although in both cases they may have an "effect" on the transmitted message.
The usual purpose of each of the FNC characters are as follows:
FNC1 - Structured Data flag character indicating GS1 and AIM formatting AND group separator formatting character, amongst other uses.
FNC2 - Message Append flag character for buffering the data in groups of symbols for a single read.
FNC3 - Reader Programming flag character for device configuration purposes.
FNC4 - Extended ASCII formatting character for encoding characters with ordinals 128-255.
Be aware that they may not all be available in certain barcode symbologies and may even be specified in different, non-typical or overloaded ways.
Encoding an FNC character in a symbol's internal data is accomplished via an "escape mechanism" that is specific to the encoding software. Each library has a different way of accepting these non-data characters within their input. For example, to use FNC1 in its typical GS1 structured data role for the data "(01)00312345678906(21)123456789012(30)0144" you might see the FNC1 characters escaped as {FNC1} so that the input looks like {FNC1}010031234567890621123456789012{FNC1}300144.
Some libraries will even use a set of regular or extended ASCII characters as placeholders for the FNC characters, but these are arbitrary representations and it is a mistake to consider them to be actual ASCII values for these non-data characters.
Upon scanning a barcode the symbol's internal data is typically decoded then transmitted to the host over a basic channel (e.g. keyboard wedge) as a sequence of bytes to be interpreted according to the Latin-1 character encoding. The FNC characters cannot be represented in such a manner and are excluded from the data stream, however their formatting effect on the data remains.
For instance, the standards for most symbologies specify that when an FNC1 character is being used in its role as a field separator in data conforming to GS1 Application Identifier Standard Format it should be decoded and transmitted as GS (ASCII 29). Explicitly stated, the formatting effect of a FNC1 character used as a GS1 Application Identifier separator is to place a GS character at the end of the variable-length field. But in other roles (such as when FNC1 is used in "first/second position" as a flag character and with non-GS1 formatted data) there is no formatting effect on the carried data and therefore no ASCII representation during decoding.
Another instance of the special function characters having a formatting effect on the data is with symbologies that use FNC4 to extend their reach from 7-bit ASCII into extended ASCII as described in this answer.
A subtle technical point is that the data transferred to the host is often prefixed with a short symbol indicator header known as a "symbology identifier" which denotes the type and usage of the symbol from which the data is being read. This is often modified by the presence of otherwise invisible flag characters within the symbol data, for example to indicate the presence of GS1 formatted data with "FNC1 in first" or to indicate reader programming mode when FNC3 appears anywhere in the symbol. The details are symbology specific.
Aside: In addition to FNC non-data characters, there are other non-data characters commonly supported by barcode symbologies that have no direct ASCII representation but affect the overall message. These include macro characters (that wrap the message data in an "envelope"), and ECI indicators that require the use of a transmission protocol beyond the typical "basic channel" mode but which enable the use of extended character sets amongst other enhancements.
Important is to know (and to setup a scanner properly) that the FNC1 character at the first position is translated to a symbology identifier according ISO/IEC 15424. The modifier m of the symbology identifier shows if there was a FNC1 or not. If this is not done the application cannot see anymore if a GS1 Structure was intended or not. Other structures are identified by e.g. Macro 06 in a data matrix code (ISO/IEC 16022, ISO/IEC 15434). Its required to figure our the difference to take the correct action to process the data.

How do I create a GS1 DataBar Expanded barcode?

I need to create a GS1 DataBar Expanded (RSS Expanded) barcode using either a Code128 font or a simple binary barcode font.
I'm aware of how to use the application identifiers or creating check sums but I don't know how to encode the data for the GS1 DataBar Expanded.
I've also successfully created GS1-128 (UCC / EAN-128) barcodes with the information I found here http://www.gs1-128.info/ and here http://www.barcodeisland.com/code128.phtml but these barcodes are not the same as the GS1 DataBar barcodes.
The GS1 DataBar Expanded uses some "Finder Patterns" and "Left Guard" + "Right Guard" as start / stop symbol but I can't find any information about how they are created (like binary values). http://www.onbarcode.com/gs1_databar/
How a EAN-128 looks for the number (01)12345678901231:
How a GS1 Data Bar Expanded looks for the number (01)12345678901231:
So, how do I encode my data to create an GS1 Data Bar Expanded barcode?

Decoded barcode extra digits

I am trying to come to terms with how a barcode is decoded and generated by a scanner.
A note from the client says the following generated bar code consists of extra characters:
Generated Code: |2389299920014}
Extra Characters: Apparently the first two and last three characters are not part of the bar code.
Question
Are the extra characters attached by the bar code reader (therefore dependent on the scanner) or are they an intrinsic part of the barcode?
Here is a sample image of a barcode:
http://imageshack.us/a/img824/1862/dm6x.jpg
Thanks
[SOLVED] My apologies. This was just another one of those cases of 'shooting your mouth off' without doing proper research.
Solution The code is EAN13. The prefix and suffix are probably scanner dependent. The 13 digits in between are as follows (first digit from the left) Check Sum (Next 9 digits) Company Id + Item Id (Last 3 Digits ) GS1 prefix
It's hard to answer without understanding what format you are trying to encode, what the intended contents are, and what the purported contents are.
Some formats add extra information as part of the encoding process, but it does not become part of the content. When correctly encoded and decoded, the output should match the input exactly.
Barcodes encode what they encode and there is no data that is somehow part of the barcode but not somehow encoded in it.
EAN-13 has no scanner-dependent considerations, no. The encoding and decoding of a given number is the same everywhere. EAN-13 encodes 13 digits, so I am not sure what the 13 digits "in between" mean.
You mention GS1, which is something else. A family of barcodes in fact. You'd have to say what specifically you are using. The GS1 encodings are likewise not ambiguous or scanner-dependent. You know what you want to encode, you encode it exactly, it's read exactly.

Resources