LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading an array of global virtual channels

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!

0 Kudos
Message 1 of 4
(2,747 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 4
(2,746 Views)

Thanks for the help, where can I find this example VI? In the forums or in the help section of LabVIEW?

0 Kudos
Message 3 of 4
(2,730 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(2,726 Views)