Question

I have a simple program print barcodes. The label format is in a preloaded form. The value the barcode is passed by a parameter as follow.

^XA
^XFR:FORM.ZPL
^FN999^FDH654321+Y0001+OABC+^FS
^PQ2,0,1,N

And it print two barcodes

H654321+Y0001+OABC+
H654321+Y0001+OABC+

What I want is the middle part as a serial number, and it will print barcodes like this

H654321+Y0001+OABC+
H654321+Y0002+OABC+

I have tried the ^SN and ^SF

^FN999^FDH654321+Y0001+OABC+^SF%%%%%%%%%dddd%%%%%%,1%%%%%%^FS

But it was not success, two copies are the same. How can I do it in ZPL-II?

Was it helpful?

Solution 3

It was a no go. And end up generate the sequence in the application, not in the printer.

OTHER TIPS

Ripped from a ZPL II manual:

^AF^SN 0001, 1, Y^FS

Define serialized field, starting value of 1, increment by 1, insert leading zeros

I have no way of knowing if this will help you though, since I have only experience with EPL2 label definitions.

Try this code:

^XA
^LH10,40
^BCN,150,Y,N,N^FD^SNH654321+Y0001+OABC+,1,Y^FS
^PQ2,0,1,Y
^XZ

Try changing the ^PQ2,0,1,N to ^PQ2,0,0,N. The value in in replicates field indicated that you wanted a duplicate serial number printed before the serial number was incremented.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top