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 3
(2,781 Views)
Van;

I believe the problem is inside your VI. I'm saying that because the order you enter the channel number on the DAQ I/O array is going to be the order the waveforms will be assigned to those channels. As an exercise, I've created two analog output virtual channels, and input those on hte attached VI. That VI allows you to choose different waveforms to be generated on the chosen channels. Out1 is outputing at channel 0 and Out2 at channel 1. If I invert the selection on the channel field, the firts waveform is generated at channel 1 and the second is generated at channel 0.
Hope this helps.
Filipe Altoe
Application Engineer
National Instruments
0 Kudos
Message 2 of 3
(2,781 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 3 of 3
(2,781 Views)