NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Timer based on (RunState.Engine.SecondsSinceStart) Function

Solved!
Go to solution
Hello guys, I have a Test Stand aplication running based on bacth model, the problem I have right now, it is related to the function (RunState.Engine.SecondsSinceStart) since I am creating a timer: RunState.Engine.SecondsSinceStart - Locals.ElapsedTime, where a Elapsed time is a Local variable, when the execution is running for almost a day my apllication stop running due to run time error created by RunState.Engine.SecondsSinceStart because in my undestanding it is getting out of range or it is limitated, my question is, is there another way to create a timer using a different alternative function ? Thanks for your comments
0 Kudos
Message 1 of 6
(3,233 Views)

Would it be possible to use Seconds(true)?  This gives you the time since the TestStand Engine was initialized.  

 

Alternatively, you could use Seconds(False) and save that value to a variable (local, fileglobal, or stationglobal)?  Then, in any step where you want to compare to the start time, use "Seconds(False)" again and compare it to your saved value.  Seconds(false) gives you Unix time.

 

Pulido Technologies LLC

 

 

0 Kudos
Message 2 of 6
(3,207 Views)

I don't know of any reason why you would receive a runtime error or not be able to use SecondsSinceStart for more than a day. I suspect the issue is not with that property. If you have code that reproduces a runtime error with SecondsSinceStart, please post it.

0 Kudos
Message 3 of 6
(3,199 Views)
I have already implement that possible solution, just I need to wait how it behaves. Thanks for your comments
0 Kudos
Message 4 of 6
(3,196 Views)
Hello James, thanks for your comment, you are right, probably that is not the issue, but I am not sure what could be causing this error, the problem is that the first time it happened I was running my application from a LabVIEW custom UI.exe, and the only reference I have is the attached message and the test stand report only showed (Terminated) in some point of my sequence, then I belived it was something wrong with my custom UI LabVIEW.exe and I decided to run from my TestStand source sequence, but this time the sequence stop by itself and I have not any register, my believes are pointing to the RunState.Engine.SecondsSinceStart becasue the both times it happens so far seems to be stoping in some portion during the loop I am using that property
0 Kudos
Message 5 of 6
(3,193 Views)
Solution
Accepted by topic author Eder22

Hello Eder22 good afternoongured

 

I would suggest that you use a new thread to create a timer, for example in LabVIEW and then put a wait configured to wait for that timer and then you won't have the problem with the seconds() function.

 

You can find an example of this in the following path:

C:\Users\Public\Documents\National Instruments\TestStand 2014 (32-bit)\Examples\Parallel Testing\Executing Sequences In Parallel\Executing Sequences In Parallel.seq

 

I hope that you find this information useful,

Best Regards,

 

CaEnOs.

0 Kudos
Message 6 of 6
(3,105 Views)