Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I write to individual lines on 2 different ports 0&1 without changing the state of any of the other lines for those ports?I have a PC-DIO-24 DAQ Board connected to an ER-16.

I've tried configuring the ports first,before writing to them,but not sure if I'm using the right DIO config VI.
0 Kudos
Message 1 of 3
(4,011 Views)
Take a look inside the Write to Digital Line VI. You can view this VI's front panel and diagram by just double-clicking on it. This VI calls DIO Port Config (setting up the port as an output port) and then DIO Port Write. The DIO Port Write uses a line mask to make sure that only the desired line is written to.

In order to implement this on two different ports, you would call the DIO Port Config for both ports (0&1) and then use two DIO Port Writes, masking out the unwanted lines.

The PC-DIO-24 board has the 8255 digital chip, which will clear all all ports whenever a port is configured. That makes it very important for you to configure all of your ports before you do any reading/writing. Good luck!
Message 2 of 3
(4,011 Views)
We modified the Write to Digital Line by adding the Task ID input. The idea is

1) Configure the port (iteration = 0) --> specify device and port. This is done only once at the beginning of the programm.
2) Then you use the task ID to write to a line of the port (iteration <>0).

I add a example to show you the general idea.
Download All
0 Kudos
Message 3 of 3
(4,011 Views)