From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Syncing data from different Data Acquisition sampling rates

Solved!
Go to solution

I'm using a PXIe RT 8135.  I am sampling analog pressure signals at 10ms and thermocouples at 20ms.  I am using network streams to transfer the data from the PXIe to my host computer.  I'd like to be able to sync the timestamps of all the data to the 1ms sampling rate and record it  to a file.  

 

 

Looking into the file my 10ms sampling data ending timestamp does not match up with the 20ms timestamp, I am missing data.. I know you have to flush the queues to get the remainder of the data but is there a way to interpolate everything so all the collected data can match to a single timestamp?

 

Thanks!

0 Kudos
Message 1 of 3
(3,119 Views)
Solution
Accepted by topic author LosT314

Hi aokada09,

 

It looks like you are running into issues that arise from the parallel execution of the two loops you have.  There isn't anything necessarily tying the two loops together, so they each iterate at the rates you specified but are allowed to start whenever software (sort of randomly) dictates that they start.

 

To get solid synchronization, share a sample clock between the two measurements but run the sample clock at 100Hz for the pressure measurement and 50 Hz for the thermocouple measurement.  You should be able to use the shared clock in the backplane of the PXIe chassis.  This will be as close as possible to synchronized without the use of an additional timing card.  The only real source of delay/skew between readings at that point is the physical distance that the clock signal must travel; it will not result in large skew, but there will definitely be some (probably on the scale of high-nanoseconds or low-microseconds).  This article gives more information about synchronization and sample clocking: 

http://www.ni.com/white-paper/11369/en/

Matt | NI Systems Engineering
0 Kudos
Message 2 of 3
(3,093 Views)

Thanks for the info, that helped.

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