NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

set variable based on status expression result

I need to be able add addition control to my test sequence.  In the example below, if "LED Test" fails, "CPU Test Sequence" will fail, but I want the rest of the test sequences to run.  However, if "Register Test" fails, I don't want the rest of the sequences to run.  I have tried several different options, but with no success.  Can anyone suggest the best way to go about this?

Main Sequence
    CPU Test Sequence
        LED Test
        Register Test
        Cache Test
    Memory Test Sequence
         RAM Test
    I/O Test Sequence
         Keyboard Test
         Mouse Test
    End Tests

Thanks,
Bryan
   
0 Kudos
Message 1 of 4
(3,156 Views)
Hi Brian,
to prevent the MainSequence from executing further steps (e.g. when the Register Test fails) you can use
 
RunState.Main.RunState.NextStepIndex = -1
 
Regards, Guenter
0 Kudos
Message 2 of 4
(3,146 Views)
Hey Bryan,

I would just like to offer another suggestion as a possibility:

Aside from modifying RunState.Main.NextStepIndex = -1 and RunState.NextStepIndex = -1 (to skip the rest of the subsequence), you could also Terminate execution.  The way that you could do this is by modifying the Step Properties for the Register Test (Post Actions properties) to say that On Fail terminate.  The default for On Fail is to "Goto next step", but you can modify this to say "Terminate Execution".  In this way, it will terminate regardless of how nested the step is (in subsequences), display a prompt to the user to go to next UUT or to terminate, and will display a status of "Terminated" for the overall UUT in the report. 

Both approaches should work, but the kind of behavior you are talking about is most typical of "Terminating" the UUT test if a particular step fails.


Thanks,

Andy McRorie
NI R&D
Message 3 of 4
(3,125 Views)

Thanks Andy.

I'm currently working on a ClientSeqFile that doesn't allow using Post Actions and I take from your post: I have gone blind.
Thanks for the small training in TestStand Basics.

Have a great day, Guenter

0 Kudos
Message 4 of 4
(3,083 Views)