DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform step doesn't fit to set values

Solved!
Go to solution

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

 

 

0 Kudos
Message 1 of 3
(996 Views)
Solution
Accepted by topic author Dia791

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

0 Kudos
Message 2 of 3
(970 Views)

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!

 

 

 

Dia791_0-1653461721805.png

 

 

 

0 Kudos
Message 3 of 3
(964 Views)