LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use the parallel port for inputs

Greetings all,
I have a very simple project in which I need to toggle a couple of outputs and read back two inputs. The outputs I've gotten to work just fine, but the inputs seem to be a bit more complicated.
I have two microswitches on a pneumatic slide, and I need to know their state. I'm using the 5V available from the parallel port to switch a PhotoMOS relay, and a 24V power supply to control a pneumatic solenoid. I've read that it is necessary to set certain pins on the parallel port high in order to make them bidirectional. What is the best way to do this?
I'm using a small, VISA vi that I grabbed from NI, and I need to know how to modify it. I'm running LabVIEW 7.1 on Windows2000, and please keep in mind that this is my very firsy LabVIEW project.
Can anyone help me?
0 Kudos
Message 1 of 4
(2,699 Views)
I haven't done any direct parallel port access in quite a while but you may have to make a change in the computer's BIOS setting for the parallel port. I haven't used it in a long time because customers don't like the risk of attaching things to the MoBo of their computers and few of them have seperate parallel port boards these days (although a lot are coming without parallel ports so that may change too!)

Good Luck with your project, keeping asking questions here when you have them!

Putnam Monroe
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 4
(2,699 Views)
Hi,

find attached a simple Parallel-Port-Test-Program.........

There is no need for your project to set different Pins on a certain state in order to
set the LPT-Port to Input direction.
In commented Diagram you will see, which Pins ( 5 status lines )are direct available for Input.

Change the example to your needs - I too use W2k & LV7.1.1 .......... and forget VISA.
In "vi properties / Documentation " you can find my private email-addr. ; if there are still
open questions................

Have a nice weekend - I have alredy cleaned my Inline-skates for a Marathon on Sunday......

Regards
Werner

additional comment:
if you really need to be bidirectional with LPT-Port,
then a 0x20 to LPT-Port-Control-Address has to be written ( this is not a physical line )
Find a lot about using Printerport @ Jan Axelsons website.... http://www.lvr.com/parport.htm
0 Kudos
Message 3 of 4
(2,692 Views)
shi.....

the attachment got lost - because of "Preview Post"

here again....
0 Kudos
Message 4 of 4
(2,690 Views)