NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

When TestStand ABORTs execution for some reason, still clean up should executed

I have few steps in Clean up part in my sequence, when there is any error in my main sequence and if the tester selects ABORT instead of Run clean up, then the clean up steps does not execute. I want to disable ABORT option or even when the ABORT is selected, still the cleanup steps should get executed.

Please let me know the option to do it.

 

Thanks

0 Kudos
Message 1 of 3
(3,012 Views)

Teranet,

As the TestStand help mentiones the Abort method does not call the cleanup section, but we can use the Terminate which will stop and allow for cleanup.  I would recommend using that function instead.  In order to help further we would need to know more about how you are calling the Abort function currently (dialog, button, in a UI or the Sequence Editor, etc).

Message Edited by herosphro on 02-26-2010 01:53 PM
John B.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,008 Views)

1) You can disallow Aborting by disabling the Abort user privilege for your users. On the user manager, go to the user in question and set their Operate.Abort privilege to false. This will also disable aborting for them from the menu and other locations.

2) Another alternative is that you can change the behavior of what happens on a runtime error to not display the dialog and thus not give the user a choice what to do. This option is in the station options dialog near the bottom of the Execution tab. Change the On Run-Time Error setting to Run Cleanup to avoid giving the user  a choice.

3) Also, another alternative if you are writing a custom UI is that you can override the UIMessage for the runtime error (using the ApplicationMgr's UIMessage event and canceling the ApplicationMgr's handling of the UIMessage) and display your own dialog that doesn't have an abort option.

 

Hope this helps,

-Doug

0 Kudos
Message 3 of 3
(2,976 Views)