admin管理员组

文章数量:1389810

I have a problem with serialization. When I try ZPL code on Laberaly, it works as it should. But when that data is send to the printer, serialization does not work. Also, label is stored on printer - ^DF and it is later called - ^XF.

For simplicity I am only showing serialization part of the code code. This a label that is stored in the printer:

^XA
^CI31
^DFR:LABEL.ZPL^FS
^FT703,158^A0N,17,18^FH\^FN1^FS
^CI27
^XZ

And this is code to call label with serialization:

^XA
^CI28
^XFR:LABEL.ZPL^FS^FN1^FD1 of 4^SFD%%%%%,1%%%%%^FS
^PQ4
^XZ

No matter what I do with ^PQ parameters, it is always printed 1 of 4 on all labels. I have tried this ^PQ4,0,1,Y and ^PQ4,0,1,N, but the result is always the same. Label size is 10x8 cm, printer model is ZD421.

EDIT: So the solution is to move ^SF part to the part that will be saved to the memory, with ^FN.

It should look like this:

^XA
^CI31
^DFR:LABEL.ZPL^FS
^FT703,158^A0N,17,18^FH\^FN1^SFD%%%%%,1%%%%%^FS
^CI27
^XZ

Then serialization will work. Interesting thing is that this does not work on labelary.

I have a problem with serialization. When I try ZPL code on Laberaly, it works as it should. But when that data is send to the printer, serialization does not work. Also, label is stored on printer - ^DF and it is later called - ^XF.

For simplicity I am only showing serialization part of the code code. This a label that is stored in the printer:

^XA
^CI31
^DFR:LABEL.ZPL^FS
^FT703,158^A0N,17,18^FH\^FN1^FS
^CI27
^XZ

And this is code to call label with serialization:

^XA
^CI28
^XFR:LABEL.ZPL^FS^FN1^FD1 of 4^SFD%%%%%,1%%%%%^FS
^PQ4
^XZ

No matter what I do with ^PQ parameters, it is always printed 1 of 4 on all labels. I have tried this ^PQ4,0,1,Y and ^PQ4,0,1,N, but the result is always the same. Label size is 10x8 cm, printer model is ZD421.

EDIT: So the solution is to move ^SF part to the part that will be saved to the memory, with ^FN.

It should look like this:

^XA
^CI31
^DFR:LABEL.ZPL^FS
^FT703,158^A0N,17,18^FH\^FN1^SFD%%%%%,1%%%%%^FS
^CI27
^XZ

Then serialization will work. Interesting thing is that this does not work on labelary.

Share Improve this question edited Mar 19 at 8:52 look_up asked Mar 14 at 11:42 look_uplook_up 731 silver badge9 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

I doubt the ^SF command can be part of a numbered field. It must be directly embedded in the label format:

^XA
^CI31
^DFR:LABEL.ZPL^FS
^FT703,158^A0N,17,18^FD1 of 4^SFD%%%%%,1%%%%%^FS
^CI27
^XZ

^FN are typically used for simple text substitution.

本文标签: zebraZPL and Serialization Field (SF)Stack Overflow