Hello everyone, I’m facing a minor issue that I hope you can assist me with. I need to print the current date and time on a label using my Zebra GX420t printer, utilizing ZPL (Zebra Programming Language). I’ve learned that this printer comes equipped with a built-in real-time clock (RTC). However, when I attempt to print the date and time, only the ZPL code appears on the label. I’ve made sure to enable the RTC on the printer, yet I’m still not able to successfully print the date and time. Could anyone provide me with sample ZPL code that effectively prints the date and time? Your help would be greatly appreciated! Thank you in advance. Best regards, Damain
The Gx420t printer offers the Real-Time Clock (RTC) feature as an optional purchase. It's essential to confirm whether your specific device includes this feature. Typically, to print RTC information, you would need to use the ^FC command prior to entering the ^FD command.
Thank you for your response! Below is the code I utilize for printing the time on labels: ``` ^XA ^FT435,638 ^A0B,39,38 ^FC%,{,# ^FDTime: %d/%m/%y %H:%M:%S ^FS ^XZ ``` However, when the label prints, it only displays "Time: %d/%m/%y %H:%M:%S" without the actual date and time. Do you happen to know if there is a ZPL command that can fetch and print the computer's current date and time? I appreciate your assistance in advance!
To enhance your command, it’s essential to make a few adjustments. It's likely that the secondary and tertiary timers have not been properly defined. Therefore, you should simplify that section to just **^FC%** instead of the lengthy format **^FC%,{,#**.
If the printer still fails to display the time, it's likely that the RTC (Real-Time Clock) feature is disabled or unavailable on your device. You mentioned that a computer is involved in the process. Could you clarify what application or system is generating the ZPL (Zebra Programming Language) code and transmitting it to the printer?
To determine if your Zdesigner setup includes the RTC (Real-Time Clock) option, you can easily verify this through a direct communication method. Simply execute the following command: U1 getvar "rtc.date". If you receive a specific date in response, it indicates that the RTC option is enabled. Conversely, if no date is returned or an error occurs, this means the option is not available in your system.
Hi Damain! It sounds like you're on the right track with using ZPL for your Zebra printer. To print the current date and time, you can use the `^FD` command combined with the `^SC` command for string formatting. Here’s a simple sample code snippet you can try: ```zpl ^XA ^SCN,0,1 ^SN Date: ^FD^SCN,0,1^FD^FT50,50^FD^SF^FS ^SCN,0,1 ^SN Time: ^FD^SCN,0,1^FD^FT50,100^FD^HT^FS ^XZ ``` Make sure your printer's RTC is indeed enabled and working; sometimes it helps to do a factory reset or check other settings. Let me know if this helps or if you have any other questions!
Hey Damain, it sounds like you're on the right track with using ZPL, but it could be a syntax issue or the RTC just isn’t configured properly. You can use the `^FD` command to format the date and time. Here’s a simple snippet you might try: ``` ^XA ^RFW,B,0,1,0,0,1,0^FD^FS ^FDCURRENT_DATE:{^FD^RWF^FS} ^FD{^FDT:{^FN$D}}{^FN$T}^FS ^XZ ``` Make sure to adjust it based on your label size and orientation. Also, double-check that the RTC is set correctly in the printer settings. Hope that helps you get it working!
✅ Work Order Management
✅ Asset Tracking
✅ Preventive Maintenance
✅ Inspection Report
We have received your information. We will share Schedule Demo details on your Mail Id.
Answer: - To print the current date and time on a label using ZPL with a Zebra GX420t printer, you need to use the ^FN (Field Number) command along with the ^FD (Field Data) command to reference the built-in real-time clock (RTC). Make sure that the RTC is enabled on your printer.
Answer: - If only the ZPL code is printing, it might be due to a syntax error in the ZPL code or the RTC not being correctly referenced or enabled. Double-check your ZPL syntax and ensure that the RTC is activated on your Zebra printer.
Answer: - A basic ZPL code snippet to print the date and time using the RTC on a Zebra GX420t printer could look like this: ``` ^XA ^FO50,50^A0N,50,50^FN1^FS ^XZ ``` Ensure to replace or configure the appropriate fields and enable the RTC feature.
Answer: - The real
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.