LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Add a priority for the EXAMPLE-VI: simul Ai read/Ao write

Hi,

I'm using the example "simul Ai read Ao write.vi".
But there is 1 problem. While i'm sending and receiving samples I want to do some other calculations... When i'm doing that in my while loop, the sample rate/sec is slower. Ok, thats what i expect because the loop is already busy with sending and receiving.
So is it possible to do some calculations between de samples of the loop??? I need to do my calculations without disturbing my sample-rate!
thanks!
steve
0 Kudos
Message 1 of 2
(2,590 Views)
Agaa,

When you do an AI Read, the data must be available to read from the buffer, or it waits until it is there. Therefore, the Data Acquisition thread is locked up, and no other data acquisition VIs will run until this AI Read is finished.

To get around this problem, check out the example /examples/daq/anlogin/anlogin.llb/Cont Acq&Chart (Async Occurrence).vi. This VI uses occurrences (like an interrupt), where the AI Read waits until the occurrence is set, and the occurrence is set when the data is available in the buffer. This allows your CPU to do other functions in the meantime, including other data acquisition calls.

Mark
0 Kudos
Message 2 of 2
(2,590 Views)