ni.com is currently experiencing unexpected issues.

Some services may be unavailable at this time.

取消
显示结果 
搜索替代 
您的意思是: 

how to send command to Zebra T402 label printer using rs232

已解决!
转到解答

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 项奖励
1 条消息(共 9 条)
12,425 次查看
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 项奖励
2 条消息(共 9 条)
12,423 次查看

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

 

3 条消息(共 9 条)
12,419 次查看
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
4 条消息(共 9 条)
12,412 次查看

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 项奖励
5 条消息(共 9 条)
12,389 次查看

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 项奖励
6 条消息(共 9 条)
12,364 次查看
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
7 条消息(共 9 条)
12,348 次查看

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 项奖励
8 条消息(共 9 条)
12,327 次查看
解答
已被主题作者 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
9 条消息(共 9 条)
12,305 次查看