ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronize analog data

Hello,

 

how can I synchronize data coming from an external USB device and DAQmx? The DAQmx is buffered, sampling with a sample rate of KHz and the sampling rate of the USB device is varying and between 4 to 6 kHz. The data of the USB device is provided by another vi and can be read by a global variable. I would like to have a second vi which reads the data from the global variable and synchronize it with the data from the DAQmx. How can I implement this?

 

A sample vi which should clear things out is attached.

0 Kudos
Message 1 of 3
(3,917 Views)

Does the USB device give a timestamp for when a sample was taken (like DAQmx does)?  Other than that, you need some kind of signal on both devices to be able to synchonize properly.

 

Furthermore, use a queue instead of a global variable.  Use a queue so that you don't lose data.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(3,910 Views)

No, unfortunately the USB device does not give a time stamp.What kind of signal could I use? I just have a sensor which outputs an analog voltage which is acquired by the DAQmx and the USB device giving some measurement values taken at arbitrary times with a rate between 4 to 6 KHz. I could implement some trigger inside the USB readout VI to tell me when a sample is taken?

 

 

How can I sample the global variable with a specific sample frequency?

0 Kudos
Message 3 of 3
(3,907 Views)