LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to send command to Zebra T402 label printer using rs232

Solved!
Go to solution

Hi,

I am using Zebra T402 label printer, D9 serial communication cabel.

I want to send command to the printer to printer to print date and serial number and barcode. How can i use visa properties to send commands to printer?

Can any one is there to help ?

 

Thanks 

0 Kudos
Message 1 of 9
(10,143 Views)
What specifically are you looking for? Do you want to know the actual commands required to print the label or merely what is required to establish the connection to the printer? This is an old model printer that I don't have specific experience with. However I have lots of experience communicating with Zebra printers. If you could be a bit more specific I could probably give you better information.


Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 9
(10,141 Views)

Hello Mark,

 

Thanks for the reply.

I am using LV 8.6.1. I am working on a project, which tests DUT and, at every end of the test, LV should tell printer to print date , below that , barcode and under this serial number . I have not used serial communication in labview much. Could you please help me how can i send the commands from labview to the printer ?

 

Thanks

 

Message 3 of 9
(10,137 Views)
I would take a look at the example "Basic Serial Write and Read.vi". You can find this in the examples under "Hardware Input and Output->Serial". This should give you the basics regarding how to use VISA to open and initialize a serial connection. It will also show you how to write data to the device. From what you explained I don't think you will need to read anything back from the printer. If you need specific help regarding the EPL commands to send to the printer I would need to know more specifics regarding the label you want to print. What size labels are you using, what do you want it to look like, where do you want the various fields to appear, etc.


Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 4 of 9
(10,130 Views)

Hello Mark,

I am able to communicate via parallel communication (not by using lv). I am fialed to do via serial.

I tried to communicate via parallel port using visa, it bit confusing.

 

I want to print label of size 17mmx35mm . i ahve attached document , in which i placed two label structures i wanted to print.

And can you help me how can i send ZPL command in labbview?, how does lv communicates with parallel port? TPL1?

I really need to complete this task tommorow.

Please help me.

 

Thanks

 

 

 

0 Kudos
Message 5 of 9
(10,107 Views)

Sandy,

 

Here is a modified version of the example I suggested. It includes the  option of using the parallel port for communication. I am in the process of getting some example ZPL for you for the label formats that you are using.This example should give you everything you need to communicate with the printer.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 6 of 9
(10,082 Views)
Attached is a modified copy of your label specific with example ZPL code. You can download the latest ZPL programming guides at www.zebra.com. (I tried to attach the guides but the files were too large.)


Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 7 of 9
(10,066 Views)

Hello Mark,

great! your code works , on zebra T402 printer. now I can print date, product code numbers etc.

But, how can i increament the serial number for each DUT test? and how can i set date day to day  in zpl launguage? Can i do it in lv?

 

Thanks

 

 

0 Kudos
Message 8 of 9
(10,045 Views)
Solution
Accepted by topic author sandy1
I am not sure if the printer you have has a realtime clock or not. I suspect that it does not. Therefore you should format the date and time string in your LabVIEW code and simply include that string in the label. The printer itself is not capable of generating, tracking and assinging the serial numbers to your DUT. Your application will need to do this and just like the date format the specific string and put that into the label. I strongly recommend that you download the ZPL manual from www.zebra.com. I would include on here but it is too big to be included as an attachment.


Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 9 of 9
(10,023 Views)