LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

daqmx data extraction by name?

I am reading many channels that can change frequently and have them set up as tasks through MAX and am using daqmx vi's to configure and sample them. Daqmx read analog 1d nchan 1 sample is used in a timed loop. I would like to associate the channel names with their data array indices to facilitate extracting individual channels. Can this be achieved w/o hardcoding the channel names or indices? Can the channel names i/o constant be pushed into an enum, for instance? It is not obvious to me how to accomplish this.

Thanks for your help
0 Kudos
Message 1 of 4
(2,509 Views)
Hello ECS,

If you go to the following palette in LabVIEW, you can use the DAQmx Task Property Node to get an array of the channels that are part of the task.

NI Measurements >> DAQmx - Data Acquisition >> DAQmx Advanced >> DAQmx Constants and Property Nodes >> DAQmx Task Property Node

Select the Channels property and you will get an array of all the channels that are in the task. This means that you now have each channel associated with an index for an array. This should give you just enough to be able programmatically select rows of data from DAQmx Read based on the channel name.

I hope this helps!

Take care,
E.Lee
Eric
DE For Life!
0 Kudos
Message 2 of 4
(2,492 Views)
Thanks for your response E.Lee,

I have pulled up the Property Node as you indicated and linked it to my task but can't find 'Channels' under the Properties. I do find 'Channel/Signal Type', but that appears to be an integer, not the expected array. Am I missing something? I am running LV 7.1...

Thanks,
ECS
0 Kudos
Message 3 of 4
(2,477 Views)
Hello ECS,

I actually found a shorter path to the property node. I've attached two images, one shows where the property node is on the palette and the other shows the actual property. I hope this helps!

Take care,
E.Lee

Message Edited by E.Lee on 05-11-2005 01:44 PM

Message Edited by E.Lee on 05-11-2005 01:45 PM

Eric
DE For Life!
Download All
0 Kudos
Message 4 of 4
(2,467 Views)