Zebra Link-OS printers with a built-in Real Time Clock (RTC)
Resolution / Answer
Video: How to Add Time Stamps to Zebra labels
Procedure:
Setup Printer to interact with NTP Server (Ensuring Accurate Date and Time)
Ensure that your Zebra printer has a Real Time Clock (RTC). Not all Zebra printers include an (RTC). Most all Zebra Industrial Printers, Mid-range and Premium Desktop, and Premium Mobile printers have an RTC. If unsure, you can also send the following SGD command to the printer.
rtc.exists
This command reports whether the system has a real-time clock.
getvar
To determine if the system has a real-time clock:
! U1 getvar "rtc.exists"
Values:
"no" the system does not have a real-time clock
"yes" the system has a real-time clock
Use your internet Search Engine of choice and search for an NTP server you want to use. Select an NTP server based off UTC (Coordinated Universal Time). Or you can build your own NTP server if you wish.
Here are the SGD commands we will be sending to the printer. You can learn more about these commands in the Zebra ZPL Programming Guide.
Enabling the NTP protocol on the printer. ! U1 setvar "ip.ntp.enable" "on"
This command tells the printer which IP address to point to for the NTP server (found in step 2). ! U1 setvar "ip.ntp.servers" "xxx.xxx.xxx.xxx"
The rtc.timezone command can be translated as follows: CST6 (Central Standard Time; 6 hours off UTC), CDT5 (Central Daylight Time; 5 hours off UTC), running from 2 a.m. from the second Sunday in March (M3.2.0/02) through 2 a.m. on the first Sunday in November (M11.1.0/02).
The printer is set up to ensure that it has accurate time as being received from the NTP server.
Design a Label with the Current Date and Time
For this example, ZebraDesigner label software is used.
Text boxes are created with Fixed Data. The words reading CurrentDate and Current Time use Fixed Data as the data type. Underneath each of those headings, add two more text boxes and switch them to the Current date and Current time from their respective drop-down “data” menus. You can adjust the Date and Time to be presented and printed on the label from the options.
Click File in the upper left corner and then Print to test print your label format.
An optional step is setting your printer into AutoExecmode, which will set up the printer to automatically print the format we just designed every time the pause button is pressed.
Setup the printer for AutoExec Mode
After designing your label, click File in the upper left corner.
Click Print in the left-hand menu. Check the box next to “Print to File.”
Click Print at the top of the screen. Then name and save the file.
Open the file with NotePad or a text editor of choice. Edit the file according to the reference diagram below:
Select and highlight all the edited text and click Copy.
Open Zebra Setup Utilities, and when connected to the printer, click Open Communication with Printer.
In the Communication box, paste the edited label format in the box. Then click Send to Printer.
Shut down and reboot the printer.
You can print the label by pressing the Pause or Form Feed button, depending on the Zebra printer used.
Removing the AutoExec Mode from the Printer (if needed only).