NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Execution Entry Point Name Property

Hi Ppl,

 

I want to get the name of the execution entry point  that is currently executing the client sequence. I'm currently using the property "RunState.Root.Sequence.Name" property to get this. I want to be sure that this property could be used in any point of the sequences, process model, report generation sequences etc.

 

Thanks,

Sathish 

0 Kudos
Message 1 of 7
(4,659 Views)

Sathish,

 

i haven't found a variable which simply tells you: This is the active Entry Point of the current execution.

But you can get to this from whatever sequence you are in by a recursive search in the call stack.

If you are in the MainSequence, the call stack will be part of the RunState. RunState.Caller gives you the possibility to dig down into the call stack.

So, now the only question: How do you know that you have reached the process model? Simple answer: The RunState of the process model does not contain a variable called "Caller". So do your search on "Does RunState.Caller exist?". If yes, go into the caller and repeat the search. If not, you are in the process model, to be exact: In the Execution Entry Point of the process model. Now you can simply read out the name of that sequence.

 

See attached example for a possible approach. Please note that i have not tested different names of the Execution Entry Point. So maybe localizing TestStand could result in inconsistent names here.....

 

hope this helps,

Norbert

 

PS: The sequence file attached is TS 4.2

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 7
(4,656 Views)

Norbet,

I

Your solution works fine. I was wondering if was missing some obvious straight forward  property. Hope I'm not missing any such property.

 

Thanks 

0 Kudos
Message 3 of 7
(4,653 Views)

Hi,

 

If the property RunState.ProcessModelClient exist, then this tells you that the top level sequence is running using the Process Model.

 

Regards

Ray

Regards
Ray Farmer
Message 4 of 7
(4,647 Views)

YEah,

 

But neither the execution nor the run state directly point to the entry point name. I have multiple entrypoints calling the same sequence. I want to skip certain steps in the sequence depending on the entry point thats calling the sequence.

 

Thanks 

0 Kudos
Message 5 of 7
(4,642 Views)

If you have multiple entry points, i assume that you changed the process model.

If you did, you can define a new parameter for MainSequence in which you pass the name of the entry point.....

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 7
(4,640 Views)

If you did NameOf(RunState.Caller) in your top level sequence this will return the name of the Entry Point Sequence Name. eg Test UUT's

 

If you wanted to check this at differring levels, then depending on the level (n) you would append n number of RunState before the Caller.

 

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 7 of 7
(4,633 Views)