10-03-2014 09:55 AM
Hello,
I am looking for suggestions to help make this VI more efficient. The VI is used in a audio acquisition program that is configurable to aquire data on up to 32 channels. The more channels I add the more likely it is to error due to filling up the buffer. Any help would be appreciated.
Thanks
10-03-2014 11:45 AM
What are you doing with this data once this loop is complete?
Are all of these channels on the same DAQ board?
10-03-2014 01:05 PM
This VI is part of a much larger project but is the most called. After the loop is complete the output data gets sent off into another file writing loop and to another live processing loop. The channels are not required to be on the same DAQ board or even in the same chassis (different tasks).
10-03-2014 01:13 PM - edited 10-03-2014 01:21 PM
Question. The channel config cluster is 2D, WHY? The values in the arrays of indices must almost have to be unique (Or you are losing data)
So sorting inside the acquisition loop on the large sets of data is probably un necessry
The lower section still sorts the data in a loop but uses that super new concatonating tunne and a parralel for loop to speed things along.
The top section shoews you how to sort your tasks so the data comes out sorted and would be prefeable
Without knowing more about your tasks (like # of channels in each) its hard to see the right ordering so excuse the final tunnel modes on both loops I think you want concatinating tunnels there too
10-03-2014 02:07 PM
I had the main for For loop labeled incorrectly, it cycles through each task/device not each chanel. This could lead to some confusion. The inside for loop cycles through each channel within each task/device. The intent here is to have a flexible data acquistion program that can handle multiple tasks/devices at the same time.
To test this I have been using 9 daq channels on 2 devices (1-9172 CDAQ Chassis with 2-NI 9229 cards and 1-NI9178 Chassis with 1-9215 card). The DAQ channels don't always need to be in order either (example: Dev1/ai0, Dev2ai0, Dev1/ai1, Dev2/ai1,....). This type of setup requires 2 tasks, and is completely configurable, if desired another chassis can be added at any time.
The inputs are as followed:
# Channels = numeric = This input is the total number of channels across all devices/tasks.
Channel Index per Device = Array of Cluster of array of indices = Each device/task adds another element to the array of cluster, each array of indicies contains location information where each channel is on a specific device in the output data array.
DAQmx Tasks = One element will be added for each device/task.
I have updated the VI.
Thanks,
10-06-2014 02:31 PM
Hi.
Are you only using DAQmx Read in your code? If you are looking to speed up your process i would recommend looking in DAQ Task State Model. This documents might help you to get started.
http://www.ni.com/white-paper/3021/en/
http://zone.ni.com/reference/en-XX/help/370466V-01/mxcncpts/taskstatemodel/