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 using AO Write. The waves are not matching up with the correspon
ding 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. 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. 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. I have posted a very simple example of my problem as an answer to this question at the following link (it has the same title as this question if the link fails):


http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=50650000000800000029240000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0

Thanks for your help.
0 Kudos
Message 1 of 2
(2,738 Views)
There one of a couple workarounds to this. I mentioned one in your other post linked above (use raw channels instead of virtual). Another would be to use scaled instead of waveform data. I've found that using waveform data, I have no difficulty with channel ordering.
Message 2 of 2
(2,738 Views)