Main Content


Edit test sequence step transition


sltest.testsequence.editTransition(blockPath,stepPath,index,Name,Value) edits transition index in stepPath of the Test Sequence block blockPath. Transition properties are specified by Name,Value.


collapse all

This example adds a transition to a test step, then changes the transition's index, condition, and next step of the first transition in the step.

1. Load the model.

Model = 'sltestRollRefTestExample';

2. Add a transition to the step AttitudeLevels.APEngage.LowRoll. The transition destination is the step AttitudeLevels.APEngage_End.

sltest.testsequence.addTransition('sltestRollRefTestExample/Test Sequence',...
'AttitudeLevels.APEngage_LowRoll','TurnKnob ~= 0',...

3. Edit the transition index, condition, and next step of the first transition.

sltest.testsequence.editTransition('sltestRollRefTestExample/Test Sequence',...
'Condition','duration(DD_PhiRef == 0,sec) >= 5')

4. Close the model.


Input Arguments

collapse all

Path to a Test Sequence block, including the block name, specified as a string or character vector.

Example: 'FanSpeedTestHarness/Test Sequence'

Path of the step in the Test Sequence block, specified as a character vector. The path includes the step location in the Test Sequence hierarchy, using . to separate hierarchy levels. If the Test Sequence block is using scenarios, add the scenario name that contains the step to the beginning of the step path, for example, Scenario_2.SystemHeatingTest.InitializeHeating.

Example: 'SystemHeatingTest.InitializeHeating'

Integer specifying the transition in the test step to be edited. Corresponds to the integer displayed in the Transition cell of the Test Sequence Editor.

Example: 3

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'Condition','error == 1','NextStep','Stop','Index', 3

The condition on which the transition executes, specified as a character vector. To execute the transition, enter a valid logical expression.

Example: 'theta == 0 && a == 1'

The name of the destination step of the transition, which is next in the sequence if the transition condition is satisfied.

Example: 'RampAngle'

Integer specifying the new transition index to be applied

Example: 'Index',2

Introduced in R2017a