12-19-2012 09:08 AM
Hello,
I am very new to LabVIEW and I would like to intilize and read multiple AI channels without using the express VI in my loop so it doens't slow down my program. My thought was to make a sub-VI that output an array of AI global virtual channels I created in DAQmx and place that outside my UI loop then pass the array to a read function. I tried to feed this array into the DAQmx read function but even if I change it to multiple channels in the drop down menu I still get an error. What am I doing wrong?
Thanks!
12-19-2012 09:15 AM
I think what you really want to do is create a DAQmx Task from the channels. You then use the DAQmx Read on the task.
Have a look at the DAQmx Create Virtual Channel VI. You can use this in a FOR loop (use a shift register for the task) to add each channel to the task.
12-19-2012 10:18 AM
Thanks for the help, where can I find this example VI? In the forums or in the help section of LabVIEW?
12-19-2012 10:31 AM
I was atually telling you about a VI in the palettes. But after playing with it, it only accepts Physical Channels, not the virtual global. If you want to use the virtual global channels, why not just create a task in MAX to use those channels. You can then perform your read on that task.