Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Averaging multiple AI samples per trigger

I am using a PCIe-6374 with NI-DAQmx in C++. I have a synchronization trigger signal coming into a digital input. During operation, this trigger signal will occur repeatedly (up to several million times) at a rate of up to about 1 MHz. However, there can be some temporal jitter in the trigger signal, so I cannot simply assume that it is occurring a precise rate. Each time the trigger signal is received, I would like to average some number (e.g., 10, as shown in the figure below) of analog input samples.

 

Does anyone know how I can accomplish this?

 

Analog Input Averaging.png

0 Kudos
Message 1 of 2
(682 Views)

You can use Retriggerable Data Acquisition with NI DAQ Devices

There is a shipping example for that:

C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Analog In\Measure Voltage\Cont Acq-Int Clk-Dig Start-Retriggerable

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