This function can be used to calculate the time offset (delay) between two data files. Example: Data files from two different data loggers that have been triggered manually.
Both data files must have a time signal and a sync channel. For example: engine or vehicle speed.
The time data must be measured in the same unit, i.e. seconds. The resolution in both files can be different.
The time offset is calculated by a cross correlation, therefore, the sync signal should not be constant. If the calculation of the offset fails the offset can be set manually.
Return Value
Name of the NC file.
Parameters
ssNCFile1 is the name of a NC file.
ssTime1 is the time channel name of file 1.
ssSyncChannel1 is the signal name of file 1.
ssNCFile1 is the name of a NC file.
ssTime1 is the time channel name of file 2.
ssSyncChannel1 is the signal name of file 2.
If bMerge is TRUE (1), the channels of both files will be merge into one file. Default value is TRUE.
If bInterpolate is TRUE (1), the channels will be interpolated onto one time base. Default value is TRUE.
If bUseOffset is FALSE (0), the delay will be calculated. If TRUE (1) the offset can be set in the parameter rsOffset. Default value is 0.
Is the time offset. Is used if bUseOffset is TRUE (1). Default value is 0.
If nUseTimeChannel is set to 0 a dialog box will be displayed to select the time channel for the interpolation. If set to 1 the time channel of the first data file is used for the interpolation. If set to 2 the time channel of the second data file is used for the interpolation. Default value is 0.
Example
bMerge = TRUE
bInterpolate = TRUE
bUseOffset = FALSE
rsOffset = 0
nUseTimeChannel = 1;
ssNC1 = auto_ImportData("c:/a.xls")
ssNC2 = auto_ImportData("c:/b.xls")
ssNCNew = NC_SynchronizeTime(ssNC1, "time", "speed", ...
ssNC2, "time_stemp", "rpm", ...
bMerge, bInterpolate, bUseOffset, rsOffset, nUseTimeChannel);
if (ssNCNew == "") {
// Fehler
}
History
| Version | Description |
|---|---|
| 5.14.8 | New. |
See also
Overview UniPlot Data Files, File=>More File Functions=>Synchronize Time Data (Files), File=>Export Data, nc_create
id-653736