NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Passed/Failed Sequence Call

Hi,
 
I am using several Sequence Call steps to call other sequences in the current sequence file.
If the status for all steps in the sequence is Passed, the status of the sequence is also Passed.
If only one step is Failed, the status of the sequence is Failed too.
So far so good. But what happens if the status of a step is Error? Then the sequence is also Passed.
I would like to modify the Sequence Call in a way, that Failed and Error causes a Failed of the  whole sequnce, and that only a Passed of all steps causes a Passed of the
 whole sequence.
How could this be relised?
Thanks
Daniel
0 Kudos
Message 1 of 9
(4,047 Views)
Alligator,
 
It seems that you are ignoring run-time errors.
1. Right click on the step you are getting the error and select Properties...
2.Go to the Run Options Tab.
3. Make sure the Ignore Run-Time errors is not checked.
 
Ignore Run-Time Errors prevents the step from reporting a run-time error to the sequence. When a step causes a run-time error the step stops executing, and TestStand sets the status of the step to Error. If you disable this option, TestStand also sets the internal status of the Sequence to error.
 
There is a global setting to ignore run-time errors too.
1. Go to Configure->Station Options->Execution.
Make sure the On Run-Time Error option is not set to ignore.
 
Hope it helps.
 
If you have any questions let me know.
 
Antonio
0 Kudos
Message 2 of 9
(4,038 Views)
Antonio,
 
thanks for your answer. But it doesn´t work.
My problem is the report. If the step which is called by the Sequence Call is "Error" the test report displays an error for this step, but the Sequence Call is Passed.
 
Test 1 Passed          

Begin Sequence: Test 1
(C:\Dokumente und Einstellungen\wernsmad\Desktop\Sequence File1.seq)
Step Status Measurement Units Limits
Low Limit High Limit Comparison Type
Action Error          
   Error Message:   [Error Code: 0]

 

Maybe this screenshot helps to understand my problem.

Thanks for your help

0 Kudos
Message 3 of 9
(4,036 Views)

Alligator,

 

Could you attach a simple sequence file presenting this error.
I would like to check your step settings.

Regards.

Antonio Lie.

0 Kudos
Message 4 of 9
(4,026 Views)
Antonio,
 
this sequence file is just a test to check whether it works or not. I set status of the subsequence "test 1" to "Error" by setting status expression to step.result.status = "error".

Thanks
Alligator  
0 Kudos
Message 5 of 9
(3,996 Views)
Hi Alligator
 
What you need to do is set Step.Result.Error.Status, Code and Msg properties to ensure your error is handled correctly rather than step.result.status.
 
Ray Farmer
Regards
Ray Farmer
Message 6 of 9
(3,994 Views)

Alligator,

Ray is right.

If you want to set the status of the step to error you need to set the following properties:

Step.Result.Status = "Error"
Step.Result.Error.Code = Specific error code. (0 = user defined error code)
Step.Result.Error.Msg = Desired Error Message.
Step.Result.Error.Occurred = True.

This will generate a run-time error message containing your error code and message and will cause the status of the sequence call step to be Error.
Check attached sequence file.

Regards.

 

0 Kudos
Message 7 of 9
(3,971 Views)

Daniel or anyoneelse,

I am having a similiar problem.  I am trying to get the report to say failed when there are errors not just failed steps.  Was there ever a solution to this problem? I also dont have the ignore error settings set to true.

Brian

0 Kudos
Message 8 of 9
(3,746 Views)

Brian,

If you set RunState.SequenceFailed = True then the overall Status in the Header will be set to Failed.

Regards

Ray Farmer

Regards
Ray Farmer
Message 9 of 9
(3,733 Views)