LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How does the AO Config VI set up the channel list and buffer when I pass in an array of DAQ channel names?

I'm generating multiple waves with different frequencies on one PXI-6713 card. My front panel includes an array of "DAQ Channel Name" controls where the user can pick his/her channels to generate the waves on. Along with this, the user can specify a frequency for each of the channels selected. I don't allow multiple names in each control and I'm not allowing undefined names, i.e. the channels must be previously set up in Measurement and Automation Explorer.

My problem arises when I pass in the array of DAQ channels to the AO Config VI and the data to be generated to the buffer. The waves are not matching up with the corresponding channels.
For example I want to generate a 300Hz signal on the channel specified by "Foo3", 200Hz on "Foo2", and 100Hz on "Foo1". "Foo1" will end up with the 300Hz signal and the others may also be mixed up. I'm positive I'm writing the correct data to the AO buffer in the proper order. Does the channel list get generated in the order the channels are passed in the array or does some sorting take place? It appears that the lowest channel number gets assigned the first chunk of the buffer and then the next lowest gets the next piece. So if the order of the channel names weren't input lowest to highest the corresponding waves don't generate on the right channels. Note that if I allow undefined names in the DAQ channel name control and the actual channel numbers are input in any order then my VI works as desired. Thanks for your help.
0 Kudos
Message 1 of 4
(2,873 Views)
Here is an example of the specific problem I am having. If I replace the channel names with actual channel numbers, the VI works as expected; otherwise, the waveforms do not correspond with the correct channels.
0 Kudos
Message 2 of 4
(2,873 Views)
Van,

Thank you for the example. I was able to verify your behavior and have informed the proper channels. My best suggestion for a workaround is to use raw channels in their stead. I was not able to reproduce this using say "0" instead of "Test AO0".

Thank You,
Ryan Mosley
National Instruments, Applications Engineer
http://www.ni.com/exchange
Message 3 of 4
(2,873 Views)
Van,

After some more investigation, Ryan and I have determined that there are two workarounds:

1) Use scaled data instead of the waveform datatype.
2) Use raw channel numbers instead of virtual channel names.

Thank you for bringing this issue to our attention. I am attaching a modified version of your VI that implements workaround #1.

Regards,
Erin
Message 4 of 4
(2,873 Views)