views:

951

answers:

1

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?

A: 

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.

Treb
It make serial numbers, but I didn't find any way to concate/join/combine data. I cannot use it because the output will only contains the last segment.My program do support EPL2 too, and it can be done very well and simple by using counter. What's wrong with ZPL?
Dennis Cheung