NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically determine the Run State

I need to determine the run state of the next step during run time. If the state is "Skip", I need to increment a counter.
0 Kudos
Message 1 of 2
(2,944 Views)
Hi Maz,

You can use the property Step.GetRunModeEx in TestStand 3.0 or Step.RunMode for versions of TestStand prior to 3.0. If you need this behavior defined for everystep in the sequence, i.e. you will check the run mode of everystep in the sequencefile, then I would add a SequenceFilePostStep engine callback, and do the checking of run mode and incrementing of the counter inside of there. So my callback would contain at least two steps, one using the ActiveX adapter that is set to check the run mode of RunState.Caller.RunState.NextStep (if it exists) and then one statement step to increment the counter variable (ex. StationGlobals.Counter++, if it is a station global variable). The statement step of course would be preconditioned based on the value returned
by the ActiveX step. Let me know if this helps, or if you need an example, please let me know what version of TestStand you are using.

Ryan
0 Kudos
Message 2 of 2
(2,944 Views)