Salesforce

Adding Time Stamps to Zebra Labels

« Go Back

Information

 
Issue / QuestionHow to add time stamps to Zebra labels?
Applicable ToZebra 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)
  1. 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
  1. 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.
  2. 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).

! U1 setvar "rtc.timezone""CST6CDT5,M3.2.0/02,M11.1.0/02"

More examples can be found in the Zebra ZPL Programming Guide.
 
  1. These SGD commands can be sent to the printer using Zebra Setup Utilities or USB Mirror. For this example, Zebra Setup Utilities are used. Refer to the article Zebra Setup Utilities: Sending Printer Commands and Receiving Data. For more information on USB Mirror, please follow the article Setup, Configure, and Copy Files to Your Zebra Printer Using USB Mirror.
image.png
  1. 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
  1. For this example,  ZebraDesigner label software is used.
image.png
  1. Text boxes are created with Fixed Data. The words reading Current Date 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.
  2. Click File in the upper left corner and then Print to test print your label format.
  3. An optional step is setting your printer into AutoExec mode, 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
  1. After designing your label, click File in the upper left corner.
  2. Click Print in the left-hand menu. Check the box next to “Print to File.”
  3. Click Print at the top of the screen. Then name and save the file.
image.png
  1. Open the file with NotePad or a text editor of choice. Edit the file according to the reference diagram below:
TimeStamp AutoExec.png
  1. Select and highlight all the edited text and click Copy.
  2. Open Zebra Setup Utilities, and when connected to the printer, click Open Communication with Printer.
  3. In the Communication box, paste the edited label format in the box. Then click Send to Printer.
image.png
  1. Shut down and reboot the printer.
  2. 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).
  1. Open Zebra Setup Utilities.
  2. Click Open Communication with Printer.
  3. In the Communication box\, enter the following SGD commands.
~JA
^XA
^IDE:AUTOEXEC.ZPL^FS
^XZ
 
image.png
 
  1. Click the Send to Printer button.
  2. Shut down and reboot the printer.
  3. Now the AutoExec Mode has been removed.

Helpful Information:
 
URL Name000026509
TitleAdding Time Stamps to Zebra Labels

Powered by