LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can I connect to my zebra 105sl printer through LPT port?

I have a Zebra printer, now i want to use visa to connect my printer through LPT port.

0 Kudos
Message 1 of 9
(5,979 Views)

can i get your help? thanks.

0 Kudos
Message 2 of 9
(5,976 Views)

First, I would say you need to have a little patience. Not all posts get replies as soon as they are posted. The vast majority of the people here are volunteering their time and can montior the forums continually and provide immediate responses.

 

To answer your question you would use VISA to conect to the printer. Open a VISA session using the string "ASRL10::INSTR". From that point on you simply use VISA Write and VISA Read 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 3 of 9
(5,960 Views)

Hi Mark,

 

I am having the same problem. I am having trouble communicating with my Zebra Printer. I have attached the code the way you have suggested. I would really appreciate if you can analyze the code and explain what I am doing wrong. By the way the Error I am receiving from the VISA Read is: -1073807339  ( VISA Read in Host Identification.vi ).

The interesting thing is that when I open Zebra Setup Utility, there is a option to communicate to the printer directly.So when I give the same ZPL commands I can actually see the response from the printer.

 

Thank you very much

 

0 Kudos
Message 4 of 9
(5,816 Views)

First comment is that the ^XA and ^XZ are not required for the ~HI command. Tilda commands are executed immediately and do not need to be within a ^XA/^XZ block.

 

When you use the Zebra Setup Utiliy are you communicating via the parallel port? Is the Zebra Setup Utility running while you execute your LabVIEW code? Have you verified that the parallel port is on COM 10?

 

Your code should work. I don't see anything particularly wrong. The only thing you can try is to cast the string to a VISA resource.

 

host_identification.png



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 5 of 9
(5,812 Views)

Mark, why are you responding while you're supposed to be listening at the CLA summit 😉

Message 6 of 9
(5,791 Views)
Because he is just that awesome!
Message 7 of 9
(5,784 Views)

@PhillipBrooks wrote:
Because he is just that awesome!

He saw Zebra and couldn't resist! I joked with him about it tonight 

0 Kudos
Message 8 of 9
(5,777 Views)

Mark,

 

Thanks for you fast response. I was able to make it work. I had to go to My Computer-Properties-Device Manager-Hardware-COM/LPT Ports-LPT1 Port- Properties-PortSettings-Select using interrupt. After doing that I was able to communicate via LPT port just fine.

 

Again thank you very much for you suggestions.

0 Kudos
Message 9 of 9
(5,761 Views)