sltest.testsequence.editTransition
Edit test sequence step transition
Description
sltest.testsequence.editTransition(
edits transition blockPath
,stepPath
,index
,Name,Value
)index
in stepPath
of the
Test Sequence block blockPath
. Transition
properties are specified by Name,Value
.
Examples
Add and Edit a Test Step Transition
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';
load_system(Model);
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',... 'AttitudeLevels.APEngagement_End')
3. Edit the transition index, condition, and next step of the first transition.
sltest.testsequence.editTransition('sltestRollRefTestExample/Test Sequence',... 'AttitudeLevels.APEngage_LowRoll',1,'Index',2,... 'NextStep','AttitudeLevels.APEngage_HighRoll',... 'Condition','duration(DD_PhiRef == 0,sec) >= 5')
4. Close the model.
close_system(Model,0)
Input Arguments
blockPath
— Test Sequence block path or handle
string | character vector
Path to a Test Sequence block, including the block name, specified as a string or character vector. Instead of the block path, you can use a block handle.
Example: 'FanSpeedTestHarness/Test Sequence'
stepPath
— Test step name and hierarchy level
character vector
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'
index
— Transition index
integer
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 Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: 'Condition','error == 1','NextStep','Stop','Index',
3
Condition
— Condition on which the transition executes
character vector
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'
NextStep
— Destination step of the transition
character vector
The name of the destination step of the transition, which is next in the sequence if the transition condition is satisfied.
Example: 'RampAngle'
Index
— Transition index
integer
Integer specifying the new transition index to be applied
Example: 'Index',2
Version History
Introduced in R2017a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)