LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reference trigger for high-frequency, multiple-trigger sampling

Hi NI Community,

 

I am new to LabVIEW.

 

I’m using a USB-6351 with LabVIEW to capture voltage signals from two channels. Each signal has a pulse shape at around 40 Hz, and I want to capture the waveform from 2.5 ms before to 2.5 ms after the trigger point. To do this, I’ve configured the acquisition using a reference trigger.


However, the system is only achieving about 3 acquisitions per second, which is far lower than expected for this application.


My Questions:
Is reference triggering the appropriate approach for capturing many repeated short-time windows around frequent triggers?
How should I modify the code?


I’ve uploaded my LabVIEW code for reference.


Thank you very much for your time and help.

 

0 Kudos
Message 1 of 4
(116 Views)

Most community users don't have the latest version of LabVIEW. Please save your VI to a previous version, preferably 2019.

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
0 Kudos
Message 2 of 4
(100 Views)

I can't look at the new-version code, but here's an educated guess:

 

You need to trim down any DAQmx task overhead in your loop.  The best practice is to create and configure the task once only before the loop, NOT inside the loop.  Then *also* call DAQmx Control Task to set it to the "commit" state before entering the loop.  (This will optimize the turnaround time when you subsequently need to stop and restart the task.  Search on DAQmx State Model for more info.)

 

Inside the loop you should only Start, Read, and Stop the task.  I would also recommend a Producer/Consumer pattern so that the data from your Read gets deferred to parallel code for further processing.  Keep the DAQmx loop lean & tight!

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 3 of 4
(53 Views)

Small addendum: past experience teylls me that doing this with a USB-connected device will likely limit the turnaround speed compared to the same kind of device in a desktop PCIe slot.  Dunno how *much* with your particular device though.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 4 of 4
(38 Views)