LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx - Getting an Array of Channels (not List)

  Dear NI Technical Support,
 
I set multiple channels for a DAQ task with something like "Dev1/ai1:5,Dev1/ai8,Dev1/ai10:Dev1/ai11" (uses a list and 2 types of ranges). I would like to find out whether it is possible to feed this to a DAQ VI or DAQ property and get back an array of single channels (Dev1/ai1,Dev1/ai2,Dev1/ai3,...)?
 
I have already written a function to do so (supporting the above format), but am worried about compatibility of my function with future versions of LabView/DAQmx, which might be able to step over devices as well. From the point of view of forward compatibility, it would be better to be able to obtain a list/array of the channels from LabView rather than rely on my own subroutine.
 
Could you please let me know: (a) what is my best bet in the situation, and (b) what plans does NI have towards extending the format specifying the devices for DAQmx.
 
Thanking you in advance.
 
Sincerely
Albert Lysko
0 Kudos
Message 1 of 5
(2,984 Views)

Even though I'm not NI Technical Support, if I understand you correctly, all you need to use is the DAQmx Unflatten Channel String.

If there is something specific that you don't like (or understand) about the way to specify channels and devices, you might want to provide some details and if there is a change you would like, the best place for suggestions is the Product Suggestion Center

0 Kudos
Message 2 of 5
(2,981 Views)

   Dear Dennis,

Thank you for your input. Could you please tell me where do I find that function (how to get there)? I looked around and could not find it. Maybe it is due to oldish LabView - verison 7.1.

Regards

Albert

0 Kudos
Message 3 of 5
(2,960 Views)

All you have to do is use the search button on the Function palette. It's a powerful tool when you can't remember the exact palette but know some or all of the name. The search will find it on the DAQmx>DAQmx Advanced>DAQmx Utilities palette.

 

0 Kudos
Message 4 of 5
(2,957 Views)

HI Albert,

The DAQmx Unflatten Channel String, will take your string and convert it into an array with each element representing a channel. If you wish to have this array populated programmatically you can use something similar to the following VI which will populate an array with all of the channels, which you can use the elements that you wish.



Message Edited by jaced on 11-21-2007 01:33 PM
JaceD
Signal Sources Product Support Engineer
National Instruments
0 Kudos
Message 5 of 5
(2,955 Views)