NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

When is SequenceErrorOccurred flag set?

Where and when is SequenceErrorOccurred falg set? Is there a manual or help file where I can find it?

Thanks

CT

0 Kudos
Message 1 of 6
(3,617 Views)

CT,

 

What is your goal here?  There may be a better way to accomplish what you want.

 

That flag can change depending on the seuqence context. 

 

Here is a document with a section on Error Handling: http://zone.ni.com/devzone/cda/tut/p/id/4267

 

In general you can capture the error by using the engine callback: SequenceFilePostStepRuntimeError.  Then you can decide what to do with the error before it goes back to the engine.  The engine is what ultimately sets that flag.  The TestStand Reference Manual is a good source for reading about engine callbacks. I am certain that the flag doesn't get set until after the callback has executed.  And in fact won't get set if you manipulate the error in the callback.

 

Hope this helps,

 

 

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 6
(3,615 Views)

Hi jigg,

 

Thanks for your response.

What I am trying to do is use that flag in addition to SequenceFailed to determine if DUT failed or passed. So I use RunState.Caller.SequenceErrorOccurred || RunState.Caller.SequenceFailed. 

I read the document you provided and I am still confused. I use VISA Read to read back my DUT's response. TestStand treats a failure here as a run time error. But it is not a run time error. The module is faulty and it failed. There's nothing wrong with the tester. How can I avoid a run time error in this case?

What else can generate a run time error?

 

Thanks again,

CT

0 Kudos
Message 3 of 6
(3,598 Views)

ahhh one of the most common mistakes with testing.  Error vs Failure.

 

A failure occurs when criteria wasn't met.

 

Errors occur when something went wong with the test (i.e. bad code, couldn't communicate with instrument or DUT, etc..).

 

The problem with your situation however is that the error is a failure.  So what you need to do is throw away the error and mark it as a failure. 

 

Are you calling the VISA Read straight from TestStand?  If so you will want to use the callback I mentioned earlier and filter for that error.  You have the step and result passed in as parameters.

 

If it were my application I would wrap the VISA Read into a SubVI.  The SubVI would return a boolean.  Inside of the VI I would check for that specific error and then clear it and change the boolean to be True.  Then in TestStand the step that called it would fail if the boolean came back true.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 6
(3,593 Views)

Hi jigg,

 

I use a VI for that. It uses VISA Read VI that passes the error through and it lands in Step.Result.Error. How do I "clear it"

Thanks for your help

CT

0 Kudos
Message 5 of 6
(3,587 Views)

Use the Clear Errors.vi.  I would put some logic between the Read and Clear Errors to only screen for that error though:

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 6 of 6
(3,582 Views)