NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get real time of teststand program to compare with another value

I want to compare two time values, one is to get the time right when teststand begins to run, and the other from a VI. I was wondering how to get real time from teststand

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

Are you looking at the time when the operator starts the execution or when the TestStand engine started?  You can call Seconds(True) in any expression in TestStand to get the seconds since the engine started.

 

If you want the execution time you need to use other means.

 

By the way- you can call Seconds(False) and get the seconds since January 1, 1970.  This can be used to subtract or add to other calls to Seconds(False) to determine elapsed times.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 4
(2,666 Views)

I wrote the function 

Locals.TotalTime=Time(false,0,0,0,0,Locals.TimeElapsed,True)

and nothing is initialized in Locals.TimeElapsed, but the time I received back is off about 20 minutes behind. Why is this the case?

0 Kudos
Message 3 of 4
(2,647 Views)

How do you know it’s off by 20?

 

Also, to reiterate jiggawax’s question, what do you mean by “right when TestStand begins”?

 

This could help.

http://digital.ni.com/public.nsf/allkb/52933BCB633C8F28862576F0006BB959

 

Or you could use the method prescribed here, depending on what ‘TestStand begins’ means.

https://forums.ni.com/t5/NI-TestStand/How-to-measure-elapsed-time-between-two-steps/td-p/2117978

 

0 Kudos
Message 4 of 4
(2,626 Views)