【问题标题】:How to create a GS1-128 barcode using ZPL with a check digit如何使用带有校验位的 ZPL 创建 GS1-128 条码
【发布时间】:2019-06-19 15:44:43
【问题描述】:

我需要使用 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

【问题讨论】:

    标签: barcode zebra-printers zpl


    【解决方案1】:

    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

    【讨论】:

    • 非常感谢!这似乎奏效了 - 感谢您的帮助
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-21
    • 2019-01-29
    • 2022-06-13
    • 2016-09-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多