You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old May 3rd, 2018, 01:59 PM   #1
Damain06
Member
South Africa

Damain06 is offline
 
Join Date: May 2015
Location: Uitenhage
Posts: 13
Tech Zebra Printer GX420t

Good day all I have a slight problem. I have to print the date and time on a label using Zebra Gx420t printer. The language is ZPL. I read that it has a built in real time clock. When I try to print the date and time only the zpl code gets printed. I enabled the RTC clock on the printer but still unable to print the date and time. does any one have a sample code to print date and time using ZPL commands.
Thanx in advance.
Regards Damain
  Reply With Quote
Old May 3rd, 2018, 02:25 PM   #2
Dravik
Member
United States

Dravik is offline
 
Join Date: Jun 2008
Location: New York
Posts: 1,343
Hmm, The Gx420t has the RTC as an option when the printer was purchased. You'll have to verify that it indeed HAS that option.

That said, Usually you would tell it to print RTC info using the
^FC command before a ^FD command.
  Reply With Quote
Old May 3rd, 2018, 02:31 PM   #3
Damain06
Member
South Africa

Damain06 is offline
 
Join Date: May 2015
Location: Uitenhage
Posts: 13
Thanx for the reply.Here is the code I use to print the time

^XA^FT435,638^A0B,39,38^FC%,{,#^FDTime: %d/%m/%y %H:%M:%S^FS^XZ
when the label gets printed there is no date and time only this (Time: %d/%m/%y %H:%M:%S) gets printed on the label. do you perhaps know if there is a ZPL command that you can print the computers date and time?
Thanx in advance
  Reply With Quote
Old May 3rd, 2018, 02:36 PM   #4
Dravik
Member
United States

Dravik is offline
 
Join Date: Jun 2008
Location: New York
Posts: 1,343
Well, first you should probably change that command a bit

You probably don't have the secondary and third timers defined, So the portion that is
^FC%,{,#
should just be
^FC%
  Reply With Quote
Old May 3rd, 2018, 02:37 PM   #5
Dravik
Member
United States

Dravik is offline
 
Join Date: Jun 2008
Location: New York
Posts: 1,343
If that still doesn't print the time, you probably don't have the RTC option on the printer.

You said you have a computer involved? What is generating the ZPL and sending it to the printer?
  Reply With Quote
Old May 3rd, 2018, 02:40 PM   #6
Dravik
Member
United States

Dravik is offline
 
Join Date: Jun 2008
Location: New York
Posts: 1,343
Using Zdesigner, you can check to see if you have the RTC option using direct communiction and executing the following command
! U1 getvar "rtc.date"

If you get a date back, you have the option, if you don't or it errors, you don't.
  Reply With Quote
Old May 3rd, 2018, 02:42 PM   #7
Damain06
Member
South Africa

Damain06 is offline
 
Join Date: May 2015
Location: Uitenhage
Posts: 13
the printer is connected to a production IPC and if the part is good it gets a label with some data on it but not the date and time, so I need to get date and time on the label. the ZPL code is saved in a txt file on the pc and gets sent to the printer. below is the code in the txt file that gets sent to the printer



^XA~TA000~JSN^LT20^MMT^MNW^MTT^PON^PMN^LH0,0^JMA^P R2,2^MD20^JUS^LRN^CI0^XZ
^XA^LL0200

^FT25,10^A0N,20,22^FD[1]^FS
^FT25,40^A0N,16,16^FDMod:[4]^FS
^FO25,45^GB120,0,2^FS
^FT25,70^A0N,16,14^FD[6]^FS
^FT85,70^A0N,16,14^FD[7]^FS
^FT25,100^A0N,16,14^FDSerial:^FS
^FT75,100^A0N,16,18^FD[9]^FS

^BY96,96^FT152,95^BXN,4,200,22,22,1
^FH\^FD[14]^FS
^PQ1,0,1,Y^XZ
  Reply With Quote
Old May 3rd, 2018, 02:45 PM   #8
Damain06
Member
South Africa

Damain06 is offline
 
Join Date: May 2015
Location: Uitenhage
Posts: 13
OK looks like I don't have the RTC on the printer since I tried ! U1 getvar "rtc.date" and no date and time was received
  Reply With Quote
Old May 3rd, 2018, 02:47 PM   #9
Damain06
Member
South Africa

Damain06 is offline
 
Join Date: May 2015
Location: Uitenhage
Posts: 13
Is there a ZPL command that you can print the time of the connected pc?
  Reply With Quote
Old May 3rd, 2018, 02:48 PM   #10
Dravik
Member
United States

Dravik is offline
 
Join Date: Jun 2008
Location: New York
Posts: 1,343
Ah, Well yes, in theory whatever software you use to generate the label info could simply insert time into the file from the computer clock.

For example, I use Bartender to do this. Legi or Nicelabel, or any software like it would do that automatically.

Could also do it from many SCADA packages, especially if they have a scripting language.

Edit: No, ZPL is executed on the printer and knows not about the PC.
  Reply With Quote
Old May 3rd, 2018, 02:56 PM   #11
Damain06
Member
South Africa

Damain06 is offline
 
Join Date: May 2015
Location: Uitenhage
Posts: 13
OK thanks for the reply. The problem is that I am unable to access the software on the pc that is generating the label info since the Scada that is running is a exe (like a VB, or labview).
Might have to get a printer with a built in RTC. (Tried the GX420t and the GK420d).
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Zebra Ethernet/IP Printer and Studio 5000 widelto LIVE PLC Questions And Answers 33 September 17th, 2018 04:04 PM
1734-232ASC Comms to Printer Crammed77 LIVE PLC Questions And Answers 8 July 19th, 2016 06:46 PM
FX3G to Zebra GX420T via RS-232 Grant_KSMAuto LIVE PLC Questions And Answers 1 July 18th, 2016 05:53 AM
Micrologix 1100 + Zebra Printer danielplcsnet LIVE PLC Questions And Answers 0 June 15th, 2013 10:58 PM
zebra printer plcBen LIVE PLC Questions And Answers 6 January 25th, 2012 02:40 PM


All times are GMT -5. The time now is 03:31 PM.


.