NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Goto Step Destination to a Setup Step

Folks,
 
    I am trying to set the destination of a Goto step located in the Cleanup section of my sequence, to a step in the Setup section of my sequence. When I attempt to do this, the Goto step will not recognize any steps with a destination in the Setup section. Is there an expression I can use to allow my Goto step to recognize the step in the Setup section? I have enclosed an example file.
 
    Background: I am trying to set up a test loop that will encompass my entire sequence. My sequence will contain steps in the Setup section that will turn on a power supply, connect to a comm port, etc., while the Cleanup section will turn off the power supply and disconnect the comm port. The main section of the sequence will perform test steps on the UUT (i.e. measure voltages, communicate to the UUT, etc.). Under nomral test conditions this sequence will only operate once. However I am trying to add a continuos test loop, for test qualifaction purposes, that will allow me to loop the entire test sequence (i.e. Setup, Main, and Cleanup sections) using a simple Goto step in the Cleanup section. Thus, my question above.
 
   Thank you in advance for your time and response(s).
 
Thank you,
Jim
0 Kudos
Message 1 of 4
(4,157 Views)

Hi,

I think you are on to a loser there. (cannot view your sequence file at the moment so I cannot exactly see what you are doing).

Try putting your steps into a sequence and call this. That way you can control the caller step to recall the sequence again.

You can do this one of two ways,

1) put the step into a loop with a custom set-up so the sequence can setup the return value to loop again or end the loop

2) the sequence has an expression step in the cleanup to change the next step to be executed when it returns to the caller so that it repeats the same steps again.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 4
(4,151 Views)

The goto step doesn't support jumping to steps in other groups, but you can easily do it yourself.

Add a Statement step to cleanup with an appropriate precondition. To make the statement jump back to the first step in the setup group, set the expression to:

RunState

.StepGroup = "Setup", RunState.NextStepIndex = 0

Message 3 of 4
(4,138 Views)

James,

       Thank you very much for your response. It was EXACTLY what I was looking for!

Thanks again,

Jim

 

0 Kudos
Message 4 of 4
(4,132 Views)