NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Terminate if step fails but execute cleanup?

Hi,

 

The first step of my sequence requests the operators to scan their badge (implemented in labview). If a valid badge scanned then the sequence should simply continue its execution. If the badge number is not registered in a DB then I'd like my sequence to go to the cleanup execute all its steps and then stop but without failing the sequence.

 

What would be the right way to do so? My only idea is this:

- if the scanning fails set a particular boolean value

- then fail the step which redirects the execution to the cleanup

- at the very last step of the cleanup check the boolean and if its set then terminate the sequence (RunState.Execution.Terminate())

 

This seems a bit convoluted though, so I assume there is a better way.

 

Thx.

0 Kudos
Message 1 of 5
(2,388 Views)

Hi,

 

Your logic is in the correct direction.Some small changes to it.

 

Lets say you LabVIEW VI returns two parameters 1) pass/fail bool and 2) Scanned data

 

Use a pass fail step to call this VI and connect the pass/fail return value to the data source.

i.e. step fails when there is scan failure.

 

In the Step post actions on failure select terminate :

RaviShrigiri_0-1652953429244.png

 

Terminate will always call cleanup.

 

Ravi

 

0 Kudos
Message 2 of 5
(2,365 Views)

Thanks for responding! Actually - and I forgot to mention this - I have tried what you suggested. At that point I used a PassFail test and 'connected' my boolean output to the Step.Result.PassFailFlag.

 

The problem I have though is if I select terminate as you wrote TestStand displays a popup window allowing the operator to Retry / Ignore / Abort / Run cleanup. This is why I chose the Runstate.Execution.Terminate() version which I dont like nearly as much as selecting Terminate from a menu.

 

Is there a way to disable the popup?

0 Kudos
Message 3 of 5
(2,361 Views)

Hi,

 

I just tried and it works fine.

 

The dialog that you mention comes if your step has some errors and not due to terminate or failure.

Please check there maybe some errors in the step.

 

In any case you can disable it.Go to menu configure --> station options :

 

RaviShrigiri_0-1652956160834.png

 

Select on run time error  -- > ignore option.

 

Ravi

 

0 Kudos
Message 4 of 5
(2,356 Views)

Thanks Ravi. I'm in HO today, but will test it either tomorrow or on Monday.

0 Kudos
Message 5 of 5
(2,349 Views)