ZPL coding for Real Time Clock Printing

Article ID: 33225952

Details


 

Description

This procedure discusses setup and use of the Real Time Clock option for printing.

Setting the Real Time Clock 

Applies To

Zebra ZPL compatible printers with the RTC Standard or Real Time Clock option. 

Overview

The Real Time Clock allows a user to automatically print the time and date on labels. There are 2 ways to set Date and Time for Real time clock. Ensure you download the latest firmware of the printer before setting the real time clock.

Using ZPL

You may use the ^ST (Set Time) ZPL command. See the ST ZPL Command Details Read More>> 

^STMonth,Day,Year,Hour,Minute,Second,Format

Month = value from 01 to 12 as Month
Day = value from 01 to 31 as Day
Year = value from 1998 to 2097 as Year
Hour = value from 00 to 23 as Hour in 24 hours format
Minute = value from 00 to 59 as minute
Second = value from 00 to 59 as seconds
Format = A = am or P = pm or M = 24 hours military format.

Example: if you want to set 28th of August 2016 01:15 pm then the command you send should be

^XA
^ST08,28,2016,01,15,0,P^FS
^XZ

You may use the Zebra Setup utilities under Open Communication with printer and put the following command

 

User-added image

Print the configuration label and you will notice the time have been set.

SGD Command

Another alternative is to use the SGD (SetGetDo) command. Keeping it in mind that the SGD command on real time clock time is only in 24 hours format and thus you have to convert. (i.e. 13:00:00 would be 1 pm.)

! U1 setvar "rtc.date" "08-28-2016"

! U1 setvar "rtc.time" "13:15:00"

You can do the following command to see if the value of the printer was it set

! U1 getvar "rtc.date"

! U1 getvar "rtc.time"

User-added image

 

Additional Information

Real Time Clock Programming Documentation Read More>>

Source

Leon C

 

 

+ Product Codes

  • 110PAX Print Engines (disc.)
  • 110Xi4 Industrial Printer
  • 140Xi4 Industrial Printer
  • 170Xi4 Industrial Printer
  • 220Xi4 Industrial Printer
  • 2824 Plus Series
  • All Surface RFID Label Solution
  • G-Series GX Desktop Printers
  • GX420Rx Desktop Printer
  • GX420d Desktop Printer
  • GX420t Desktop Printer
  • GX430d Desktop Printer
  • GX430t Desktop Printer
  • LP 2824 Plus Desktop Printer
  • PAX Print Engines
  • R110Xi4 RFID Printer
  • TLP 2824Plus Desktop Printer
  • Xi Series Industrial Printers
  • Z Series Industrial Printers
  • ZD410 Series
  • ZD410D
  • ZD420 Series
  • ZD420-HC
  • ZD420C
  • ZD500 Desktop Printer
  • ZD500 Desktop Printer
  • ZD500R RFID Printers
  • ZD500R RFID Printers
  • ZE500 Print Engines
  • ZE500 Print Engines
  • ZE500R RFID Print Engine
  • ZE500R RFID Print Engine
  • ZM400
  • ZM600
  • ZT200 Series Industrial Printers
  • ZT210 Industrial Printer
  • ZT220 Industrial Printer
  • ZT230 Industrial Printer
  • ZT400 Series Industrial Printers
  • ZT400 Series RFID Printers
  • ZT410 Industrial Printer
  • ZT410 RFID Industrial Printer
  • ZT420 Industrial Printer
  • ZT420 RFID Industrial Printer