08-02-2023 10:30 AM
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?
08-02-2023 12:04 PM
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