LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Comms with parallel port

Hi
I am trying to send  a command to a printer via the parallel port, but am having no joy. I have set  the BIOS printer port setting to 'Bidirectional', and created a small test program as  attached.
I need to send an  <ESC>A, 10 (hex), <ESC>Z in order to stop the printer during a print  run,  and an <ESC>A, 11 (hex), <ESC>Z to restart the printer. I have used the functions found in the example, but maybe I'm misunderstanding the functionality of the functions?

Message 1 of 10
(4,039 Views)

Hi, 

 

Two things First are you using VISTA, the Out Port.vi and In port.vi are not compatible with Vista.  looking at your Code I do not see anything immediate that is wrong or off.  It seems to be fine for me at first glance.  You say that you have no luck with your program what is the behavior that you are seeing from the printer?  Are you receiving any errors?  if so please attach a screenshot of that error. 

 

Thank you 

 

Charley Dahan

Global Account Manager
Message 2 of 10
(4,010 Views)

Hi Charles

Thanks for the reply. I'm using XP Pro SP3. I send the command during a print run, but the printer does not respond, and no error messages are displayed. I have tried to send the command after the print run and there is still no reaction from the printer. I have also tried various loop timings. 

Message 3 of 10
(4,003 Views)

Alan,

 

Here is a link to more info on using parallel port w/LV.  http://digital.ni.com/public.nsf/allkb/B937AC4D8664E37886257206000551CB  Hope it helps.

0 Kudos
Message 4 of 10
(3,996 Views)

Hi Alan,

 

I was working on a windows 2000 sending a signal to the parallel port using a Out Port.VI and it worked fine because the format of the computer was a 378 like you have in your program; however, when i tried to use this program in a windows vista, this didnt work because the format of the parallel port of this computer was BD00-BD07, which is not written in 16 bit like your program. In order to solve this problem, i used VISA Write and it would automatically send the signal to the parallel port. Try using VISA and you shouldnt have any problems. I will send you an example VI so you can see how i used it. I also modified your VI using VISA instead of using Out Port.vi. It has an error because part of the file is missing but this should get you started. If you have any questions dont hesitate to ask. 

 

Guillermo Naranjo  

Download All
0 Kudos
Message 5 of 10
(3,990 Views)

I forgot to tell you that you have to make sure to connect pins 11 and 12 to ground; otherwise the computer will read an error and it wont send any signals. 

 

Guillermo Naranjo

 

0 Kudos
Message 6 of 10
(3,989 Views)
Thanks Guillermo. I unfortunately cannot open the vi's because I am using LV 8.5.
0 Kudos
Message 7 of 10
(3,984 Views)
Thanks Wayne, the article is quite useful.
0 Kudos
Message 8 of 10
(3,983 Views)

I will resend you the VI's in 8.5. Hope they are useful.

 

 

Download All
0 Kudos
Message 9 of 10
(3,981 Views)
Thanks Guillermo, that helps a lot. I'll give it a try.
0 Kudos
Message 10 of 10
(3,976 Views)