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.
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.
09-14-2009 11:50 AM
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
09-14-2009 11:58 AM
09-14-2009 12:03 PM
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
09-14-2009 12:21 PM
Well, you could have mentioned that in the first place instead of just asking for an example.
For VISA, you can search NI Developer Zone. One such example is here.
09-14-2009 12:34 PM
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,
-VJ
09-14-2009 12:50 PM
09-14-2009 01:07 PM
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
09-14-2009 01:10 PM
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?
09-14-2009 01:20 PM
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
09-14-2009 01:26 PM
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.