Solved! Go to Solution.
I also came across same requirement.
I have a sequence with bunch of steps (50+) and in the second last step, I would like to know if any of the previous steps (including sequence calls) has "Failed" status associated.
Is there a TS property, I can use for this?
Thank you and have a nice day.
How about checking results list? You can do it in single step with looping enabled.
You could also use engine callback for fails. Each time you have a fail, this callback is called. In this callback you can set some global flag.
Try also RunState.SequenceFailed property. I'm not sure if this will work in your case, though.
Thank you for the reply.
While looking for a way 'to check if there was a failed step before', I came across 'checking results list'.
This could be my prefer way, although I'm not sure how can I take this dynamic array (Locals.ResultList) and search for a "Failed" status element.
Can this be done using a TestStand 'Expression' step?
Second approach that you mentioned, using engine callback, unfortunately, I couldn't find much info regarding that.
Used 'SequenceFilePostStepFailure' and it works just fine.
Thank you again for your reply.
Edit-2: Unfortunately, I cannot mark it as solved.
You will always have
Locals.ResultList. So, you can use
Statement with expression like
Locals.ResultList[Locals.Index].Status (where you iterate using
Local.Index; this loop can have different forms) to see how many fails you have. This way you will see only fails for the "shallow"
CallStackDepth - no matter how many fails you have in the subsequence, all of them will be counted as one. To count every individual fail using
ResultList you would need to create some recurrent method. For this approach, I will recommend using LabVIEW. Subsequence results can be accessed using
Locals.ResultList[Locals.IndexA].TS.SequenceCall.ResultList[Locals.IndexB].Status (you can go deeper and deeper this way).
The engine callback approach does not need recurrence and seems easier.
I don't have LabVIEW nor TestStand at my disposal at the moment so I can't provide you working example.
Is my description understandable? Which part still needs to be explained in order to close the topic?
Your 'Engine Callback' suggestion was a perfect solution for my requirement.
I mentioned that I cannot close (or mark as solution) because I'm not OP for this thread. I would request moderator to mark it as Close/Solved.