DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronising data from several sources

I have data recorded in two different formats, one in DIAdem & other one in a different format. I have converted the other one in DIAdem format. Recordings were simultaneous. I have few common channels (data) in both of them. I want to synchronise these two readings as there might be some phase shift or some difference in sample rate. I want to bring in data channels from the other fornat into DIAdem. Any pointers will be extremely helpful as I am a beginner in DIAdem.
 
Thanks in advance,
 
With warm regards,
Saurav
0 Kudos
Message 1 of 6
(4,003 Views)
Hello Saurav!
 
Have a look at the 'ChnMapLinCalc' command. An example how to use it can be found in this thread.
 
Matthias
Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 2 of 6
(4,000 Views)

Thanks for the pointer, Matthias! However, my problem still persists. I currently have the German version of DIAdem and I do not understand German well. I tweaked the code snippet a little bit given in the preceding post, but it did not work as I intended. It will be great if somebody can help me in finding a downloadable English version of DIAdem's html help or send me a code snippet for solving my issue. Here is the exact problem description:

I have two channels, both recording same physical variable with different measurement systems. One of them is sampled at every 0.8 ms & the other one at every 10 ms. The start of both the recordings are not synchronised. I expect them to have some offset or delay between them. I want the channel with 0.8ms sampling rate to be sampled at 10ms and to calculate the start offset between these two channels to synchronise them.  

Thanks in advance,

With warm regards,
Saurav

0 Kudos
Message 3 of 6
(3,959 Views)

Hi Saurav,

What you describe is exactly the use-case for the ChnMapLinCalc() function.  Do you want to change the start time offset to align the two curves horizontally, or do you just want to calculate that offset for other purposes?  Are your channels waveforms, or do you have an explicit time channel for each?  If you have waveforms, you can manually edit the "Waveform x-offset" channel property, or you can programmatically edit the "wf_start_offset" channel property.  If you have time channels, you can use the ChnLinScale() function to add a scaler offset to one of the time channels to force them to start at the same time.

We still recommend that you download the DIAdem 10.2 English version from NI, which you can get from:

https://lumen.ni.com/nicif/us/evaldiadem81/content.xhtml

You should be able to use your current "German" license with the downloaded English DIAdem,
Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 4 of 6
(3,949 Views)
Thanks, Brad! I have downloaded the English version.
Regarding the signals, I have explicit time channels for my signals. I want to align the curves horizontally and I want to do this programmatically. I have a lot of such pairs & hence I need to automate this task.
 
With warm regards,
Saurav
0 Kudos
Message 5 of 6
(3,928 Views)

Hi Saurav,

Well then, you have to decide which time channel to shift and which time channel to leave the same.  For each pair of curves you need to calculate the time offset, then use this in the ChnLinScale() function to subtract the time offset from all values of the time channel you decided to align.  You can calculate the time offest by using the CMin() function to read out the first (=minimum) value of each time channel and then subtract the two to get the offset.  It sounds like you will need to loop over these steps for each such pair of channels.

Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 6 of 6
(3,919 Views)