06-09-2021 04:16 PM
Is it possible using DAQmx and LabVIEW to create a non-sequential channel task list such as \Dev0\Port0\Line0,2,1 to use as the "task in" to Create Channel ?
Or does each line number in such cases needs to individually have its Dev and Port prepended as in :
\Dev0\Port0\Line0, \Dev0\Port0\Line2, \Dev0\Port0\Line1 ?
I am aware that \Dev0\Port0\Line0:2 can be done if sequential
06-09-2021 04:40 PM
I meant to say
/Dev0/Port0/Line0,2,1
It seems that an array must be built such as :
/Dev0/Port0/Line0
/Dev0/Port0/Line2
/Dev0/Port0/Line1
and then use DAQmx Flatten Channel String to produce a single string with comma separated lines, each with its device and port prepended.
I found it not possible to include the same line number more than once in the task list, although for analog input that is acceptable.
06-09-2021 09:54 PM
To use lines in the order 0,2,1 does not require specifying
"/Dev0/Port0/Line0, /Dev0/Port0/Line2, /Dev0/Port0/Line1"
Since the last two lines are sequential, it is sufficient to instead just have :
"/Dev0/port1/line0, /Dev0/port1/line2:1"
as learned by examining the output of DAQmx Flatten Channel String from the array :
/Dev0/Port0/Line0
/Dev0/Port0/Line2
/Dev0/Port0/Line1
I would have hoped/liked/assumed that if DAQmx can accept and figure out how to use a specification of .../line0:2 that it would also be able to take .../line0,2,1 and similarly apply the preceding /Dev and /port specification and apply that to any lines after that.