^RZ Command in Stored Format causes VOIDS in Zebra RFID Printers

Article ID: 49827010

Details


 
Symptom

Using a ^RZ statement in a stored format with a variable field causes RFID labels to print with VOIDs.

Applies To

RFID Printers

Cause or Overview

The following ZPL code will print with VOIDs:
^XA
^DFR:TEST.ZPL
^RS8,,,1,N^RMY^RR0^RFW,H^FN8^FS
^RZ1234ABCD,E,P^FS
^XZ
^XA
^XFR:TEST.ZPL
^FN8^FD123456781234567812345678^FS
^XZ
This problem is inherent in the recalling of stored formats. In the case where you're recalling the format, it's actually performing the lock operation before the encode operation. When the format is recalled, it doesn't fill in the data for ^FN8 until the ^FN8 is encountered in the second format. By the time it gets to the ^FN8 it executed the ^RZ. The best way to handle this is to perform the ^RZ command in the recalling format (2nd one).

Solution

This ZPL code works:
^XA
^DFR:TEST.ZPL
^RS8,,,1,N^RMY^RR0^RFW,H^FN8^FS
^XZ
^XA
^XFR:TEST.ZPL^FS
^FN8^FD123456781234567812345678^FS
^RZ1234ABCD,E,P^FS
^XZ

Helpful information

RFID Commands from the ZPL Manual Read More>>