LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Combine 2 data files from different systems for sync

Hi, 

 

Question not directly related to Labview but I aim to solve it with Labview, not sure which board would be best. 

I have 2 data files for the same experiment, one from a DAQmx and one from a different system. 

I'm trying to figure out the best way to combine those 2 files. In a way that they can be plotted vs the same X as precisely as possible. 

I'm struggling about the way to do it even before the implementation into Labview. 

 

The 2 files share one column (third column in the files), one channel which they both acquire for synchronisation purpose. 

The 2 systems can be but are not always at the same acquisition rate (not in the attached example). 

Both systems are started 'at the same time' but they don't share clock/trigger or anything so I'm trying to combine them based on the third column and not the 'time' columns. 

 

Attached an example of both files. 

 

Thank you, 

0 Kudos
Message 1 of 6
(265 Views)

I can not get first file, probably because of the comma in the name. 

Looks like you can just find position where you sync signal starts. This will give you time offset for each file. If you know frequency difference (ratio), you can scale time scales

find 0.png

 

0 Kudos
Message 2 of 6
(221 Views)

@Patrem1 wrote:

Hi, 

 

Question not directly related to Labview but I aim to solve it with Labview, not sure which board would be best. 

I have 2 data files for the same experiment, one from a DAQmx and one from a different system. 

I'm trying to figure out the best way to combine those 2 files. In a way that they can be plotted vs the same X as precisely as possible. 


I do not understand the function of the third column, but why not interpolate your data for both data sets; once interpolated you can plot on the same x-axis, same points.

 

mcduff

0 Kudos
Message 3 of 6
(208 Views)

What do you mean interpolate? 

The third column in a value from a third system for sync purpose. 

System 1 (Third column) -> System 2

                                        -> System 3

0 Kudos
Message 4 of 6
(157 Views)

Strange sync signal, looks like it has lost fractional digits. I think it will be enough to find time point where extrapolation of this sync signal is 0.

If you get it for both files, it is your common point and you can shift time scales.

find 0.png

 

 

0 Kudos
Message 5 of 6
(136 Views)

So I understand that I would find where the 0 would be 'between' data points in each file. 

But I'm not sure how to shift time scales. 

I understand this would have to do with resampling but I've never done it. 

 

The sync signal did not loose digits, the third system is slower. 

 

I attached 2 new files without commas in file name. 

 

EDIT : This might be clearer if I explain the whole thing better :

A camera sends a pulse each time it takes a frame, it is recorded by 2 other systems. This is the third colomn in each file. 

So right now they are sync with the camera but I would like to combine those 2 files together. 

0 Kudos
Message 6 of 6
(95 Views)