NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Post Actions on failure with random sequence

Hi,

 

I use the SequenceFilePostStepFailure callback to catch failing steps. This works great except for random sequences. On retry the next step in the random sequence will be executed and not the same step.

Can somebody help me to fix this?

 

0 Kudos
Message 1 of 9
(3,753 Views)

You'll need to use something similar to this on retry in order to change which step will be the next to execute.

 

RunState.Caller.RunState.NextStepIndex = RunState.Caller.RunState.StepIndex

CTA, CLA, MTFBWY
0 Kudos
Message 2 of 9
(3,739 Views)

I already increased the stepcounter in the post action only on when the step passed. But it still jumps to the wrong step after a passed step.

0 Kudos
Message 3 of 9
(3,735 Views)

That callback is only being called on a failure so I'm not sure where your passing issue is coming from. You should probably step through the execution and note the value of RunState.NextStepIndex to see where it is being changed. Perhaps you have a Post Action doing something that it shouldn't in your code.

CTA, CLA, MTFBWY
0 Kudos
Message 4 of 9
(3,731 Views)

Then I think it's a bug in the random step sequence. I need to follow nextstepindex.

0 Kudos
Message 5 of 9
(3,726 Views)

without known whats generated in your random array it's difficuilt too offer any meaningful help or whether to say if you are suffering from a bug.

 

 

Regards
Ray Farmer
0 Kudos
Message 6 of 9
(3,719 Views)

Ray, I provided my sequence file in the attachments. I don't know if it opens on all systems?

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

Hi,

 

Thanks I did look that that but couldn't tell what's being gathered in the VI as no VI's available, hence the question.

 

I did try to make a working version of your sequence file with dummy sequences.

 

 

Regards
Ray Farmer
0 Kudos
Message 8 of 9
(3,703 Views)

Ray, you may always send me this sequence. Tnx!

0 Kudos
Message 9 of 9
(3,701 Views)