LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control Paralel Port using bits two by two

Hello everybody and thanks for the interest shown on my question,

I have build a VI that allows me to control the 8 data bits of the Parallel Port one by one, but, as I want to control a motor that can turn one way or the opposite, I have to get the bits two by two.
What I need is 4 swithces of three positions, so as to control four motors. For example, switch 1 sends signal by bit 1 in first position, sends signal by bit 2 in second position and doesn't send signal in third position.  Switch 2 sends signal by bit 3 in first position, sends signal by bit 4 in second position and when in third position doesn't send signal.
And this with the four of them.
Has anybody any idea how can I do it?

Thank You,

QoergTux
0 Kudos
Message 1 of 3
(2,614 Views)
Hi QoergTux,
 
Can you do something with these two basic examples ?
0 Kudos
Message 2 of 3
(2,588 Views)
What method are you using to write to the parallel port?  The normal method you would use to update some of the bits on the parallel port would be:

1. Read from the parallel port

2. Modify the bits you are interested in

3. Write the value back out to the parallel port


The actual method of doing this depends on how you are controlling there parallel port.  If you are using NI-VISA to write to the parallel port, you will be unable to read from the port using NI-VISA.  You could get around this by storing the last value you wrote to the port, and using that as the starting point for your following write.  The difference between writing a single bit and two bits should be minimal.
0 Kudos
Message 3 of 3
(2,568 Views)