Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How can digital pins be used as input and output at same time?

Hello,
     I am trying to use the digital port of my NI ELVIS E-series board. The problem is that I want to use some pins at output pins and some as input pins, within the same program. I dont know how to configure the port to use it in such a way. Can anyone tell me which VI's would be the best for such an application and how to configure them, if it is required? The basic program structure is to continuously read some digital data from first 4 pins and depending on what the data is, it has to output a digital value on other 4 pins. The hardware will work in accordance to the output data.
        Please reply if anyone has done thi before or knows anything!
0 Kudos
Message 1 of 4
(3,727 Views)
 

Hi,

You'll want to set your Elvis in Bypass Mode and use DAQmx in order to read and write on the same lines (DI). Check out the Elvis User Manual, page 79. This post also has some good info.

Hope this helps, please post back if you have additional questions.

Cheers,

Andrew S

National Instruments

0 Kudos
Message 2 of 4
(3,711 Views)
Thank you for your reply. I am aware about the communication bypass VI and how to make a digital port work. Infact I have even used the digital port to output data accordingly. But my question is whether it is possible to read data and at the same time write data on digital port. For example if I have 8 lines from D0 to D8 then can I configure D0 to D3 as input lines and then configure D4 to D7 as output lines. So for this what is the VI that I would need and how do I configure it? Thanks again!!
0 Kudos
Message 3 of 4
(3,706 Views)

Hi,

To read and write on the same lines, the best place to start would be the Write Dig Port shipping example. You would then just need to add a DAQmx Read.vi. Something like this:

Also, if you just need to read from lines 0-3 and write from 4-7, you'll just want to use the "write dig chan" and "read dig chan" examples and specify the correct channels.

Hope this helps,

Andrew S

 

 

Message Edited by stilly32 on 03-05-2007 04:53 PM

0 Kudos
Message 4 of 4
(3,676 Views)