0

I am using ZEBRA printer and it's model number is ZTC ZT410-203dpi ZPL. I am generating GS1 Datamatrix barcode using below ZPL code.

^XA
^LL912^CF0N,51,50^CI28~JS^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR3,3^MD15^LRN^CI0^MMT^PW831^LL0799^LS0^FT23,423^A0N,28,28^FB71,1,0^FH\^FD^FS
^FT59,146^A0N,28,28^FB72,1,0^FH\^FD^FS
^FT15,82^A0N,51,50^FB98,1,0^FH\^FDPN#:^FS
^FT14,196^A0N,28,28^FB120,1,0^FH\^FDUOM      :^FS
^FT376,198^A0N,28,28^FB83,1,0^FH\^FDPO#   :^FS
^FT14,240^A0N,28,28^FB118,1,0^FH\^FDP. Desc  :^FS
^FT16,327^A0N,28,28^FB118,1,0^FH\^FDSupplier :^FS
^FT17,405^A0N,28,28^FB115,1,0^FH\^FDProject# :^FS
^FT16,455^A0N,28,28^FB118,1,0^FH\^FDLot No   :^FS
^FT15,510^A0N,28,28^FB115,1,0^FH\^FDRec Date:^FS
^FT378,510^A0N,28,28^FB139,1,0^FH\^FDReceipt#   :^FS
^FT135,133^A0N,51,50^FB667,2,0^FH\^FN4^FDPN_VALUE^FS
^FT138,198^A0N,28,28^FB131,1,0^FH\^FN5^FDUOM_VALUE^FS
^FT466,198^A0N,28,28^FB130,1,0^FH\^FN10^FDPO_VALUE^FS
^FT138,265^A0N,28,28^FB624,2,0^FH\^FN8^FDDESC_VALUE^FS
^FT136,353^A0N,28,28^FB625,2,0^FH\^FN7^FDSUPPLIER_VALUE^FS
^FT136,429^A0N,28,28^FB624,2,0^FH\^FN6^FDPROJECT_VALUE^FS
^FT136,485^A0N,28,28^FB625,2,0^FH\^FN7^FDLOTNUMBER_VALUE^FS
^FT137,510^A0N,28,28^FB195,1,0^FH\^FN9^FDDATE_VALUE^FS
^FT523,510^A0N,28,28^FB190,1,0^FH\^FN11^FDRECEIPT_VALUE^FS
^FO1,162^GB830,0,2^FS
^FO366,163^GB0,45,1^FS
^FO1,207^GB829,0,1^FS
^FO2,291^GB829,0,1^FS
^FO1,368^GB829,0,1^FS
^FO0,420^GB831,0,2^FS
^FO1,475^GB829,0,1^FS
^FO1,525^GB829,0,1^FS
^FO368,475^GB0,50,3^FS

^FO280,530
^BXN,4,200,,,,@
^FD@110LOTNUMBER_VALUE@1400PO_VALUE@189901PN_VALUE@189902DESC_VALUE@189903UOM_VALUE@189904PROJECT_VALUE@189905SUPPLIER_VALUE@189906RECEIPT_VALUE@189907DATE_VALUE^FS
^XZ

I am sending print request using below xml on FTP.

<?xml version="1.0" standalone="no"?>
<label _FORMAT="ITEM.ZPL">
    <variable name= "PN_VALUE">test PN Value</variable>
    <variable name= "DESC_VALUE">test DESC value</variable>
    <variable name= "UOM_VALUE">test UOM Value</variable>
    <variable name= "DATE_VALUE">test Date VAlue</variable>
    <variable name= "PO_VALUE">Test PO</variable>
    <variable name= "PROJECT_VALUE">Test project</variable>
    <variable name= "SUPPLIER_VALUE">Test Supplier name</variable>
    <variable name= "RECEIPT_VALUE">Test Receipt value</variable>
    <variable name= "LOTNUMBER_VALUE">Testlot12</variable>
</label>undefined</labels>

Please find the attached generated label after sending xml request to FTP. All fields display on the label has been changed based on xml variable. but variable which are mentioned in barcode was change. Below are the output of generated barcode after scanning.

Generated Label: Generated Label after sending xml request to printer

barcode output : 10LOTNUMBER_VALUE400PO_VALUE89901PN_VALUE89902DESC_VALUE89903UOM_VALUE89904PROJECT_VALUE89905SUPPLIER_VALUE89906RECEIPT_VALUE89907DATE_VALUE

I did not got any idea why variable inside barcode was not changed ?

Delphi Coder
  • 1,723
  • 1
  • 14
  • 25
Kels
  • 674
  • 1
  • 5
  • 21
  • It looks like you are sending two set of data to the printer. First is the second to last line of the ZPL Code. then a second time in the XML. Try removing the second to last line of the ZPL Code and see what happens. – jdweng Mar 24 '21 at 09:42
  • Hi jdweng, Thank you for reply. If i will remove second to last line of the ZPL code then my gs1 datamatrix barcode will not display. – Kels Mar 24 '21 at 11:07
  • The line looks wrong according to documention. ^FD is suppose to be one Field Data parameter. Also the '@' isn't shown on my documentation. See page 172 : https://www.zebra.com/content/dam/zebra/manuals/printers/common/programming/zpl-zbi2-pm-en.pdf – jdweng Mar 24 '21 at 13:01

0 Answers0