LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Even structure time

Can anybody tell me in what format the time is in the event structure?

 

I need the time an event is executing, but if I convert it from seconds to Date/Time it give me a spurious date/time.

 

If I use a get time “Get Time/Date I Seconds”, I get the current time.

 

I’m using Labview 8.2 on XP O/S

0 Kudos
Message 1 of 5
(2,578 Views)
It's a millisecond timer from the OS. It is relative time and doesn't correspond to any actual date and time. It's good for telling the difference in time between two events, but not for establishing when an event took place. It's output is essentially the same as the Tick Count function.

Your best bet if you need absolute time seems to be to just use the Get Date Time in Seconds instead of using the Time terminal in the Event Structure. Granted, this will tell you when the event was handled, not when it was fired, but it might help.

If that isn't good enough, you could correlate the relative millisecond clock with an actual time value and then do a little math to calculate the absolute time from the ms timer. I'll post an example that might help you get started.
Jarrod S.
National Instruments
0 Kudos
Message 2 of 5
(2,574 Views)
Save the two VIs and open Example Get Time.vi. This uses a functional global (i.e. Action Engine) called Get Time from Relative Time to synchronize the timer ms clock values with an absolute time. After being initialized, it will translate any timer ms value into an absolute time.

Note: The timer ms value is a U32 that will eventually roll over (perhaps every six months or so). Rolling over once will not affect this VI, but rolling over twice will. So make sure to restart the program once a year!
Jarrod S.
National Instruments
Download All
0 Kudos
Message 3 of 5
(2,568 Views)
Here are the pics for anyone without LabVIEW 8.2.






Message Edited by Jarrod S. on 04-18-2007 01:21 PM

Jarrod S.
National Instruments
Download All
0 Kudos
Message 4 of 5
(2,562 Views)

Thank you for the information, I just find it strange that they did not use the “normal” time philosophy. (Seconds since 1904).

 

0 Kudos
Message 5 of 5
(2,530 Views)