Recall format containing a ^SN command not decrementing correctly

Article ID: 79488589

Issue / Question

Decrementing order of a recalled format with ^SN is not correct.

The values are out of order when counting down

Issue Details

When recalling a ZPL format containing a ^SN command with a decrementing value the order is not correct.

Applicable To

ZPL compatible printers - XML recall functionality in regards to the serialization command ^SNv,n,z

Resolution / Answer

Parameter "n" needs to match the number of digits that can decrement. (ZPL command format: ^SNv,n,z) Read More>>
This means that when you have a parameter "v" value of 10 you need to decrement with -01 
Another example would be if you have a parameter "v" value of 1000 you would need to use -0001 for parameter "n"

Example:
Send this ZPL script to the printer to store it in R: memory:

^XA^DFR:TEST.ZPL
^FO50,50^A0,50,50^FN1^FD^SNIncrement,-1,Y,^FS
^XZ

Recall the template using XML:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE labels SYSTEM "label.dtd">
<labels _JOBNAME="J1" _PRINTERNAME="" _QUANTITY="10" _FORMAT="TEST.ZPL">
<label>
<variable name="Increment">10</variable>
</label>
</labels>

The result would be:

10 - 19 -18 -17 -16- 15 -14 -13- 12 - 11

However if ^SN would be used in this manner :

^XA^DFR:TEST.ZPL
^FO50,50^A0,50,50^FN1^FD^SNIncrement,-01,Y,^FS
^XZ

The result would be:

10 - 9 - 8 - 7 - 6 - 5 - 4 - 3-  2 - 1