NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

SequenceFilePostStepFailure

Solved!
Go to solution

Hi,

 

I want to show a messagepopup via the SequenceFilePostStepFailure if a step fails.

But sometimes I have a step that sometimes fails. In this case I put the step on looping (e.g Stop after 1 iterations pass or after a maximum of 3 iterations).

How can i check in the  SequenceFilePostStepFailure  if I have a step that loops? ( In this case I don`t want to show the message, only after the 3th time when the complete step fails)

0 Kudos
Message 1 of 4
(1,204 Views)

Can you query the loop index (I think it's "RunState.LoopIndex") from within SequenceFilePostStepFailure and only exercise it on the ones you want?

0 Kudos
Message 2 of 4
(1,177 Views)

Hi,

 

In the SequenceFilePostStepFailure the runstate.loopindex is always 0

So I cannot use this

 

0 Kudos
Message 3 of 4
(1,127 Views)
Solution
Accepted by topic author t.vervecken

I think I found a solution 🙂

 

Parameters.Step.LoopType !="NoLooping" --> Check if the step that failed is a 'looping' step

Locals.LoopWhileExpression = Parameters.Step.LoopWhileExpression, --> Save the LoopWhileExpression in a local variable

SearchAndReplace(Locals.LoopWhileExpression,"RunState" , "RunState.Caller.RunState") --> Replace Runstate with Runstate.caller.Runstate

 

Evaluate(Locals.LoopWhileExpression)  --> Check for the result of the loopwhileexpression.. If this is True it is not the last step in the loop

0 Kudos
Message 4 of 4
(1,118 Views)