NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Stack name in TestStand

Hi!
I have a sequence file with difference sequences. From the MainSequence I call some subsequences and from those ones others. In the StationCallbacks I check with the StationPostStepFailure the name of the failed step. This is simple, just writing in a Expression "NameOf(RunState.Caller.Step)". Here goes the question: Let's say that the step (called for example BUG)that fails is located in:
MainSequence
-> Step Test1
-> subsequence Test1
-> BUG
Using the Property SequenceContext.CallStackDepth I can get how many subsequences are above my step, but I'd like to get the full name, something like: "MainSequence:Step Test1:BUG" because I save all this data later on and it can helps me a lot in order to catch failures.
thanks in advance,

Angel
0 Kudos
Message 1 of 5
(3,614 Views)
Hi Angel,

For each increase in CallStackDepth, add a RunState.Caller to the lookup string.

eg For subsequence Test1, the Lookup string will be RunState.Caller.RunState.Caller.Step

and soon on....

Therefore you can concatenate your string as NameOf(RunState.Caller.RunState.Caller.Step) + NameOf(RunState.Caller.Step).


Regards
Ray Farmer
Regards
Ray Farmer
Message 2 of 5
(3,602 Views)
Hi Ray,
the problem is that the CallStackDepth is variable and I cannot use an Expresion, this has to be done programatically. I attach you the program that I've just finished. It seems it's working OK. If you see some improvement on it, please let me know.
Thanks, Angel
0 Kudos
Message 3 of 5
(3,600 Views)
Hi,

I can see that the sample VI didn't close any of the opened References. I would recommend to close them.

Thanks
Sasi
0 Kudos
Message 4 of 5
(3,561 Views)
Hi,
sorry I didn't attach the version with the close references. Thank you anyway.

Angel
0 Kudos
Message 5 of 5
(3,559 Views)