NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I determine the execution entry point used programatically in a sequence?

I need to vary the behaviour (slightly) of a sequence depending on whether the user runs the sequence with the "Test UUTs" execution entry point or with "Single Pass".  I was hoping that I could find a variable to use in my sequence which specifies which entry point was used.  Is there a variable that shows this information?  If so, what is it?  If not, what other methods might work to accomplish this?
 
Thanks,
Sean
0 Kudos
Message 1 of 3
(3,606 Views)
Hi,
 
In your MainSequence use the expression Locals.Caller = NameOf(RunState.Caller.RunState.Sequence).
 
(Locals.Caller declared as a string in the sequence.)
 
This will return a string to your variable as "Single Pass" or "Test UUTs".
 
Hope this helps
Regards
Ray
Regards
Ray Farmer
0 Kudos
Message 2 of 3
(3,604 Views)
Ray,
 
Thanks.  The string works just as you said, but I have two questions.
 
1) This string generates an error when the user runs selected steps (such as might occur when debugging a UUT).  Is there a way around that?
 
2) Is there a published list of "hidden variables" somewhere?  How did you find out about the "Runstate.Caller.Runstate.Sequence" variable? 
 
Thanks again,
Sean
0 Kudos
Message 3 of 3
(3,593 Views)