Search code examples
zplhoneywellgs1-128

gs128 barcode not able to scan with Honeywell Dolphin CT60


I am using zpl language for generate gs128 barcode. here is my zpl code.

^XA ^BY2,2.5,145^FO100,343^BC,,Y,N,N,D^FD(01)200588612>8(21)0000410549>8(10)ABC123^FS ^XZ

here is the barcode that generated through above zpl code.

enter image description here


Solution

  • I assume you mean GS1-128 barcode. If you want to encode data using GS1 standards, then you cant just pass the data in raw format. You need to encode them according to the standard.

    In case of GS1-128 code you need to use a special start character FNC1. It is used to initialize the GS1 string and to signalize the end of a variable length strings. It is a quite interesting (and wide) topic. Here are some useful links:

    Zebra article on encoding GS1-128 and GS1-DataMatrix codes: https://www.zebra.com/us/en/support-downloads/knowledge-articles/creating-gs1-barcodes-with-zebra-printers-for-data-matrix-and-code-128-using-zpl.html

    Zebra ZPL manual, 128-code https://www.zebra.com/content/dam/zebra/manuals/printers/common/programming/zpl-zbi2-pm-en.pdf#G20.1037065

    GS1 general specifications (The requirement of FNC1 in Application Identifiers) https://www.gs1.org/docs/barcodes/GS1_General_Specifications.pdf#page=148&zoom=100,66,138 Actually, the whole document is useful if you intent to use GS1 standards.

    Barcodefaq article on encoding GS1-128 barcode (simmilar to the Zebra one, I prefer the Zebra article as it is more clearer) https://www.barcodefaq.com/1d/gs1-128/

    So, back to your code.

    You use this parameters for your 128 code:

    ^BC,,Y,N,N,D
    

    I would omit the last parameter (D), because it limits you to 18 characters, i.e. you have to enter 18 characters. And I am not sure how it works with multiple application identifiers in code. I recommend letting it on default value.

    Another problem with your code is, that you are using GTIN. According to the specifications, GTIN must be passed in its 14-digit version. (As in GS1 general specifications). That is easily done by prefixing it with zeroes.

    So, after those edits, your code looks like this:

    ^XA 
    ^BY2,2.5,145^FO100,33^BCN,,Y,N,N
    ^FD>;>80100000200588612210000410549>810>6ABC123^FS 
    ^XZ
    

    Where:

    ;>80100000200588612210000410549>810>6ABC123

    Can be decomposed to:

    >;  // Start code C
    >8 // FNC1
    01 // AI (Application identificator) for GTIN
    00000200588612 // GTIN-14
    21 // AI for Serial Number 
    0000410549 // Serial Number
    >8 // FNC1 because Serial Number have variable length
    10 // AI for Batch
    >6 // switch to B-code for alpha-numerics
    ABC123 // Batch
    

    I hope this helps you. I really recommend you to look at those articles above.

    Another useful tool: http://labelary.com/viewer.html There you can see how your code translates to label in real time. (With some limitations ... Some code types are not implemented yet.)

    *Edit Another usefull app is barValid - android smartphone app that can read GS1 barcodes and verify if they are correctly encoded. It is not official app, more something like a fan app, or custom research app, but it can give you quick results and it havent failed me for quite a long time I am using it.