![]() ![]() |
Related Products: |
Below are some of the requirements for GS1-128 and how to implement them in IDAutomation products.
According to GS1-128 specifications, the height of the barcode should be 15% of the length or 0.50 inch (1.3 CM), whichever is greater.
Every
GS1-128 barcode begins with the (FNC1)
"Function Code One" character and an
Application Identifier (AI) number. The AI defines a specific purpose for
the data field after it. The combination of the AI and its data field is
referred to as the element string. The AI is represented with parentheses around it
in the Human Readable representation below the barcode. Multiple element strings may also be encoded according to
GS-1 specifications. Variable element strings should be encoded last in the
symbol and FNC1 characters must be encoded between two or more variable length
element strings.
Several IDAutomation products support the inclusion of the AI with ASCII 202 (the Ê character) in Code 128 auto mode. When using this method, ApplyTilde does not have to be enabled. For systems outside of the USA or when using a Mac, IDAutomation recommends use the ApplyTilde or the process tilde option to encode ASCII 202 as ~202. Optionally, the FNC1 may also be encoded when parentheses are included around the first AI in the data.
FNC1 Encoding Options | Notes |
Ê0112345678901231 | ApplyTilde does not have to be enabled. Not recommended for systems outside of the USA or when using a Mac. |
~2020112345678901231 | ApplyTilde must be enabled. The three characters after the tilde are encoded directly within the barcode as a single ASCII character. |
(01)12345678901231 | ApplyTilde must be enabled and the parentheses must appear around the AI. |
Products updated July 2016 or later include additional text formatting
that will automatically add the parentheses around AIs after fixed length element
strings without the need to add additional FNC1 codes. For example, Ê011234567890123115991231
or ~202011234567890123115991231
will appears as:
In earlier products, to make the human-readable digits accurate, use the
associated ASCII character listed below as the FNC1 for the correct number
of digits in the AI. For example: ~2120112345678901231~21215991231.
ASCII212: Ô = 2 digits ASCII213: Õ = 3 digits ASCII214:
Ö = 4 digits
ASCII215: × = 5 digits ASCII216: Ø = 6 digits ASCII217:
Ù = 7 digits
NOTE: The method also inserts FNC1 codes into the symbol. If symbol size needs to be minimized, multiple AIs may be included in a single barcode without encoding additional FNC1 codes, provided that variable length AIs are included last. The parentheses may not correctly appear in the text interpretation of the symbol when using this method of encoding, however they may be easily included by inserting a custom text field below the symbol if required.
Some characters used above such as Ô and Õ are from the 1250 ISO Latin 1 character set used in Europe & the USA. When using the Mac or systems outside of the USA, the appropriate character must be used that represents the proper ASCII location. When in doubt, use the Tilde Method. For example, instead of using Ê use ~202.
The FNC2 character may be inserted as ASCII 197 (the Å character) in IDAutomation barcode products, for example: ~19780-128-4991 encodes [FNC2]80-128-4991. The IDAutomation SC5USB Barcode Scanner may be programmed to hold a barcode starting with FNC2 in memory and only transmit data after scanning a second barcode, which allows a continuous text string to be encoded in two barcodes.
A GS1 MOD 10 check digit is often required when implementing GS1-128 barcodes for various specifications; the AI is usually not included in the MOD 10 calculation. If a MOD 10 check digit is needed, it may be either pre-calculated, or calculated in the component at the time the barcode is generated.
For testing purposes, GS1-128 symbols may be generated with the Free Online Barcode Creator or from the bcgen.com command line, for example: https://www.bcgen.com/demo/linear-dbgs.aspx?D=(01)10614141543219&PT=T
A few examples are included below:
SSCC-18 Barcode | |
Desired result: | [FNC1]0000801234999999999[MOD10] |
Text string sent to DataToEncode parameter: | (00)00801234999999999~m17 |
Human readable text: | (00) 008012349999999997 |
Data scanned from barcode:* | ]C100008012349999999997 |
Global Trade Item Number (GTIN) | |
Desired result: | [FNC1]013001234567890[MOD10] |
Text string sent to DataToEncode: | (01)3001234567890~m13 |
Human readable text: | (01) 30012345678906 |
Data scanned from barcode:* | ]C10130012345678906 |
Coupon Extended Code (Offer Code and Expiration Date) | |
Desired result: | [FNC1]81010123450901 |
DataToEncode: | ~21481010123450901 |
Human readable Text: | (8101) 0123450901 |
Coupon Extended Code (Offer Code and Household ID) | |
Desired result: | [FNC1]81007123452112345678 |
DataToEncode: | ~21481007123452112345678 (Tilde Method) |
Human readable text: | (8100) 712345 (21) 12345678 |
FNC1 characters must be encoded between two or more variable length element strings.
FNC1 Inserted Between Two Element Strings | |
Desired result: | [FNC1]10345678[FNC1]213456789012 |
DataToEncode: | (10)345678(21)3456789012 |
Human readable text: | (10)345678(21)3456789012 |
To obtain more information about the formatting and placement of GS1-128 barcodes, contact GS1.ORG.
* Many barcode scanners do not decode FNC1 codes. However, when the "format" option of the IDAutomation SC5USB Barcode Scanner is set to "UCC/EAN-128," FNC1 codes are decoded as ]C1 for the first FNC1 and ASCII 29 (The <GS> character) for additional FNC1 codes as required by GS1. IDAutomation's Barcode Scanner ASCII String Decoder may be used to view the <GS> character.
Most scanners with built-in decoders do not decode FNC1 codes in GS1-128 (UCC/EAN-128) barcodes. However, when the "format" option of the IDAutomation SC5USB Barcode Scanner is set to "UCC/EAN-128," the scanner decodes FNC1 AI codes according to the UCC/EAN Application Identifier Standard.
According to this standard, the first FNC1 should be translated to the three text characters of ]C1, and next FNC1 codes should be translated to a field separator ASCII code 29 (The <GS> character) as demonstrated in Fig. 2.
String used to create the barcode using IDAutomation products: Ê8100712345Ê2112345678 | |||
Barcode Created:
![]() |
The image to the left may be easily created using the Free Online Barcode Creator. | ||
Decoded result from the IDAutomation SC5 USB Scanner: | |||
]C1 | 8100712345 | <GS>* | 2112345678 |
* The <GS> character is a group separator function, which is ASCII value 29. This character cannot be viewed or printed and therefore it may not appear to be present, unless an application is used such as IDAutomation's Barcode Scanner ASCII String Decoder. If the SC5 USB Barcode Scanner is being used, the GS character can be reassigned to any ASCII character by changing the "field separator code" referred to in the manual. For example, this may be changed to the "|" character to make troubleshooting easier.
After making that change, the scanner
would decode the symbol in Fig. 2 as follows:
]C18100712345|2112345678.
To program this change with the SC5 USB Barcode Scanner, perform the following:
©Copyright 2018
IDAutomation.com, All Rights Reserved.
Legal
Notices. Barcode Fonts | Components | Scanners | Support | Contact Us |
|
![]() ![]() ![]() ![]() ![]() Over 70% of Fortune 100 companies use IDAutomation's products to automate their businesses. |