Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

how to speed up AI_buffer_read.vi with conditional retrieval?

I am sampling data with a PCI-MIO16E4 DAQ card and want to perform some kind of sophisticated gated scanning which is not possible with the hardware gated scanning mode.
That's why I was using the conditional retrieval option of AI_buffer_read.vi: Twice reading the "read mark" after a conditional retrieval (=software start&stop trigger) allows for determining the buffer region where some external gate is, e.g., low. A third time using AI_buffer_read.vi finally acquires the data in this buffer region.
Unfortunately this method turned out to be very slow, which becomes worse if used in a loop. The LabVIEW profile tool revealed that AI_buffer_read.vi becomes much slower when conditional retrieval is switched o
n.
Is there a way to significantly speed up conditional retrieval?
0 Kudos
Message 1 of 3
(2,670 Views)
Conditional Retrieval is slow in nature. The reason is that the transfer is done using interrupts instead of DMA. In addition, the processor has to check every value as it is transfered from the DAQ device to see if the condition has been met. There fore, you are not only transfering the values, but also reading every value.

If this approach is to slow, I would recommend using hardware triggering. The PCI-MIO-16E-4 supports hardware triggering, which is much faster than conditional retrieval.

I hope this helps.

Joshua
0 Kudos
Message 2 of 3
(2,670 Views)
Hi Joshua,

thanks a lot for your answer!

The reason why I don't use hardware triggering is the following: I want to acquire data when an external trigger line goes low and stop acquiring when the line goes high. But I want to do this for 30 consecutive triggers, and I want to be able to distinguish between every of the 30 "shots". I did not find a hardware trigger solution for that problem, so I tried the conditional retrieval option.

After your hint I wrote a vi which reads the buffer without conditional retrieval. The triggering is done with normal labview code based on the Array_Threshold.vi. This method is surprisingly fast and works fine!

Nevertheless, if you have some idea for the hardware triggering, please let me know!

Many greetings,


Tobias
0 Kudos
Message 3 of 3
(2,670 Views)