Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use NIDAQmx to determine number of correlated DIO lines?

Solved!
Go to solution

How can I used NIDAQmx to determine the number of correlated DIO lines that a device supports?  For example, the NI6225 supports 8 lines of correlated DIO while the NI6229 supports 16 lines of correlated DIO.  How can I used NIDAQmx to determine the NI6225 only supports 8 lines while the NI6229 supports 16 lines?

 

I moved this question from a previous thread.

 

Thanks,

 

Ian

0 Kudos
Message 1 of 3
(3,116 Views)

For our M series (62xx) and X (63xx) series Multifunction DAQ cards, only port 0 has correlated DIO lines. One way to find out how many lines are in port0 by pulling all the DI Lines from the DAQmx Device Property Node, matching the lines to a regular expression for port0 and counting all the elements that match.

 

One caveat is that E series (60xx) does not have any correlated lines, so this example won't work for that case. To fix this, you could detect which kind of card it is by using the ProductType DAQmx Device Property and filter out only the M and X series cards.

Steven K.
National Instruments
Software Engineer
0 Kudos
Message 2 of 3
(3,106 Views)
Solution
Accepted by I_B

Here is a code snippet that implements the regular expression detection:

 

DIOLines.png

Steven K.
National Instruments
Software Engineer
0 Kudos
Message 3 of 3
(3,101 Views)