NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Pass Thread Current Step Name Of Main Sequence

Hi, I have a test sequence (lets call it TOP LEVEL) that runs and calls a new thread and keeps running in parallel with the new thread.  While the TOP LEVEL test sequence is running and the new thread sequence is running in parallel, I'd like the new thread sequence to be able to know what the current step name that is being run in the TOP LEVEL test sequence.

 

Is there a way to do this?  Thanks!

0 Kudos
Message 1 of 3
(1,928 Views)

In the past, I have made StationGlobals.CurrentStepName and that's defined in the Pre-Expression for a step that's in "TOP LEVEL".  A more flexible way might be to use the callback SequenceFilePreStep, which would define "CurrentStepName" before every step.  You could add a precondition such as NameOf(RunState.Caller.RunState.Sequence) == "TOP LEVEL" to make sure you only track your top level steps.

 

Pulido Technologies LLC

Message 2 of 3
(1,907 Views)

In your new thread call: RunState.Caller.Step.Name

 

Caller will return the sequence context of whatever sequence called you.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 3 of 3
(1,893 Views)