Digital I/O

Showing results for 
Search instead for 
Did you mean: 

Can you mix digital inputs and outputs in a task?

I am new to the DAQmx API and have found the documentation to be a little terse. It states that all channels in a task must be the same type but it doesn't explain what is meant by "type".  I am assuming that at analog channels and digital channels are two different types. What is not clear is whether digital inputs and digital outputs are considered one type ("Digital") or two types ("Digital Input" and "Digital Output"). Bottom line question is whether both digital input and digital output channels can be included in a single task.


0 Kudos
Message 1 of 2

"Type" refers to both the type of signal (digital or analog) as well as whether it is input or output. For instance, analog input and output cannot be included in the same task. That having been said, it is possible to perform a DAQmx read on a digital output task. This feature can be used to "snoop" the state of the line. Are you using LabVIEW? For examples of specific operations (we have one for most any basic application), please check out the LabVIEW example finder (Help->Find Examples). Under "Hardware Input and Output"->"DAQmx," there should be plenty of examples of valid DAQmx tasks.

Hope this helps,
Ryan Verret
Product Marketing Engineer
Signal Generators
National Instruments
0 Kudos
Message 2 of 2