NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Causing Testand Step to Skip from CVI

Hello:
How can I cause a Testand step to be skipped, using CVI ?
It is prefered that the solution will not use the step name so changing step name will not affect.
I'm using Testand 3.5 & CVI 8.0
Thanks,
Ofer
0 Kudos
Message 1 of 6
(3,370 Views)

Hi,

I could use the precondition expression of the step, so that is the condition is met the step will be executed and if its not the step will be skipped.

You could use the RunState.NextStepIndex, by setting this with the value of the step you wish to go to, there are examples of using this on the forum.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 6
(3,363 Views)
Thanks Ray,
Do u have code example at CVI?
Thanks,
Ofer
0 Kudos
Message 3 of 6
(3,362 Views)
There are lots of ways you can do that, but what Ray suggested is probably the best method.
 
For examples, you can look at your TestStand install directory (ex: C:\Program Files\National Instruments\TestStand 3.5\) in the Examples folder.  A great example to show how to simply modify a TestStand property using the API is called AccessingPropertiesAndVariables (PassingSequenceContextToDll).  You would pass the sequence context to the CVI module and then use the TS_PropertySetValInteger function to set a value in the sequence context.
Thanks,

Andy McRorie
NI R&D
0 Kudos
Message 4 of 6
(3,336 Views)
Hi,
 
Here's an example (TS2.0.1)
Use in conjuction with the sequence file found in
    TestStand examples\Callbacks\PostStepFailureCallback in FailureHandlerExample.seq.
 
In the sequence 'SequenceFilePostStepFailure' this function replaces the Step 'Retry Same Step'.
 
If you changed this step for a CVI Action step with the same preconditions and call retry() it would do the same action as the expression step.
i.e.
   RunState.Caller.RunState.NextStepIndex = RunState.Caller.RunState.StepIndex,
   Parameters.Step.Result.Status = "Failed, Retrying Step..."
 
Hope this helps
Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 5 of 6
(3,321 Views)
Thanks u all for your advices. It helps me a lot.
Ofer
0 Kudos
Message 6 of 6
(3,313 Views)