Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Why Does My Digital Read Interrupt My Digital Write When Using Easy DIO VIs?

I am using "Write to Digital Line.vi" to set the state of a digital line on my board, and then "Read from Digital Line.vi" to read the state of a different line on the same port of my board. It seems like when the READ executes, it does not maintain the state I set in the WRITE. How can I fix this?

thanks for the immediate response.
0 Kudos
Message 1 of 2
(3,183 Views)
Hello saj,

Thank you for contacting National Instruments.

The port is resetting each time you run the Read from Digital Line.vi because within that VI there is a DIO Port Config.vi that is reinitializing all of your digital lines.

If you open the block diagram for your Read from Digital Line.vi, you can wire either a constant or control into the "line direction map" connector on the DIO Port Config.vi. This connector will allow you to essentially choose which lines will be configured to be read. You can find more information about how to manipulate the "line direction map" connector within the context help.

I hope this helps! If you have further questions, let me know.

Matthew C
Applications Engineer
National Instruments
Message 2 of 2
(3,183 Views)