NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to jump from StationPostStepRuntimeError callback to main sequence ProcessCleanup callback?

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?

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 1 of 7
(2,735 Views)

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

 

 

Regards
Ray Farmer
0 Kudos
Message 2 of 7
(2,700 Views)

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).

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 3 of 7
(2,696 Views)

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.

 

 

Regards
Ray Farmer
0 Kudos
Message 4 of 7
(2,689 Views)

Are you putting the ProcessCleanup also in the StationCallbacks.seq?

 

Regards
Ray Farmer
0 Kudos
Message 5 of 7
(2,682 Views)

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?

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 6 of 7
(2,677 Views)

The ProcessCleanup in the SequenceFile will override the one in the StationCallback.

Regards
Ray Farmer
0 Kudos
Message 7 of 7
(2,662 Views)