From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Time shift of two data sets

ok. I figured out how to run the script. I know need to generate a time channel and plot my data in time domain.

0 Kudos
Message 11 of 23
(1,858 Views)

Hi UCrg,

 

Would you please post or email me a sample data set?  If you got the curves to shift with the script, then you should already have had them plotted in the time domain-- unless you were shifting frequency spectra or something, which would be weird.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

brad.turpin@ni.com

 

0 Kudos
Message 12 of 23
(1,845 Views)

I have attached an example .tdm file. The file has two sets of data, each with several channels of data. I have already created a time channel for the data, but it is in microseconds when the units should be in nanoseconds. I don't know how to create a time channel with 0.050 microsecond delta t's. That is anothere issue. As far as aligning the signals, if you load Ch3 from PURAir3 and Ch4 from G10Air2 into a plot, you will see a couple of sharp rises in each set of data. An example of what I would like to do is line the first sharp rise in the one channel with the first sharp rise in the other set. Usually, I will be trying to line up the same channel from two different sets of data ie. channel 4 from both PURAir and Channel 4 from G10Air, but in this particular set of data, they actually line up nice on there own. 

0 Kudos
Message 13 of 23
(1,835 Views)

Brad,

 

i've been using the align rising edges script alot, specifically to align rpm, starter currents etc. if i try to use this script to align falling edges, for example battery voltage during a dead crank for three different cranks that are on differet time bases, the script will not work and sais "Could not find the rising edge for curve 1 at threshold value 11.245501...",i can put the crosshair curve curser anywhere on the curve and it will say the same thing,  could you tell me how to modify the script to align falling edges?

 

Regards,

 

Steve.

0 Kudos
Message 14 of 23
(1,630 Views)

Hi UCrg,

 

You can create a time channel with the ANALYSIS panel function "Generate Numeric Channel" in the "Channel Functions" palette.  When you say you've created a time channel in the TDM file you posted, are you referring to the "Acquired Data" channel in each of the Groups, which rises linearly from 1 to 80000?  Or are you referring to the one "TimeGenerated" datetime channel in the second group that is filled with 200,000 NoValues?

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 15 of 23
(1,612 Views)

Hi Steve,

 

I can get the script to align falling edges, but I can understand the confusion.  The way the script works is this, it notes the first intersection of the horizontal line of the crosshair cursor to the right of the vertical line of the crosshair cursor with THE FIRST CHANNEL in the graph (usually the red channel).  Then it finds the closest point to the right of the vertical line of the crosshair cursor to each of the other curves in the graph and shifts those curves so that they each are at the same location as the first curve's point.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 16 of 23
(1,611 Views)

Brad,

 

I am still unable to get this script to align falling edges. I have attached some sample data that I cannot get to align. This is battery voltage data on three different dead cranks at -23 degrees C.

 

Thanks for all the help,

 

Steve.

0 Kudos
Message 17 of 23
(1,586 Views)

Hi Steve,

 

You also need to post the corresponding TDX file (the one with the binary data values in it).  Does this new file mean that you had success with some of the other files, and only this one is causing you trouble?

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 18 of 23
(1,568 Views)

Brad,

 

Here are the two files. I have still only had success with rising edges, for example starter current on a dead crank. For falling edges (battery volts during dead crank) i am still unable to get this to work.

 

Regards,

 

Steve

0 Kudos
Message 19 of 23
(1,560 Views)

Hi Steve,

 

Now I have your data, thanks!  I see a dip region in the middle which has oscillations in it.  Are you wanting to align the falling edges into the dip or the rising edges out of the dip?  I can do both by placing the crosshair cursor to the left of the desired feature, but in the case of the rising edges out of the dip I have to first align the falling edges into the dip before I can successfully align the rising edges out of the dip.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 20 of 23
(1,544 Views)