NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I check the status of the Main TestStand sequence?

Solved!
Go to solution
I have a main TestStand sequence that calls many sub-sequences. I want to make a decision at the end of the test to perform a function or not based on the over all pass/fail criteria of the entire test. If any of the sub-sequences fail I do not want to perform the function as it will make it more time consuming to re-test after the board is fixed. Basically I want to monitor the same status as TestStand monitors for the end of test pass/fail indication. Thanks in advance for any help.
0 Kudos
Message 1 of 8
(10,061 Views)

You can add a precondition for the subsequence

 

RunState.PreviousStep.Result.Error.Occurred == False

 

-Vidula

0 Kudos
Message 2 of 8
(10,058 Views)
I don't quite understand what you are describing. I want to check the status of all subsequences within the main to see if any failed. If all pass then I perform my action, if there is one or more failures I do not.
0 Kudos
Message 3 of 8
(10,052 Views)

Hi,

 

Try RunState.SequenceFailed. If any of the SequenceCalls fail then this will be set.

 

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 4 of 8
(10,038 Views)

Or probably better to use

 

thisContext.SequenceFailed

 

Regards

Ray Farmer

Regards
Ray Farmer
Message 5 of 8
(10,034 Views)
In either case when I fail one of my three subsequences the SequenceFailed is set to false. I break the test after all three subsequences have run, I then take a look at the variables and the one that I see change is RunState--> Main --> RunState --> SequenceFailed. This one however is not available to put in my evaluation expression when the sequence is idle.
0 Kudos
Message 6 of 8
(10,029 Views)
Solution
Accepted by topic author trosier
I did some more digging through the expression browser TestStand API Tab and found a variable that works. It is ThisContext.RunState.Main.SequenceFailed. For my evaluation I am using an IF statement and checking to see if this is set to false. If it is then I perform my function. If any of my three subsequences fail this is then set to true and the IF condition is evaluated to false and goes to the End function.
Message 7 of 8
(10,026 Views)

I am trying to use this expression from a custom report sequence which was built using the Create New Process Model Plug-in, and I get the following Error:

 

Unknown variable or property name ThisContext.RunState.Main. 

 

Basically I want to append a line at the end of the custom result that displays the overall main test sequences result

0 Kudos
Message 8 of 8
(3,002 Views)