Quantcast
Viewing all articles
Browse latest Browse all 69005

Retriggered acq with high trigger rate: stopping acquisition

Hi NI community:

 

My application requires digitally retriggered acquisition at a reasonably high trigger rate (> 30kHz) and sample rate (>= 500kHz) on a single analog input channel of an X-series PCIe DAQ card. My implementation is attached. I find that at some maximum trigger rate, the while loop takes too long to execute, and I run into a buffer error as expected.  This maximum trigger rate is reduced by any complexity I add to the contents of the while loop, so ideally I'd like nothing except the acquisition there.

 

The problem I'm having is how to stop the while loop at the appropriate time. I need to stop when I acquire a certain trigger, or after a certain amount of time has passed. Right now I'm using an elapsed time VI, but that slows down the loop by a factor of 2 or so. Is there a tricky way to halt the acquisition at a particular time without putting anything inside the while loop, either by using the "Time Elapsed" function, or with an external trigger? Maybe through the use of an event structure, or by dynamically changing the trigger source?

 

Alternatively, is there a more efficient way to implement the retriggering?

 

 

EDIT: Using tick counts instead of elapsed time speeds up the loop, but it would still be better if I could stop using an external trigger.

 

 

Application details:

I expect the triggers to come at uneven intervals within some tolerance, and I need to acquire several samples per trigger for SNR reasons. I don't know the number of triggers ahead of time, but I have a rough estimate of how long the acquisition should take. 

 

Best regards,

Brad


Viewing all articles
Browse latest Browse all 69005

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>