LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control parallel port pin by pin

Hi!

I am doing a work where the indivual control of the parallel port pin by pin would be a great help.

The parallel port has 8 bit, from pin 2 to the pin 9. I would like to control each pin individually, puting the pin 2, 3 and 4 sending data and the others reading data at the same time for example. Or in other example, put the pins sending while getting high levels, and reading when they are in low levels, like that

Pin:       2 3 4 5 6 7 8 9
Level1:  1 1 1 1 1 1 1 1    - every pin is sending 5volts
Level2:  1 1 0 0 1 1 0 0    - pin 2, 3, 6, 7 are sending 5 Volts, and pin 4, 5, 8 and 9 reding data              

I would like to know if this is possible via VISA functions or from other functions and how can I accomplish this.

With my best regards, thank you for your help,
Alexandre Ferreira da Silva
0 Kudos
Message 1 of 2
(2,468 Views)
This is a frequently asked question. I'd dare say it probably gets asked once each month. You should look at this article:

Using VISA to Access the Parallel Port in LabVIEW

In a nutshell: You have to write/read by port. You cannot read/write by bit. This means that if you want to change the value of a single line you have to read the current value of the port, mask it to get the new value that has the line you want changed, and then write out the new value of the port.

If you also do a search in this board, or on the NI site for "parallel port labview" you will find lots of hits.

Message Edited by smercurio_fc on 04-09-2007 04:18 PM

0 Kudos
Message 2 of 2
(2,437 Views)