DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Video start time

Hello,

 

i am using DIADem 2012. i want to sync my data and video togther.

 

I have channel of type time and channel of values. the time channel start from: 20/01/2013 16:44:47.8560 to  20/01/2013 16:49:32.5540

I succeeded to sync between data and video by offset correlation function that change each date to start from 01/01/0000 00:00:00.0000 and start video time 0.

 

My question is can i program some how and tell the video start time to start from the first time of the time channel? without perform any math tasks.

video.StartTime= first time of the time channel is seconds.

 

*** there's a way to get total seconds of date?(assuming the start time is 01/01/0000 00:00:00.0000)

 

 

thanks.

0 Kudos
Message 1 of 2
(4,822 Views)

Hello OzShimon,

 

Check out the TTR and RTT functions in the help system, they do what you want (both ways, from time to numeric and from numeric to time).

 

TTR Example:

Dim SecSinceZero
SecSinceZero = TTR("28/01/2013 01:22:00.8560","dd/mm/yyyy hh:nn:ss.dddd")

 

If the data channel you're talking about is already loaded in the Data Portal, and if it already has a clock symbol to the left of it in the Data Portal, then all you need to do is change the display of the channel values.  DIAdem date/time channels are regular DBL channels that have a display property set to show the data differently in DIAdem (as a date/time string).  So you don't need to convert anything.  Look for the property "Display format" in the Data Portal and change it from "Time" to "Numeric".  You may have to force a refresh by clicking in VIEW, but that channel should immediately display as DBL values.

 

You could simply substract the minimum channel value from the complete channel to get the time starting at 0 seconds.

 

Assuming you have a channel called "Time" here is an example:

 

Call Calculate("Ch(""[1]/Time"")=Ch(""[1]/Time"")-CMin(1)",NULL,NULL,"")

The result of this would be a time channel that starts at 0 seconds, not at a date/time

 

Hope that helps,

 

    Otmar

Otmar D. Foehner
0 Kudos
Message 2 of 2
(4,810 Views)