如何使用带有校验位的ZPL创建GS1-128条码

时间:2019-06-19 15:44:43

标签: barcode zebra-printers zpl

我需要使用ZPL生成GS1-128条形码。它需要包含一个校验位。我似乎没有得到校验位。

Here is my code:
^BCN,088,Y,Y,Y,D^FD(00)00123456000057763^FS

The first "Y"  is saying to print the human readable along with the 
barcode.  The third "Y" is supposed to tell it to include a check digit.  
I'm not seeing the check digit in the human readable, my scanner is not 
displaying a check digit, so I'm assuming it is also not in the barcode?  


Here is from the spec:
SSCC Barcode Structure (20 digits) 
Application Identifier = (00) 
Positions of SSCC barcode: 
 1 = Extension Digit (0-9 assigned by Vendor) 
 2 = 0 if mfg id # assigned by GS1 US; 
 1-9 if mfg id # assigned by another GS1 MO 
 3 thru 8 = 6-digit mfg id # 
 9 thru 17 = 9-digit serial id # -must be unique for one year
 18 = Modulo 10 check character

1 个答案:

答案 0 :(得分:0)

TLDR; ^BCN,088,Y,Y,,D ^FD(00)001234560000577630^FS

第三个Y确实包含一个校验位,但不包含所需的校验位(ZPL手册,p73):

  

Mod 103校验位始终存在。它无法打开或关闭。 Mod 10和103与[第三个Y]一起打开。

使用D时,它将自动添加一个校验位(ZPL手册,p80):

  

打印机自动   确定是否需要校验位,进行计算并打印。

但更重要的是,它希望您发送18位数字:

  

括号和空格可以在字段数据中。应用程序标识符“ 00”,后跟   由17个字符组成,后跟虚假的校验位占位符。

它将去除第18位数字,并将其替换为条形码和人类可读的部分。

https://www.zebra.com/content/dam/zebra/manuals/printers/common/programming/zpl-zbi2-pm-en.pdf

相关问题