LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HELP: AI Buffer Read.vi triggrting

I'm using AI Buffer Read (waveform).vi to acquire a waveform. It seems that
once the VI is entered it blocks all other LabVIEW activity until either
it completes
the acquisition cycle or it times out while waiting for the
start-acquisition trigger.
I'd like to know if there is a way to allow other activity to occur
while waiting for
the acquisition to complete.

I realize I could perform a series of single writes from within a loop,
but my sample
rate is too high for that. What I'm actually trying to do is setup the
acquistion and
then do some other things inside LabVIEW that result in a hardware
trigger that begins
the acquisition cycle. As it is now, I call AI Buffer Read and then it
just sits there
waiting for the trigger
which never happens because the trigger never
gets fired.
*sigh* Sometimes I think I just shoulda' used C....

TIA

--

Hugh
hughs@tetonvalley.net
0 Kudos
Message 1 of 4
(3,047 Views)
AI Read (buffered) is the right VI. It only transfers a previously acquired buffer. The problem you described arises rather when using the all-in-one vi's like "Acquire waveform".
So use "config" and "control(start)", then fire your trigger and then collect with "read" what you've gathered.
7.1 -- 2013
CLA
0 Kudos
Message 2 of 4
(3,047 Views)
Hugh;

This is happening due to the fact the VI you are using performs a synchronous DAQ operation, meaning that once the AI Read.vi is reached, that VI will suck all the CPU time up, till the acquisition is done. So you won't be able to run other tasks in parallel.
To fix that problem, you will need to run an asynchronous DAQ task. You can find a good example about that at Search Examples->I/O Interfaces->Data Acquisition->Analog Input->DAQ Occurrences and select the second VI on the list, from the top.
That VI won't take all the CPU resources over and will allow other tasks to run.
Hope this helps.
Filipe
Message 3 of 4
(3,047 Views)
Yes, this was exactly the solution that I was looking for. Thank you.

Hugh

Filipe wrote:

>Hugh;
>
>This is happening due to the fact the VI you are using performs a
>synchronous DAQ operation, meaning that once the AI Read.vi is
>reached, that VI will suck all the CPU time up, till the acquisition
>is done. So you won't be able to run other tasks in parallel.
>To fix that problem, you will need to run an asynchronous DAQ task.
>You can find a good example about that at Search Examples->I/O
>Interfaces->Data Acquisition->Analog Input->DAQ Occurrences and select
>the second VI on the list, from the top.
>That VI won't take all the CPU resources over and will allow other
>tasks to run.
>Hope this helps.
>Filipe
>
0 Kudos
Message 4 of 4
(3,047 Views)