08-23-2012 10:11 AM
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
Solved! Go to Solution.
08-23-2012 03:38 PM - edited 08-23-2012 03:43 PM
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.
08-23-2012 03:51 PM
Here is a code snippet that implements the regular expression detection: