NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Teststand 2.0.1 - How to set Post action for particular step? Help

Hi ,
 
I use Teststand 2.0.1. I am trying to create a post action  to go back to previous step (Custom destination) if a particular error occurs on that step. I tried putting Error or Error number in Custom condition expression. I tried running the step and it creates the error but it terminated the seuence instead of going to previous step. Please give some light on this! Thank you.
Please see attached document for what I am doing.
 
A Shah
 
 
0 Kudos
Message 1 of 7
(4,065 Views)
Hi A Shah,
 
Does it go to the previous step if you just put True in there?  That way you can verify that the step jumping is correct. 
 
I'm a little confused though by exactly what you are saying.  You are creating the error inside of that condition statement?  I just don't see how you can evaluate the word Error.  It either has to evaluate to true or false.  So you could say something like: Step.Result.Error.Occured.  Which is a boolean datatype.  This will evaluate if the step errored or not.
 
Also, whenever TestStand recieves a run-time error it triggers an event that does some action.  If you go to Configure>>Station Options and on the Execution tab you should see On Run-Time Error.  What settings to you have in there?  You may need to set it to ignore the error to get the desired behavior.  But then the entire station will ignore all errors.  (I don't have 2.0.1 so I hope it's similar)
 
Hope this helps some.  Maybe you can explain a little better where the error is coming from or even a screen shot of the error would help.
jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 7
(4,059 Views)

Thanks Jigg,

After you emailed I tried insterting entire text RunState.SequenceError.Occurred in to expression, but it still does not work. Than I tried haveing all 3 combined RunState.ErrorReported, RunState.SequenceFailed ,RunState.SequenceError.Occurred  from Runstate option under Variable/Properties of Expression Browser. May be I have to use Step Result error instead of Run State Sequence Error?

To give you little bit more idea I have total 10 steps in test stand seq.

1. Power up

2. Data Acquisition for band 1

3. Data Reduction - if it does not have valid input data range from previous step data acquisition than, it generates error  if it does than we want to redo step 2. IF it has valid input range No errors, find proper data output , check data output limits and go to next step.

4.Data Acquisition for band II

5. Data Reduction

Download All
0 Kudos
Message 3 of 7
(4,046 Views)
Hey Shah,
 
I think it's a good time to define some terminology.  You have two words here: Fail and Error.  They mean absolutely different things.  In TestStand when you talk about the word Fail it means the sequence did not succeed based on constraints that you have set.  When you talk about an Error it means that something is broken.  For instance-  If I call a code module and set the limits to be 10 and 0 and my code module returns an 11.  Then my step has failed.  This is not an Error.  However if I call a code module and my code doesn't work because I'm a bad programmer and try to set strings to numerics without typecasting.  Then you will get an Error.  If I call a code module and my hardware doesn't work like it's supposed to then that is an error as well.
 
So are you saying that you get an Error?  Or are you saying that you get a Failure? 
 
From the sound of your second post it seems that you are talking about Failures but using the word Error.  Is this a correct assumption?  If so then you don't need to set custom conditions.   Uncheck the box that says Use Custom Conditions and where it says On Fail: set it to Goto Destination.  And choose the previous step.  It's already built in to TestStand.
 
If my assumption is incorrect then it seems that Step.Result.Error.Occurred == False  Should do the trick for a custom condition. 
jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 7
(4,022 Views)

Hello ~jiggawax~

 

 

Can you please help me on following

 

1. Is it possible for a particular numeric limit test step - to set "Record result " to False if test is fails and set Record result to True

 

  if test passes. In a Do - While loop doing a numeric limit test for a current , do not want to record result as long as test is failing

 

 and would like to record result if test passes.

 

2. Do you have any example of setting a costom condition in the "Post actions" of a step.

 

Thanks

 

Vinod

 



 


0 Kudos
Message 5 of 7
(3,517 Views)

Hello ~jiggawax~

 

 

Can you please help me on following

 

1. Is it possible for a particular numeric limit test step - to set "Record result " to False if test is fails and set Record result to True

 

  if test passes. In a Do - While loop doing a numeric limit test for a current , do not want to record result as long as test is failing

 

 and would like to record result if test passes.

 

2. Do you have any example of setting a costom condition in the "Post actions" of a step.

 

Thanks

 

Vinod

 



 


0 Kudos
Message 6 of 7
(3,517 Views)

You need to set your step to "Ignore Run-time Errors" on the step settings dialog, or it will go to cleanup. Note: I've only read the first post. It's possible the problem has already been determined to be something else, but a likely reason why a post action would not go where you tell it on error is that errors generally cause the flow of execution to go to cleanup.

 

-Doug

0 Kudos
Message 7 of 7
(3,506 Views)