NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Teststand error handling Option

Solved!
Go to solution

HelloCan I turn Off the error Popup without:
Ignored the error,
Terminated the test program
Thanks
Tphan

0 Kudos
Message 11 of 17
(2,735 Views)

Hello Thanks

The key is the "RunState.Caller.RunState.ErrorReported = true"

This will turn off the Dialog box

0 Kudos
Message 12 of 17
(2,734 Views)

One thing is I still not see the way how to tell the sequence not to stop after accepted the error. 

If I set the var to :

RunState.Caller.RunState.ErrorReported = True

 

The Popup disappeared,   however,   the sequence also terminated.   How to make the sequence continue to run?

Thanks

Tphan

0 Kudos
Message 13 of 17
(2,731 Views)

Here's an idea. You can do:

 

Parameters.Step.Result.Error.Occurred = false

 

But this will make the sequence no longer have an error status. To fix that you could store the fact that you got an error in a global or in a variable you create programmatically under RunState.Execution.RunTimeVariables. Then, you could do one of the following:

 

Either

1) Add a step to the end of the cleanup of your top-level sequence than conditionally generates a runtime error based on the variable. And SequenceFilePostStepRuntimeError should be setup to not do anything for this step

 

or

2) Modify the process model to treat the variable being set as equivalent to the execution having an error state.

 

NOTE: You will have to reset the state of the variable before each uut either in the setup steps of the top-level sequence or the process model.

 

-Doug

0 Kudos
Message 14 of 17
(2,719 Views)

Yeah,

I got that.  Alll of this trouble just because NI does not give access to the error handling.  They should not assum that the program have to stop when it get an error

Thanks

0 Kudos
Message 15 of 17
(2,717 Views)

@Tphan wrote:

Yeah,

I got that.  Alll of this trouble just because NI does not give access to the error handling.  They should not assum that the program have to stop when it get an error

Thanks


You can post an idea/feature request here if you'd like:

 

https://forums.ni.com/t5/NI-TestStand-Idea-Exchange/idb-p/teststandideas

 

-Doug

0 Kudos
Message 16 of 17
(2,709 Views)

Hi TPhan,

 

One possible way to implement this behavior is to manually set the error container of the mainsequence call step in the process model.  This can be set from within the PostStepRuntimeError callback.  This will cause the final status and sequence result to indicate an error, but still report the remaining steps.  To configure steps in the sequence to be skipped if an error occurs, you can use a precondition which checks if an error occurs.  

 

The attached example shows this method.

Al B.
Staff Software Engineer - TestStand
CTA/CLD
Message 17 of 17
(2,675 Views)