05-24-2022 09:48 AM
Hello guys!
Evaluating some data, I just wondering about the behavior of the waveform transformation.
Data (numeric) recorded with 10 kHz.
To transform numeric into waveform, I create the time channel with start time, microseconds as unit, 100 as step, and the number of values the same as for the data channels.
Then transform.
Resulting step of the waveform is not 1e-04, but a curious value slightly lower, around 9.9182E-05 (with DIADEM 2015) or 9.9999E-05 (with DIADEM 2019).
set chan = Data.Root.ActiveChannelGroup.Channels("Time")
t_s = TTR(Data.Root.Properties("Startzeitpunkt").Value)
dt = (chan(3)-chan(2))/(1e-06)
no = chan.Properties("length").Value
Call ChnGenTime("/TimeGenerated","microsecond",t_s,,dt,"StartStepNo",no)
Call ChnToWfChn("[1]/TimeGenerated","'[1]/Time' - '[1]/CE03'",0,"WfXAbsolute")
Have a small file example attached.
It's not an issue to change it "manually", but why this occurs? And why the step is not the same for different program versions?
Any ideas?
Greetings,
Vassili
Solved! Go to Solution.
05-25-2022 01:27 AM
Hi Dia791,
The standard date/time channel in DIAdem is internally a numeric channel of the data type double. It counts the time in seconds starting at the year zero. The fractions of seconds which can be used are up to microseconds. Then you reach the end of the precision. And please keep in mind, we use digital technology with zeros and ones with which numbers are represented. In the end you are running in a rounding problem.
set oChn = Data.Root.ActiveChannelGroup.Channels("TimeGenerated")
msgbox oChn(3) - oChn(2)
Greetings
Walter
05-25-2022 02:00 AM
Hi Walther,
in fact, creating the time channel I've checked the step, but in time format only, and there it looks fine.
But as you write, in numerical it's different. Understand.
Thank you!