NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change flow properties run mode at runtime ?

Hi,

How can I change flow properties run mode from e.g. normal to skip at runtime ?

I would like to execute my sequence in different measurement instrument setups and running of all sub-sequencies is not possible in certain setups.

I use TestStand 3.5. 

regards,

Petri

  

0 Kudos
Message 1 of 5
(3,433 Views)

Hi,

 

Maybe you could use the preconditions property on the subsequence calls, depending on the setup condition.

It's easier than changing the flow property at runtime.

 

If the precondition is ok, the step is executed.

If the precondition is ko, the step is skipped.

 

Bruno

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

 

Thanks, I should go for that if I don't find solution to change the run mode.

 

In shipped OI, operator has capability to change the run mode in edit time. Benefit, I see, changing the run mode in run time forces the running of sequence to a certain known procedure. 

 

 

0 Kudos
Message 3 of 5
(3,428 Views)

Hi,

 

I agree with bruno_p but if you what to change the run mode use the TS API method Step.SetRunModeEx()

SetRunModeEx Method

Syntax

Step.SetRunModeEx ( newRunMode, [executionParam])

Purpose

Sets the run mode of a step.

Remarks

You can set the run mode either for the sequence file or for a particular execution. If you pass an Execution object for the executionParam parameter, the run mode change only applies to that execution and is lost when the execution is destroyed. If you do not pass an Execution object, the run mode change effects all current and future executions and is saved when you save the sequence file.

Parameters

newRunMode As String

[In] The RunModes constants define the valid values for this parameter.

executionParam As Variant

[In] [Optional] If you want to set the run mode for a particular execution only, pass a reference to an Execution object.

 

 

If you are useing TS4.1 then you can perform TS API calls in expressions therefore you could put your expression in the Step's Pre-Expression or even in the pre-condition.

 

Hope this helps

Regards

Ray Farmer

Message Edited by Ray Farmer on 08-28-2008 12:22 PM
Regards
Ray Farmer
0 Kudos
Message 4 of 5
(3,422 Views)

Thanks for quick response! I can now evaluate the best solution for me.

regards,

Petri

 

0 Kudos
Message 5 of 5
(3,415 Views)