NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to handle runtime error in PreUUT step when running in Parallel mode

Solved!
Go to solution
I would like to run Test UUTS in parallel mode, and some actions are done in PreUUT such like read serial number and fixture control.
The process model won't goto PostUUT Step when runtime error occurs in PreUUT step, so i would like to add some actions to check if sequence error in cleanup and go back to setup in PreUUT step, but i find it skip all the actions in setup and main step?

What should i do if i want to go back to run PreUUT again as the first time to run when runtime error occurs?

Or, is there any good way to handle this kind of error withour restart program?
0 Kudos
Message 1 of 8
(5,592 Views)

This question does not depend on PreUUT or ParallelModel at all.

 

First of all:

A Runtime Error is a situation where TestStand encounters a problem which makes further testing either impossible or senseless. So a Runtime Error always indicates a situation where proceeding the test sequence is not recommended.

Nevertheless, there are situation where you want to handle those errors without stopping the execution. A "traditional example" for this is initialising serial/GPIB devices. If the device does not reply, there might be different issues the operator can easily resolve and (if corrected) the sequence can proceed properly. The operators action could be:

- Check if device is switched on

- Check connection between PC and device

- ...

So the error state is used to inform the operator about the malfunctioning device and regarding of the actions the operator takes, the execution will either proceed or terminate.

 

When TestStand encounters a Runtime Error, it initially reacts with displaying a dialog. This behavior can be modified in the Station Options >> Preferences >> On Runtime Error.

Furthermore, you can install callback sequences which are called if an error occurs. Those would be either SequenceFilePostStepRuntimeError or ProcessModelPostStepRuntimeError (depending on the fact if you are changing the process model or simply working with client sequence file callback overrides). These are "normal" sequences you can use in order to get system information, loop on the step or....essentially do whatever you want. If you want to proceed though, you must not forget to reset the error flag.

 

hope this helps,

Norbert 

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

First of all, thank you very much for your answer.

I understand a runtime error ocurs usually at that situation TestStand encounter an fatal error from enstrument, and i am clear how to modify the settings from station options according to my decision.

But my question post here is to ask about how to make the execution goto PostUUT step when runtime error occurs in PreUUT step. As you know, a runtime error happen in MainSequence will still goto PostUUT without stop the execution.

The default options from TestStand in the dialog is Four:
1. run Cleanup
2. Retry
3. Ignore
4. Abort

If it occurs in PreUUT step, anyone for above options will still stop the execution, even though I override SequenceFilePostStepRuntimeError callback, i can not calll PostUUT step, and loop the test.

Furthermore, even if the execution don't goto PostUUT step, i want to use "Goto" step to go back to the beginning of PreUUT step, but i find it skips all the items.

Bendy
0 Kudos
Message 3 of 8
(5,586 Views)
Solution
Accepted by topic author Bendy227

Bendy,

 

there is no decent way to do this. The reason is the following: TestStand assumes that if a failure occurs in the setup mechanism for a single testsocket, it makes no sense to proceed with this testsocket at all. It is recommended to handle shutdown routines in this case using the SequenceFilePostStepRuntimeError callback. You can also use this callback to loop on the step which creates the error until the error is resolved.

By default, TestStand does not support an ackowledge of the error but proceeding into the sockets execution. You can only simply ignore the error (removing the error flag) or you can implement your own functionality. You can for instance set a custom error flag which will be evaluated as first step of your main. If the flag is set, you skip everything in your main. 

I know that this suggestion seems not to be a good one because it's "hack mack", but it solves your issue. TestStand, as already statet, evaluates runtime errors which occur in the PreUUT as system critical failures and proceeding with any testing is not suggested....

 

Norbert 

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

For completeness, I should mention that the behavior of not calling PostUUT if any error occurs in PreUUT is not hard-coded into Teststand, but rather is expressed in the process model. In this case, in this case in the Test UUTs -- Test Socket Entry Point sequence in ParallelModel.seq.

 

You could probably set the call to PreUUT to ignore RTEs and set a post action to branch to PostUUT is the status is "Error". In PostUUT, you could pass the status of the PreUUT call.

 

Not recommending it, just saying......

0 Kudos
Message 5 of 8
(5,567 Views)
thank you for both your recommendation.

It is good approach to solve my problem.
0 Kudos
Message 6 of 8
(5,552 Views)
One more question, how to check if an Error happen at PreUUT or MainSequence, or any other sequence When overides SequenceFilePostStepRuntimeError callback?
0 Kudos
Message 7 of 8
(5,536 Views)

See attached example (TS 4.2)

 

Norbert 

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