How can I print the printer name on a label

We have several Zebra printers (ZM400, ZT410) and we would like to know on which printer a label has been printed in case of bad printing.

Is it possible to print the printer name on the label? How can I do that? We use ZPL.

Anonymous (not verified)
If we know which printer the

If we know which printer the label is going to be sent to for print, then we can use ! U1 getvar "device.unique_id" to get the ID of the printer. Then, we can encode the ID in the ZPL as part of a label prior to sending the label to that printer.

If we don't know which printer the label to be sent to, then there is no way to retrieve the printer ID or add the ID after the ZPL has already been sent to the printer.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Evgeniy Ananev
! U1 setvar "device.friendly

! U1 setvar "device.friendly_name" "PRINTER_NAME"

You can write any value to this variable and use it as an "identifier" if you use this command.

! U1 setvar "device.friendly_name" "" but do not specify a value, then the serial number of the device will be entered into it.

Or you can use getvar "device.unique_id" when printing a label

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Hi Ict, The only way to do

Hi Ict, The only way to do this in the label if you don't know it already is with CPCL at the moment.  As the ZT and ZM do not run CPCL, you have to get the value before printing and add it as Steven and Evgeniy are recommending.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments