From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

parallel port visa

Hi,

 

 

I am looking to write a program that writes a value in to the parallel port in one machine, and another program that reads this value in the other machine and the machines connected through parallel port.

 

Is there any vi that does this in a simple manner. Or can I use VISA for read and write? Can anyone suggest how to accomplish this?

 

Thanks,

Vijay

0 Kudos
Message 1 of 15
(5,123 Views)
Have you looked through the examples? That should always be the first place to look. all you have to do is go to Help>find Examples and on the Search tab, enter 'parallel' as the keyword. You will find two about the parallel port.
0 Kudos
Message 2 of 15
(5,119 Views)

Hi,

 

But the examples that are given for parallel read and write says that it uses the inport and outport which are not supported for vista.

 

-VJ

0 Kudos
Message 3 of 15
(5,113 Views)

Well, you could have mentioned that in the first place instead of just asking for an example. Smiley Wink

 

For VISA, you can search NI Developer Zone. One such example is here.

0 Kudos
Message 4 of 15
(5,104 Views)

Hi,

 

I tried that example just a while ago after my first post and I got " VISA:  (Hex 0xBFFF0015) Timeout expired before operation completed." error while executing it.

 

If I include a "Wait until next ms multiple" in the while loop and give the input at 200 ms, I don't get that error.  

 

But if I try to read the data from the other computer through VISA Read, I am unable to read whatever I write.

 

Thanks, Smiley Happy

 

-VJ

0 Kudos
Message 5 of 15
(5,097 Views)
Then using Visa for output I know one of the control pins on the parallel port has to be tied to ground.  I do not remember which but it is mentioned in one of the lpt papers found on the NI website (I guess it is pin 10, or 11 😉 )


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 6 of 15
(5,092 Views)

Hi,

 

Do you mean this?

 

http://zone.ni.com/devzone/cda/epd/p/id/4213#0requirements

 

What do you mean when you say pins 11 and 12?

 

Where do I do this and how to do this? I have a parallel wire from my computer and a female to female parallel port connector cable and again the parallel port wire for the other computer. 

 

How do I ground and where?

 

Thanks,

VJ

 

 

0 Kudos
Message 7 of 15
(5,085 Views)

I tried that example just a while ago after my first post and I got " VISA:  (Hex 0xBFFF0015) Timeout expired before operation completed." error while executing it.

 

If I include a "Wait until next ms multiple" in the while loop and give the input at 200 ms, I don't get that error.  

 

But if I try to read the data from the other computer through VISA Read, I am unable to read whatever I write.


If the computer that is supposed to read tries to do so before there is data at the port, it will wait a certain amount of time until it gets something. If nothing arrives before the given time, it will timeout.

By including a wait in your loop, you are essentially extending the timeout period, and the data sent from the Write computer was received.

 

Before you try wiring something up in LabVIEW, can you accomplish this communication in Hyperterminal?

Cory K
0 Kudos
Message 8 of 15
(5,081 Views)

The computer sending data can use Visa. But I guess you have to use port IO on the other end. You set or reset pins on the LPT by writing to registers.

Take a look here for the protocol, and other info

http://www.beyondlogic.org/spp/parallel.htm



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 9 of 15
(5,073 Views)

Hi,

 

I have not tried hyperterminal, but the timeout that you said seems logical for a read vi. But I get this when I try to run a write visa vi. I used the example given in this document "http://zone.ni.com/devzone/cda/epd/p/id/4213#0requirements" and put in a Wait until next ms multiple with 200ms and tried. It gives the same error without the wait. Sometimes it doesn't give. But most of the times, I get this error and my program terminates.

0 Kudos
Message 10 of 15
(5,070 Views)