LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I use AI sample channels and AI Read VI's in the same program running at the same time

In my program I need to continously read from two channels and from other channels I just need to check the status of my input. I am using AI read for continous acuire of data and for other channels I want to use AI sample channels. I am wondering whether its feasible or not to use both of them at the same time.
0 Kudos
Message 1 of 3
(2,607 Views)
Hi Mudda,
It's definitely possible to use the two VIs you're talking about but I wouldn't recommend you use "AI Sample channels.vi" in your case.
You probably have those two VIs in a while loop and the problem with "AI Sample Channels.vi" is that it configures the channels at each iteration.
Prefer an "AI Config.vi" outside the while loop and then "AI SingleScan.vi" in the while loop. Don't forget to use "AI clear.vi" at the end of your application.

I've attached a VI that illustrates what I've just written.

Hope this helps !
Julien
0 Kudos
Message 2 of 3
(2,607 Views)
Mudda wrote:

> In my program I need to continously read from two channels and from
> other channels I just need to check the status of my input. I am using
> AI read for continous acuire of data and for other channels I want to
> use AI sample channels. I am wondering whether its feasible or not to
> use both of them at the same time.

If you have the different channels on different boards you can do that.
If they are on the same board you can not interrupt a simultanous
scanning operation by other DAQ operations to the analog inputs, but
will instead get an operation already in progress error.
Instead you could consider to include all channels in your scan and in
your application separate them into what you need.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 3 of 3
(2,607 Views)