09-15-2017 03:40 PM
Hello,
I am trying to figure out some general mechanism of error handling in TestStand. I want it to work in the following way.
I have a TestsLauncher.seq which uses BatchModel.seq. It launches MainSequence of Tests.seq for each test socket (this way I have 4 executions, 1 controller, and 3 sockets). I Have also configured StationPostStepRuntimeError callback in the StationCallbacks.seq file.
Now, when error accrued in no matter where, during execution, I would like to jump to the StationPostStepRuntimeError callback and after this callback, terminate all sockets, and go to the launcher ProcessCleanup. Should I use TerminateAll() in RuntimeError callback or maybe there is some more elegant way?
09-18-2017 02:15 AM
If you are not worry about jumping to all the clean-ups then you could checkout the following example
C:\Users\Public\Documents\National Instruments\TestStand <versions>\Examples\Fundamentals\Overriding Engine Callbacks\Overriding SequenceFilePostStepRuntimeError Callback.seq
09-18-2017 02:26 AM
SequenceFilePostStepRuntimeError callback would need to be in all sequence files. I would like to avoid code duplication, that's why I want to use StationPostStepRuntimeError callback. Second thing, if I'm right, your example terminates only the calling execution, and I would like to terminate all executions, and not necessarily with TerminateAll(), because I would like to be sure that the TestsLauncher.seq ProcessCleanup is called in every case. In another word, I would like to have one common error handling, and one ProcessCleanup for all executions and sequence files (without code duplications).
09-18-2017 04:00 AM
Hi,
I was just pointing you to the example TestStand provides. It doesn't matter which Callback you use the principle the same. It's just a starting point.
09-18-2017 06:41 AM
Are you putting the ProcessCleanup also in the StationCallbacks.seq?
09-18-2017 10:04 AM
To be honest I did not find anything I could grab in this example. From my understanding, the principle is not the same (ok the only similarity is that in both cases callbacks are used). I have a slightly different arrangement.
I was thinking to use ProcessCleanup of TestsLauncher.seq but perhaps using station ProcessCleanup callback will also do the trick. Will it overwrite all ProcessCleanups?
09-19-2017 01:03 AM
The ProcessCleanup in the SequenceFile will override the one in the StationCallback.