Summary of Stateflow API Objects and Properties
Stateflow® API objects have properties that correspond to the values you set in the
Stateflow Editor. For example, to use the editor to change the position of a state,
you click and drag the state. With the Stateflow API, you change the position of a state by modifying the
Position
property of the corresponding Stateflow.State
object:
st.Position = [10 20 100 80];
The following reference tables for Stateflow API properties have these columns:
Property Name — The name of the property. To access or set a property value, use its name in dot notation along with a Stateflow object.
Access — An access type for the property.
RW (read/write): You can access or set the value of these properties by using the Stateflow API.
RO (read-only): These properties are set by the Stateflow software.
Description — A description of the property.
Stateflow.Annotation
Use Stateflow.Annotation
objects to include descriptive comments
in your chart. Annotations can contain any combination of:
Text
Images
Equations using TeX commands
Hyperlinks that open a website or perform MATLAB® functions
For more information, see Add Descriptive Comments in a Chart.
Property Name | Access | Description |
---|---|---|
Alignment | RW | Alignment of the annotation text, specified as |
AutoBackgroundColor | RW | Whether to use the default background color, specified as a numeric or logical 1
(
|
AutoForegroundColor | RW | Whether to use the default foreground color, specified as a numeric or logical 1
(
|
BackgroundColor | RW | Background color for the annotation, specified as a three-element numeric vector
of the form |
Chart | RO | Chart that contains the annotation, specified as a
|
ClickFcn | RW | Callback on click, specified as a string scalar or character vector. This callback contains MATLAB code to execute when to execute when you click the annotation. |
DeleteFcn | RW | Callback at delete, specified as a string scalar or character vector. This callback contains MATLAB code to execute before you delete the annotation. |
Description | RW | Description for the annotation, specified as a string scalar or character vector. |
Document | RW | Document link for the annotation, specified as a string scalar or character vector. |
DropShadow | RW | Whether to display a drop shadow around the annotation box, specified as a numeric
or logical 1 ( |
FixedHeight | RW | Whether to fix the height of the annotation box, specified as a numeric or logical
1 (
|
FixedWidth | RW | Whether to fix the width of the annotation box, specified as a numeric or logical
1 (
|
Font | RW | Font for the annotation text, specified as a
|
ForegroundColor | RW | Foreground color for the annotation, specified as a three-element numeric vector
of the form |
Id | RO | Unique identifier, specified as an integer scalar. Use this property to distinguish the annotation from other objects in the model. The value of this property is reassigned every time you start a new MATLAB session and may be recycled after an object is deleted. |
InternalMargins | RW | Space between the text and the border of the annotation box, specified as a
four-element numeric vector of the form |
Interpretation | RW | Format of the annotation text, specified as |
IsImage | RO | Whether the annotation contains an image, specified as a numeric or logical 1
( |
LoadFcn | RW | Callback at model load, specified as a string scalar or character vector. This callback contains MATLAB code to execute when you load the model that contains the annotation. |
Machine | RO | Machine that contains the annotation, specified as a |
Path | RO | Location of the parent of the annotation in the model hierarchy, specified as a character vector. |
PlainText | RO | Annotation text without formatting, specified as a character vector. |
Position | RW | Position and size of annotation box, specified as a four-element numeric vector of
the form |
Subviewer | RO | Subviewer for the annotation, specified as a |
Tag | RW | User-defined tag for the annotation, specified as data of any type. |
Text | RW | Text for the annotation, specified as a string scalar or character vector. |
UseDisplayTextAsClickCallback | RW | Whether to use the annotation text as a callback, specified as a numeric or
logical 1 ( |
Stateflow.AtomicBox
Use Stateflow.AtomicBox
objects to encapsulate graphical, truth
table, MATLAB, and Simulink® functions in a separate namespace. Atomic boxes allow for:
Faster simulation after making small changes to a function in a chart with many states or levels of hierarchy
Reuse of the same functions across multiple charts and models
Ease of team development for people working on different parts of the same chart
Manual inspection of generated code for a specific function in a chart
For more information, see Reuse Functions by Using Atomic Boxes.
Property Name | Access | Description |
---|---|---|
BadIntersection | RO | Whether the atomic box graphically intersects a box, state, or function, specified
as a numeric or logical 1 ( |
Chart | RO | Chart that contains the atomic box, specified as a
|
CommentText | RW | Comment text for the atomic box, specified as a string scalar or character vector.
This property applies only when the |
ContentPreviewEnabled | RW | Whether to display a preview of the atomic box contents, specified as a numeric or
logical 1 ( |
Description | RW | Description for the atomic box, specified as a string scalar or character vector. |
Document | RW | Document link for the atomic box, specified as a string scalar or character vector. |
FontSize | RW | Font size for the atomic box label, specified as a scalar. The
|
Id | RO | Unique identifier, specified as an integer scalar. Unlike
|
IsCommented | RO | Whether the atomic box is commented out, specified as a numeric or logical 1
( |
IsExplicitlyCommented | RW | Whether to comment out the atomic box, specified as a numeric or logical 1
( |
IsImplicitlyCommented | RO | Whether the atomic box is implicitly commented out, specified as a numeric or
logical 1 ( |
IsLink | RO | Whether the atomic box is a library link, specified as a numeric or logical 1
( |
LabelString | RW | Label for the atomic box, specified as a string scalar or character vector. |
Machine | RO | Machine that contains the atomic box, specified as a |
Name | RW | Name of the atomic box, specified as a string scalar or character vector. |
Path | RO | Location of the parent of the atomic box in the model hierarchy, specified as a character vector. |
Position | RW | Position and size of the atomic box, specified as a four-element numeric vector of
the form |
SSIdNumber | RO | Session-independent identifier, specified as an integer scalar. Use this property to distinguish the atomic box from other objects in its parent chart. |
Subchart | RO | Contents of the atomic box, specified as a |
Subviewer | RO | Subviewer for the atomic box, specified as a |
Tag | RW | User-defined tag for the atomic box, specified as data of any type. |
Stateflow.AtomicSubchart
Use Stateflow.AtomicSubchart
objects to create independent
subcomponents in a Stateflow chart. Atomic subcharts allow for:
Reuse of the same state or subchart across multiple charts and models
Faster simulation after making small changes to a chart with many states or levels of hierarchy
Ease of team development when multiple people are working on different parts of the same chart
Manual inspection of generated code for a specific state or subchart in a chart
For more information, see Create Reusable Subcomponents by Using Atomic Subcharts.
Property Name | Access | Description |
---|---|---|
ArrowSize | RW | Size of incoming transition arrows, specified as a scalar. |
BadIntersection | RO | Whether the atomic subchart graphically intersects a box, state, or function, specified
as a numeric or logical 1 ( |
Chart | RO | Chart that contains the atomic subchart, specified as a
|
CommentText | RW | Comment text for the atomic subchart, specified as a string scalar or character
vector. This property applies only when the |
ContentPreviewEnabled | RW | Whether to display a preview of the atomic subchart contents, specified as a
numeric or logical 1 ( |
Debug | RW | Debugger properties for the state, atomic subchart, or Simulink based state, specified as a
For more information, see Set Breakpoints to Debug Charts. |
Description | RW | Description for the atomic subchart, specified as a string scalar or character vector. |
Document | RW | Document link for the atomic subchart, specified as a string scalar or character vector. |
ExecutionOrder | RW | Execution order for the atomic subchart in parallel (AND) decomposition, specified as an integer scalar. This property applies only when both of these conditions are satisfied:
|
FontSize | RW | Font size for the atomic subchart label, specified as a scalar. The
|
HasOutputData | RW | Whether to create an active state data output port for the atomic subchart,
specified as a numeric or logical 1 ( |
Id | RO | Unique identifier, specified as an integer scalar. Unlike
|
IsCommented | RO | Whether the atomic subchart is commented out, specified as a numeric or logical 1
( |
IsExplicitlyCommented | RW | Whether to comment out the atomic subchart, specified as a numeric or logical 1
( |
IsImplicitlyCommented | RO | Whether the atomic subchart is implicitly commented out, specified as a numeric or
logical 1 ( |
IsLink | RO | Whether the atomic subchart is a library link, specified as a numeric or logical 1
( |
LabelString | RW | Label for the atomic subchart, specified as a string scalar or character vector. |
LoggingInfo | RW | Signal logging properties for the atomic subchart, specified as a
Signal logging saves the self activity of the atomic subchart to the MATLAB workspace during simulation. For more information, see Log Simulation Output for States and Data. |
Machine | RO | Machine that contains the atomic subchart, specified as a |
Name | RW | Name of the atomic subchart, specified as a string scalar or character vector. |
OutputData | RO | Active state data object for the atomic subchart, specified as a |
OutputMonitoringMode | RW | Monitoring mode for the active state output data, specified as a string scalar or
character vector. For atomic subcharts, the only option is
|
OutputPortName | RW | Name of the active state data object for the atomic subchart, specified as a
string scalar or character vector. This property applies only when the
|
Path | RO | Location of the parent of the atomic subchart in the model hierarchy, specified as a character vector. |
Position | RW | Position and size of the atomic subchart, specified as a four-element numeric vector of
the form |
SSIdNumber | RO | Session-independent identifier, specified as an integer scalar. Use this property to distinguish the atomic subchart from other objects in the model. |
Subchart | RO | Contents of the atomic subchart, specified as a |
Subviewer | RO | Subviewer for the atomic subchart, specified as a
|
Tag | RW | User-defined tag for the atomic subchart, specified as data of any type. |
TestPoint | RW | Whether to set the atomic subchart as a test point, specified as a numeric or
logical 1 ( |
Type | RO | Decomposition of sibling states, specified as |
Stateflow.Box
Use Stateflow.Box
objects to organize objects such as functions
and states in your chart. You can also use a box to encapsulate states and functions in a
separate namespace. For more information, see Group Chart Objects by Using Boxes.
Property Name | Access | Description |
---|---|---|
BadIntersection | RO | Whether the box graphically intersects a box, state, or function, specified
as a numeric or logical 1 ( |
Chart | RO | Chart that contains the box, specified as a |
CommentText | RW | Comment text for the box, specified as a string scalar or character vector. This
property applies only when the |
ContentPreviewEnabled | RW | Whether to display a preview of the box contents, specified as a numeric or
logical 1 ( |
Description | RW | Description for the box, specified as a string scalar or character vector. |
Document | RW | Document link for the box, specified as a string scalar or character vector. |
ExecutionOrder | RW | Execution order for the substates of the box in parallel (AND) decomposition, specified as an integer scalar. This property applies only when both of these conditions are satisfied:
|
FontSize | RW | Font size for the box label, specified as a scalar. The
|
Id | RO | Unique identifier, specified as an integer scalar. Use this property to distinguish the box from other objects in the model. The value of this property is reassigned every time you start a new MATLAB session and may be recycled after an object is deleted. |
IsCommented | RO | Whether the box is commented out, specified as a numeric or logical 1
( |
IsExplicitlyCommented | RW | Whether to comment out the box, specified as a numeric or logical 1
( |
IsGrouped | RW | Whether the box is a grouped box, specified as a numeric or logical 1
( |
IsImplicitlyCommented | RO | Whether the box is implicitly commented out, specified as a numeric or logical 1
( |
IsSubchart | RW | Whether the box is a subchart, specified as a numeric or logical 1
( |
LabelString | RW | Label for the box, specified as a string scalar or character vector. |
Machine | RO | Machine that contains the box, specified as a |
Name | RW | Name of the box, specified as a string scalar or character vector. |
Path | RO | Location of the parent of the box in the model hierarchy, specified as a character vector. |
Position | RW | Position and size of the box, specified as a four-element numeric vector of
the form |
Subviewer | RO | Subviewer for the box, specified as a |
Tag | RW | User-defined tag for the box, specified as data of any type. |
Stateflow.Chart
Use a Stateflow.Chart
object to create a graphical representation
of a finite state machine based on a state transition diagram. In a Chart block, states and transitions form the basic building blocks of a sequential
logic system. States correspond to operating modes and transitions represent pathways between
states. For more information, see Model Finite State Machines by Using Stateflow Charts and Create Charts by Using the Stateflow API.
Property Name | Access | Description |
---|---|---|
ActionLanguage | RW | Action language used to program the chart, specified as
|
AllowGlobalAccessToExportedFunctions | RW | Whether exported functions from the chart are globally visible in the Simulink model, specified as a numeric or logical 1 ( |
ChartColor | RW | Background color for the chart, specified as a three-element numeric vector of the
form |
ChartUpdate | RW | Activation method for the chart, specified as |
Debug | RW | Debugger properties for the chart, specified as a
For more information, see Set Breakpoints to Debug Charts. |
Decomposition | RW | Decomposition of substates at the top level of containment in the chart, specified
as |
Description | RW | Description for the chart, specified as a string scalar or character vector. |
Dirty | RW | Whether the chart has changed after being opened or saved, specified as a numeric
or logical 1 ( |
DoNotAutogenerateEnum | RW | Whether to define the enumerated data type for the active state data output
manually, specified as a numeric or logical 1 ( |
Document | RW | Document link for the chart, specified as a string scalar or character vector. |
Editor | RO | Editor for the chart, specified as a |
EmlDefaultFimath | RW | Default
This property applies only when the
|
EnableBitOps | RW | Whether to use bit operations in state and transition actions in the chart,
specified as a numeric or logical 1 ( |
EnableNonTerminalStates | RW | Whether to enable super step semantics for the chart, specified as a numeric or
logical 1 ( |
EnableZeroCrossings | RW | Whether to enable zero-crossing detection on state transitions in the chart,
specified as a numeric or logical 1 ( |
EnumTypeName | RW | Name of the enumerated data type for the active state data object for the chart, specified as a string scalar or character vector. For more information, see Enum Name. |
ExecuteAtInitialization | RW | Whether to activate the chart with the start of simulation, specified as a numeric
or logical 1 ( |
ExportChartFunctions | RW | Whether to export chart-level functions to other blocks in the Simulink model, specified as a numeric or logical 1 ( |
GeneratePreprocessorConditionals | RW | Whether the generated code includes a preprocessor conditional statement for the
variant conditions in the chart, specified as a numeric or logical 1
( |
HasOutputData | RW | Whether to create an active state data output port for the chart, specified as a
numeric or logical 1 ( |
Iced | RO | Whether the chart is locked, specified as a numeric or logical 1
( |
Id | RO | Unique identifier, specified as an integer scalar. Use this property to distinguish the chart from other objects in the model. The value of this property is reassigned every time you start a new MATLAB session and may be recycled after an object is deleted. |
InitializeOutput | RW | Whether to initialize the output data every time the chart wakes up, specified as
a numeric or logical 1 ( |
InputFimath | RW | Default
This property applies only to charts that use MATLAB as the action language. |
JunctionColor | RW | Color for junctions in the chart, specified as a three-element numeric vector of
the form |
Locked | RW | Whether the chart is locked, specified as a numeric or logical 1
( |
Machine | RO | Machine that contains the chart, specified as a |
Name | RW | Name of the chart, specified as a string scalar or character vector. |
NonTerminalMaxCounts | RW | Maximum number of transitions the chart can take in one super step, specified as
an integer scalar. This property applies only when the
|
NonTerminalUnstableBehavior | RW | Behavior if a super step for the chart exceeds the maximum number of transitions
specified in the
This property applies only when the
|
OutputData | RO | Active state data object for the chart, specified as a |
OutputMonitoringMode | RW | Monitoring mode for the active state output data, specified as
|
OutputPortName | RW | Name of the active state data object for the chart, specified as a string scalar
or character vector. This property applies only when the
|
Path | RO | Location of the chart in the model hierarchy, specified as a character vector. |
SampleTime | RW | Sample time for activating the chart, specified as a string scalar or character
vector. This property applies only when the |
SaturateOnIntegerOverflow | RW | Whether the data in the chart saturates on integer overflow, specified as a
numeric or logical 1 ( |
StateColor | RW | Color for the boxes, functions, and states in the chart, specified as a
three-element numeric vector of the form |
StateFont | RW | Font for the box, function, and state labels in the chart, specified as a
|
StateLabelColor | RW | Color for the box, function, and state labels in the chart, specified as a
three-element numeric vector of the form |
StateMachineType | RW | State machine semantics implemented by the chart, specified as
|
StatesWhenEnabling | RW | Behavior of the states when a function-call input event reenables the chart, specified as one of these values:
For more information, see Control States in Charts Enabled by Function-Call Input Events. |
SupportVariableSizing | RW | Whether the chart supports variable-size data, specified as a numeric or logical 1
( |
Tag | RW | User-defined tag for the chart, specified as data of any type. |
TransitionColor | RW | Color for transitions in the chart, specified as a three-element numeric vector of
the form |
TransitionFont | RW | Font for the transition labels in the chart, specified as a
|
TransitionLabelColor | RW | Color for the transition labels in the chart, specified as a three-element numeric
vector of the form |
TreatAsFi | RW | Inherited Simulink signals to treat as Fixed-Point Designer™
This property applies only to charts that use MATLAB as the action language. |
TreatDimensionOfLengthOneAsFixedSize | RW | Whether the chart treats output data with a dimension of length 1 as fixed size,
specified as a numeric or logical |
Visible | RW | Whether the Stateflow Editor window is displaying the chart, specified as a numeric or logical
1 ( |
Stateflow.Clipboard
Use the Stateflow.Clipboard
object to copy and paste graphical
and nongraphical objects within the same chart, between charts in the same Simulink model, or between charts in different models.
Stateflow.Clipboard
objects do not have any properties.
Stateflow.Data
Use Stateflow.Data
objects to store values that are visible at a
specific level of the Stateflow hierarchy. For more information, see Add Stateflow Data and
Set Data Properties.
Property Name | Access | Description |
---|---|---|
CompiledSize | RO | Data size as determined by the compiler, specified as a character vector. |
CompiledType | RO | Data type as determined by the compiler, specified as a character vector. |
DataType | RW | Type of the data object, specified as a string scalar or character vector that
depends on the
For more information, see the section Add Data in Create Charts by Using the Stateflow API. |
Debug | RW | Debugger properties for the data object, specified as a
|
Description | RW | Description for the data object, specified as a string scalar or character vector. |
Document | RW | Document link for the data object, specified as a string scalar or character vector. |
Id | RO | Unique identifier, specified as an integer scalar. Unlike
|
InitializeMethod | RW | Method for initializing the value of the data object, specified as a string scalar or character vector that depends on the scope of the data:
To specify the initial value of the data object, use the
For more information, see Initialize method. |
LoggingInfo | RW | Signal logging properties for the data object, specified as a
Signal logging saves the values of the data object to the MATLAB workspace during simulation. For more information, see Log Simulation Output for States and Data. |
Machine | RO | Machine that contains the data object, specified as a |
Name | RW | Name of the data object, specified as a string scalar or character vector. |
OutputState | RO | State or chart monitored by the data object, specified as an empty array or a
|
Path | RO | Location of the parent of the data object in the model hierarchy, specified as a character vector. |
Port | RW | Port index for the data object, specified as an integer scalar. This property applies only to input and output data. For more information, see Port. |
Props | RW | Data specification properties, specified as a
|
SSIdNumber | RO | Session-independent identifier, specified as an integer scalar. Use this property to distinguish the data object from other objects in its parent chart. |
SaveToWorkspace | RW | Whether to save the value of the data object to a variable of the same name in the
MATLAB base workspace at the end of the simulation, specified as a numeric or
logical 1 ( |
Scope | RW | Scope of the data object, specified as one of these values:
For more information, see Scope. |
Tag | RW | User-defined tag for the data object, specified as data of any type. |
TestPoint | RW | Whether to set the data object as a test point, specified as a numeric or logical
1 ( |
Tunable | RW | Whether the data object is a tunable parameter, specified as a numeric or logical
1 ( |
UpdateMethod | RW | Method for updating data object, specified as |
Stateflow.EMChart
Use Stateflow.EMChart
objects to configure MATLAB
Function (Simulink) blocks through the Stateflow programmatic interface.
MATLAB Function blocks define custom functionality in Simulink models. Use these blocks when:
You have an existing MATLAB function that models custom functionality, or it is easy for you to create such a function.
Your model requires custom functionality that is not or cannot be captured in the Simulink graphical language.
You find it easier to model custom functionality by using a MATLAB function than by using a Simulink block diagram.
The custom functionality that you want to model does not include continuous or discrete dynamic states. To model dynamic states, use S-functions. See Author Blocks Using MATLAB S-Functions (Simulink).
For more information, see Implement MATLAB Functions in Simulink with MATLAB Function Blocks (Simulink).
Tip
You can also configure the properties of a MATLAB Function block
programmatically by using a MATLABFunctionConfiguration
(Simulink) object. This object provides a direct interface to
the properties of a MATLAB Function block. For more information, see Configure MATLAB Function Blocks Programmatically (Simulink).
Property Name | Access | Description |
---|---|---|
AllowDirectFeedthrough | RW | Whether the MATLAB Function block supports direct feedthrough
semantics, specified as a numeric or logical |
ChartUpdate | RW | Activation method for the MATLAB Function block, specified as
|
Description | RW | Description for the MATLAB Function block, specified as a string scalar or character vector. |
Dirty | RW | Whether the MATLAB Function block has changed after being opened or
saved, specified as a numeric or logical |
Document | RW | Document link for the MATLAB Function block, specified as a string scalar or character vector. |
EmlDefaultFimath | RW | Default
|
Iced | RO | Whether the MATLAB Function block is locked, specified as a numeric
or logical |
Id | RO | Unique identifier, specified as an integer scalar. Use this property to distinguish the MATLAB Function block from other objects in the model. The value of this property is reassigned every time you start a new MATLAB session and may be recycled after an object is deleted. |
InputFimath | RW | Default
|
Inputs | RO | Input arguments of the MATLAB Function block, specified as an array
of |
Locked | RW | Whether the MATLAB Function block is locked, specified as a numeric
or logical |
Machine | RO | Machine that contains the MATLAB Function block, specified as a
|
Name | RW | Name of the MATLAB Function block, specified as a string scalar or character vector. |
Outputs | RO | Output arguments of the MATLAB Function block, specified as an
array of |
Path | RO | Location of the MATLAB Function block in the model hierarchy, specified as a character vector. |
SampleTime | RW | Sample time for activating the MATLAB Function block, specified as
a string scalar or character vector. This property applies only when the
|
SaturateOnIntegerOverflow | RW | Whether the data in the MATLAB Function block saturates on integer
overflow, specified as a numeric or logical |
Script | RW | Code for the MATLAB Function block, specified as a string scalar or character vector. To enter multiple lines of code, you can:
|
SupportVariableSizing | RW | Whether the MATLAB Function block supports variable-size data,
specified as a numeric or logical |
Tag | RW | User-defined tag for the MATLAB Function block, specified as data of any type. |
TreatAsFi | RW | Inherited Simulink signals to treat as Fixed-Point Designer
|
TreatDimensionOfLengthOneAsFixedSize | RW | Whether the MATLAB Function block treats output variables with a
dimension of length 1 as fixed size, specified as a numeric or logical
|
VectorOutputs1D | RW | Whether the MATLAB Function block outputs column vectors as
one-dimensional data, specified as a numeric or logical |
Stateflow.EMFunction
Use Stateflow.EMFunction
objects to create MATLAB functions for coding algorithms that are more easily expressed by using
MATLAB code instead of the graphical Stateflow constructs. Typical applications include:
Matrix-oriented calculations
Data analysis and visualization
You can call a MATLAB function in the actions of states and transitions. For more information, see Reuse MATLAB Code by Defining MATLAB Functions.
Property Name | Access | Description |
---|---|---|
BadIntersection | RO | Whether the MATLAB function graphically intersects a box, state, or function, specified as
a numeric or logical 1 ( |
Chart | RO | Chart that contains the MATLAB function, specified as a
|
CommentText | RW | Comment text for the MATLAB function, specified as a string scalar or character vector. This
property applies only when the |
Description | RW | Description for the MATLAB function, specified as a string scalar or character vector. |
Document | RW | Document link for the MATLAB function, specified as a string scalar or character vector. |
EmlDefaultFimath | RW | Default
This property applies only when the |
FontSize | RW | Font size for the MATLAB function label, specified as a scalar. The
|
Id | RO | Unique identifier, specified as an integer scalar. Unlike
|
InlineOption | RW | Appearance of the MATLAB function in generated code, specified as one of these values:
For more information, see Inline State Functions in Generated Code (Simulink Coder). |
InputFimath | RW | Default
This property applies only when the |
IsCommented | RO | Whether the MATLAB function is commented out, specified as a numeric or logical 1
( |
IsExplicitlyCommented | RW | Whether to comment out the MATLAB function, specified as a numeric or logical 1 ( |
IsImplicitlyCommented | RO | Whether the MATLAB function is implicitly commented out, specified as a numeric or logical
1 ( |
LabelString | RW | Label for the MATLAB function, specified as a string scalar or character vector. |
Machine | RO | Machine that contains the MATLAB function, specified as a |
Name | RW | Name of the MATLAB function, specified as a string scalar or character vector. |
Path | RO | Location of the parent of the MATLAB function in the model hierarchy, specified as a character vector. |
Position | RW | Position and size of the MATLAB function, specified as a four-element numeric vector of
the form |
SSIdNumber | RO | Session-independent identifier, specified as an integer scalar. Use this property to distinguish the MATLAB function from other objects in its parent chart. |
SaturateOnIntegerOverflow | RW | Whether the data in the MATLAB function saturates on integer overflow, specified as a numeric or
logical 1 ( This property applies only when the |
Script | RW | Code for the MATLAB function, specified as a string scalar or character vector. To enter multiple lines of code, you can:
|
Subviewer | RO | Subviewer for the MATLAB function, specified as a |
Tag | RW | User-defined tag for the MATLAB function, specified as data of any type. |
Stateflow.Editor
Use the Stateflow.Editor
object to access the graphical aspects
of a Stateflow chart or state transition table. You can use the
Stateflow.Editor
object to control the position, size, and magnification
level of the Stateflow Editor window.
Property Name | Access | Description |
---|---|---|
WindowPosition | RW | Position and size of the Stateflow editor window, specified as a four-element numeric vector of the form
|
ZoomFactor | RW | Magnification level of the chart or state transition table in the editor, specified
as a scalar value between |
Stateflow.Event
Use Stateflow.Event
objects to trigger actions in one of these
objects:
A parallel state in a Stateflow chart
Another Stateflow chart
A Simulink triggered or function-call subsystem
For more information, see Synchronize Model Components by Broadcasting Events.
Property Name | Access | Description |
---|---|---|
Debug | RW | Debugger properties for the event, specified as a
For more information, see Set Breakpoints to Debug Charts. |
Description | RW | Description for the event, specified as a string scalar or character vector. |
Document | RW | Document link for the event, specified as a string scalar or character vector. |
Id | RO | Unique identifier, specified as an integer scalar. Use this property to distinguish the event from other objects in the model. The value of this property is reassigned every time you start a new MATLAB session and may be recycled after an object is deleted. |
Machine | RO | Machine that contains the event, specified as a |
Name | RW | Name of the event, specified as a string scalar or character vector. |
Path | RO | Location of the parent of the event in the model hierarchy, specified as a character vector. |
Port | RW | Port index for the event, specified as an integer scalar. This property applies only to input and output events. For more information, see Port. |
Scope | RW | Scope of the event, specified as |
Tag | RW | User-defined tag for the event, specified as data of any type. |
Trigger | RW | Type of trigger associated with the event, specified as a string scalar or character vector that depends on the scope of the data:
This property does not apply to local events. For more information, see Trigger. |
Stateflow.Function
Use Stateflow.Function
objects to create graphical functions that
contain control-flow logic and iterative loops. You create graphical functions with flow
charts that use connective junctions and transitions. You can call a graphical function in the
actions of states and transitions. For more information, see Reuse Logic Patterns by Defining Graphical Functions.
Property Name | Access | Description |
---|---|---|
BadIntersection | RO | Whether the graphical function graphically intersects a box, state, or function,
specified as a numeric or logical 1 ( |
Chart | RO | Chart that contains the graphical function, specified as a
|
CommentText | RW | Comment text for the graphical function, specified as a string scalar or character
vector. This property applies only when the |
ContentPreviewEnabled | RW | Whether to display a preview of the graphical function contents, specified as a
numeric or logical 1 ( |
Debug | RW | Debugger properties for the graphical function, specified as a
For more information, see Set Breakpoints to Debug Charts. |
Description | RW | Description for the graphical function, specified as a string scalar or character vector. |
Document | RW | Document link for the graphical function, specified as a string scalar or character vector. |
FontSize | RW | Font size for the graphical function label, specified as a scalar. The
|
Id | RO | Unique identifier, specified as an integer scalar. Unlike
|
InlineOption | RW | Appearance of the graphical function in generated code, specified as one of these values:
For more information, see Inline State Functions in Generated Code (Simulink Coder). |
IsCommented | RO | Whether the graphical function is commented out, specified as a numeric or logical
1 ( |
IsExplicitlyCommented | RW | Whether to comment out the graphical function, specified as a numeric or logical 1
( |
IsGrouped | RW | Whether the function is a grouped function, specified as a numeric or logical 1
( |
IsImplicitlyCommented | RO | Whether the graphical function is implicitly commented out, specified as a numeric
or logical 1 ( |
IsSubchart | RW | Whether the function is a subchart, specified as a numeric or logical 1
( |
LabelString | RW | Label for the graphical function, specified as a string scalar or character vector. |
Machine | RO | Machine that contains the graphical function, specified as a |
Name | RW | Name of the graphical function, specified as a string scalar or character vector. |
Path | RO | Location of the parent of the graphical function in the model hierarchy, specified as a character vector. |
Position | RW | Position and size of the graphical function, specified as a four-element numeric vector of
the form |
SSIdNumber | RO | Session-independent identifier, specified as an integer scalar. Use this property to distinguish the graphical function from other objects in its parent chart. |
Subviewer | RO | Subviewer for the graphical function, specified as a
|
Tag | RW | User-defined tag for the graphical function, specified as data of any type. |
Stateflow.Junction
Use Stateflow.Junction
objects to create junctions
that:
Represent decision points in a transition path
Record the activity of substates inside a superstate
For more information, see Combine Transitions and Junctions to Create Branching Paths and Resume Prior Substate Activity by Using History Junctions.
Property Name | Access | Description |
---|---|---|
ArrowSize | RW | Size of incoming transition arrows, specified as a scalar. |
Chart | RO | Chart that contains the junction, specified as a
|
CommentText | RW | Comment text added to the junction, specified as a string scalar or character
vector. This property applies only when the |
Description | RW | Description for the junction, specified as a string scalar or character vector. |
Document | RW | Document link for the junction, specified as a string scalar or character vector. |
Id | RO | Unique identifier, specified as an integer scalar. Unlike
|
IsCommented | RO | Whether the junction is commented out, specified as a numeric or logical 1
( |
IsExplicitlyCommented | RW | Whether to comment out the junction, specified as a numeric or logical 1
( |
IsImplicitlyCommented | RO | Whether the junction is implicitly commented out, specified as a numeric or
logical 1 ( |
Machine | RO | Machine that contains the junction, specified as a |
Path | RO | Location of the parent of the junction in the model hierarchy, specified as a character vector. |
Position | RW | Position and size of the junction, specified as a
|
SSIdNumber | RO | Session-independent identifier, specified as an integer scalar. Use this property to distinguish the junction from other objects in its parent chart. |
Subviewer | RO | Subviewer for the junction, specified as a |
Tag | RW | User-defined tag for the junction, specified as data of any type. |
Type | RW | Type of junction, specified as one of these values:
|
Stateflow.Machine
From a Stateflow perspective, Stateflow.Machine
objects are equivalent to
Simulink models. A Stateflow.Machine
object contains Stateflow.Chart
, Stateflow.StateTransitionTableChart
, Stateflow.TruthTableChart
, and Stateflow.EMChart
objects that
represent the Stateflow charts, State Transition Table blocks, Truth Table
blocks, and MATLAB Function blocks in a Simulink model. For more information, see Overview of the Stateflow API.
Property Name | Access | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Created | RO | Date of the creation of the machine, specified as a character vector. | ||||||||||
Creator | RW | Creator of the machine, specified as a string scalar or character vector. | ||||||||||
Debug | RW | Debugger properties for charts in the machine, specified as a
| ||||||||||
Description | RW | Description for the machine, specified as a string scalar or character vector. | ||||||||||
Dirty | RW | Whether the Simulink model for the machine has changed after being opened or saved, specified
as a numeric or logical 1 ( | ||||||||||
Document | RW | Document link for the machine, specified as a string scalar or character vector. | ||||||||||
FullFileName | RO | Full file path of the Simulink model for the machine, specified as a character vector. | ||||||||||
Iced | RO | Whether the machine is locked, specified as a numeric or logical 1
( | ||||||||||
Id | RO | Unique identifier, specified as an integer scalar. Use this property to distinguish the machine from other objects in the model. The value of this property is reassigned every time you start a new MATLAB session and may be recycled after an object is deleted. | ||||||||||
IsLibrary | RO | Whether the Simulink model for the machine builds a library and not an application, specified
as a numeric or logical 1 ( | ||||||||||
Locked | RW | Whether the machine is locked, specified as a numeric or logical 1
( | ||||||||||
Modified | RW | Record of modifications to the machine, specified as a string scalar or character vector. | ||||||||||
Name | RO | Name of the Simulink model for the machine, specified as a character vector. | ||||||||||
Path | RO | Location of the machine in the model hierarchy, specified as a character vector. | ||||||||||
Tag | RW | User-defined tag for the machine, specified as data of any type. | ||||||||||
Version | RW | Version of the machine, specified as a string scalar or character vector. |
Stateflow.Message
Use Stateflow.Message
objects to communicate data locally or
between Stateflow charts in Simulink models. For more information, see Communicate with Stateflow Charts by Sending Messages.
Property Name | Access | Description |
---|---|---|
CompiledSize | RO | Message data size as determined by the compiler, specified as a character vector. |
CompiledType | RO | Data type as determined by the compiler, specified as a character vector. |
DataType | RW | Data type of the message, specified as a string scalar or character vector that
depends on the
For more information, see the section Add Data in Create Charts by Using the Stateflow API. |
Description | RW | Description for the message, specified as a string scalar or character vector. |
Document | RW | Document link for the message, specified as a string scalar or character vector. |
Id | RO | Unique identifier, specified as an integer scalar. Unlike
|
InitializeMethod | RW | Method for initializing the value of the message data, specified as a string scalar or character vector that depends on the scope of the message:
To specify the initial value of the message data, use the
For more information, see Initialize method. |
Machine | RO | Machine that contains the message, specified as a |
MessagePriorityOrder | RW | Type of priority queue for the message, specified as one of these values:
This property applies only when the |
Name | RW | Name of the message, specified as a string scalar or character vector. |
Path | RO | Location of the parent of the message in the model hierarchy, specified as a character vector. |
Port | RW | Port index for the message, specified as an integer scalar. This property applies only to input and output messages. For more information, see Port. |
Priority | RW | Priority for the message, specified as a string scalar or character vector. If two distinct messages occur at the same time, this property determines which message is processed first. A smaller numeric value indicates a higher priority. This property applies only to local and output messages in discrete-event charts. For more information, see Create Custom Queuing Systems Using Discrete-Event Stateflow Charts (SimEvents). |
Props | RW | Data specification properties, specified as a
|
QueueCapacity | RW | Length of the internal queue for the message, specified as an integer scalar. This
property applies only to local messages and to input messages that have
|
QueueOverflowDiagnostic | RW | Level of diagnostic action when the number of incoming messages exceeds the queue
capacity for the message, specified as |
QueueType | RW | Order in which messages are removed from the receiving queue, specified as one of these values:
This property applies only to local messages and to input messages that
have |
SSIdNumber | RO | Session-independent identifier, specified as an integer scalar. Use this property to distinguish the message from other objects in its parent chart. |
Scope | RW | Scope of the message, specified as |
Tag | RW | User-defined tag for the message, specified as data of any type. |
UseInternalQueue | RW | Whether the Stateflow chart maintains an internal receiving queue for the input message,
specified as a numeric or logical 1 ( |
Stateflow.Port
Use Stateflow.Port
objects to create ports and junctions that
provide entry and exit connections across boundaries in the Stateflow hierarchy. Entry and exit ports improve componentization by isolating the
transition logic for entering and exiting states. Unlike supertransitions, they can be used in
atomic subcharts. For more information, see Create Entry and Exit Connections Across State Boundaries.
Entry and exit ports are located on the boundary of a state or atomic subchart. Each port
has a matching junction that marks the entry or exit point inside the state or atomic
subchart. The port and junction are represented by separate Stateflow.Port
objects.
Property Name | Access | Description |
---|---|---|
ArrowSize | RW | Size of incoming transition arrows, specified as a scalar. |
Chart | RO | Chart that contains the port or junction, specified as a
|
CommentText | RW | Comment text added to the entry or exit junction, specified as a string scalar or
character vector. This property applies only to entry and exit junctions when the
|
Description | RW | Description for the port or junction, specified as a string scalar or character vector. |
Document | RW | Document link for the port or junction, specified as a string scalar or character vector. |
Home | RO | Home state or subchart, specified as a |
Id | RO | Unique identifier, specified as an integer scalar. Unlike
|
IsCommented | RO | Whether the port or junction is commented out, specified as a numeric or logical 1
( |
IsExplicitlyCommented | RW | Whether to comment out the junction and port pair, specified as a numeric or
logical 1 ( |
IsImplicitlyCommented | RO | Whether the port or junction is implicitly commented out, specified as a numeric
or logical 1 ( |
LabelPosition | RW | Position and size of the port or junction label, specified as a four-element
numeric vector of the form |
LabelString | RW | Label for the port or junction, specified as a string scalar or character vector.
Changing this property automatically sets the |
Linked | RO | Whether the port or junction has a matching junction or port, specified as a
numeric or logical 1 ( |
Machine | RO | Machine that contains the port or junction, specified as a |
Path | RO | Location of the parent of the port or junction in the model hierarchy, specified as a character vector. |
PortType | RO | Type of port or junction, specified as one of these values:
|
Position | RW | Position and size of the port or junction, specified as a
|
SSIdNumber | RO | Session-independent identifier, specified as an integer scalar. Use this property to distinguish the port or junction from other objects in its parent chart. |
Subviewer | RO | Subviewer for the port or junction, specified as a
|
Tag | RW | User-defined tag for the port or junction, specified as data of any type. |
Stateflow.SLFunction
Use Stateflow.SLFunction
objects to create Simulink functions that enable you to call Simulink subsystems in the actions of states and transitions. Typical applications
include:
Defining a function that requires Simulink blocks
Scheduling execution of multiple controllers
For more information, see Reuse Simulink Functions in Stateflow Charts.
Property Name | Access | Description |
---|---|---|
BadIntersection | RO | Whether the Simulink function graphically intersects a box, state, or function, specified as
a numeric or logical 1 ( |
Chart | RO | Chart that contains the Simulink function, specified as a
|
CommentText | RW | Comment text added to the Simulink function, specified as a string scalar or character vector. This
property applies only when the |
ContentPreviewEnabled | RW | Whether to display a preview of the Simulink function contents, specified as a numeric or logical 1
( |
Description | RW | Description for the Simulink function, specified as a string scalar or character vector. |
Document | RW | Document link for the Simulink function, specified as a string scalar or character vector. |
FontSize | RW | Font size for the Simulink function label, specified as a scalar. The
|
Id | RO | Unique identifier, specified as an integer scalar. Unlike
|
IsCommented | RO | Whether the Simulink function is commented out, specified as a numeric or logical 1
( |
IsExplicitlyCommented | RW | Whether to comment out the Simulink function, specified as a numeric or logical 1 ( |
IsImplicitlyCommented | RO | Whether the Simulink function is implicitly commented out, specified as a numeric or logical
1 ( |
LabelString | RW | Label for the Simulink function, specified as a string scalar or character vector. |
Machine | RO | Machine that contains the Simulink function, specified as a |
Name | RW | Name of the Simulink function, specified as a string scalar or character vector. |
Path | RO | Location of the parent of the Simulink function in the model hierarchy, specified as a character vector. |
Position | RW | Position and size of the Simulink function, specified as a four-element numeric vector of
the form |
SSIdNumber | RO | Session-independent identifier, specified as an integer scalar. Use this property to distinguish the Simulink function from other objects in its parent chart. |
Subviewer | RO | Subviewer for the Simulink function, specified as a |
Tag | RW | User-defined tag for the Simulink function, specified as data of any type. |
Stateflow.SimulinkBasedState
Use Stateflow.SimulinkBasedState
objects to create Simulink subsystems within a Stateflow state. With Simulink based states, you can model hybrid dynamic systems or systems that switch
between periodic and continuous time dynamics. For more information, see Simulink Subsystems as States.
Property Name | Access | Description |
---|---|---|
ArrowSize | RW | Size of incoming transition arrows, specified as a scalar. |
BadIntersection | RO | Whether the Simulink based state graphically intersects a box, state, or function, specified as a
numeric or logical 1 ( |
Chart | RO | Chart that contains the Simulink based state, specified as a |
CommentText | RW | Comment text added to the Simulink based state, specified as a string scalar or character vector. This
property applies only when the |
ContentPreviewEnabled | RW | Whether to display a preview of the Simulink based state contents, specified as a numeric or logical 1
( |
Debug | RW | Debugger properties for the Simulink based state, specified as a
For more information, see Set Breakpoints to Debug Charts. |
Description | RW | Description for the Simulink based state, specified as a string scalar or character vector. |
Document | RW | Document link for the Simulink based state, specified as a string scalar or character vector. |
ExecutionOrder | RW | Execution order for the Simulink based state in parallel (AND) decomposition, specified as an integer scalar. This property applies only when both of these conditions are satisfied:
|
FontSize | RW | Font size for the Simulink based state label, specified as a scalar. The
|
HasOutputData | RW | Whether to create an active state data output port for the Simulink based state, specified as a numeric or logical 1
( |
Id | RO | Unique identifier, specified as an integer scalar. Unlike
|
IsCommented | RO | Whether the Simulink based state is commented out, specified as a numeric or logical 1
( |
IsExplicitlyCommented | RW | Whether to comment out the Simulink based state, specified as a numeric or logical 1
( |
IsImplicitlyCommented | RO | Whether the Simulink based state is implicitly commented out, specified as a numeric or
logical 1 ( |
LoggingInfo | RW | Signal logging properties for the Simulink based state, specified as a
Signal logging saves the self activity of the Simulink based state to the MATLAB workspace during simulation. For more information, see Log Simulation Output for States and Data. |
Machine | RO | Machine that contains the Simulink based state, specified as a |
Name | RW | Name of the Simulink based state, specified as a string scalar or character vector. |
OutputData | RO | Active state data object for the Simulink based state, specified as a |
OutputMonitoringMode | RW | Monitoring mode for the active state output data, specified as a string scalar or
character vector. For Simulink based states, the only option is
|
OutputPortName | RW | Name of the active state data object for the Simulink based state, specified as a string scalar or character vector. This
property applies only when the |
Path | RO | Location of the parent of the Simulink based state in the model hierarchy, specified as a character vector. |
Position | RW | Position and size of the Simulink based state, specified as a four-element numeric vector of the
form |
SSIdNumber | RO | Session-independent identifier, specified as an integer scalar. Use this property to distinguish the Simulink based state from other objects in its parent chart. |
Subviewer | RO | Subviewer for the Simulink based state, specified as a |
Tag | RW | User-defined tag for the Simulink based state, specified as data of any type. |
TestPoint | RW | Whether to set the Simulink based state as a test point, specified as a numeric or logical 1
( |
Type | RO | Decomposition of sibling states, specified as |
Stateflow.State
Use Stateflow.State
objects to describe an operating mode of a
reactive system. For more information, see Represent Operating Modes by Using States.
Property Name | Access | Description |
---|---|---|
ArrowSize | RW | Size of incoming transition arrows, specified as a scalar. |
BadIntersection | RO | Whether the state graphically intersects a box, state, or function, specified as a
numeric or logical 1 ( |
Chart | RO | Chart that contains the state, specified as a |
CommentText | RW | Comment text added to the state, specified as a string scalar or character vector.
This property applies only when the |
ContentPreviewEnabled | RW | Whether to display a preview of the state contents, specified as a numeric or
logical 1 ( |
Debug | RW | Debugger properties for the state, specified as a
For more information, see Set Breakpoints to Debug Charts. |
Decomposition | RW | Decomposition of substates at the top level of containment in the state, specified
as |
Description | RW | Description for the state, specified as a string scalar or character vector. |
DoNotAutogenerateEnum | RW | Whether to define the enumerated data type for the active state data output
manually, specified as a numeric or logical 1 ( |
Document | RW | Document link for the state, specified as a string scalar or character vector. |
DuringAction | RO | State |
EntryAction | RO | State |
EnumTypeName | RW | Name of the enumerated data type for the active state data object for the state,
specified as a string scalar or character vector. This property applies only when the
|
ExecutionOrder | RW | Execution order for the state in parallel (AND) decomposition, specified as an integer scalar. This property applies only when both of these conditions are satisfied:
|
ExitAction | RO | State |
FontSize | RW | Font size for the state label, specified as a scalar. The
|
HasOutputData | RW | Whether to create an active state data output port for the state, specified as a
numeric or logical 1 ( |
Id | RO | Unique identifier, specified as an integer scalar. Unlike
|
InlineOption | RW | Appearance of the state functions in generated code, specified as one of these values:
For more information, see Inline State Functions in Generated Code (Simulink Coder). |
IsCommented | RO | Whether the state is commented out, specified as a numeric or logical 1
( |
IsExplicitlyCommented | RW | Whether to comment out the state, specified as a numeric or logical 1
( |
IsGrouped | RW | Whether the state is a grouped state, specified as a numeric or logical 1
( |
IsImplicitlyCommented | RO | Whether the state is implicitly commented out, specified as a numeric or logical 1
( |
IsSubchart | RW | Whether the state is a subchart, specified as a numeric or logical 1
( |
LabelString | RW | Label for the state, specified as a string scalar or character vector. For more information, see Specify Labels in States and Transitions Programmatically. |
LoggingInfo | RW | Signal logging properties for the state, specified as a
Signal logging saves the self activity of the state to the MATLAB workspace during simulation. For more information, see Log Simulation Output for States and Data. |
Machine | RO | Machine that contains the state, specified as a |
MooreAction | RO | State action in a Moore chart, specified as a character vector. The value of this
property depends on the |
Name | RW | Name of the state, specified as a string scalar or character vector. |
OnAction | RO | State {'trigger1','action1',...,'triggerN','actionN'} The value of this property depends on the |
OutputData | RO | Active state data object for the state, specified as a |
OutputMonitoringMode | RW | Monitoring mode for the active state output data, specified as
|
OutputPortName | RW | Name of the active state data object for the state, specified as a string scalar
or character vector. This property applies only when the
|
Path | RO | Location of the parent of the state in the model hierarchy, specified as a character vector. |
Position | RW | Position and size of the state, specified as a four-element numeric vector of the
form |
SSIdNumber | RO | Session-independent identifier, specified as an integer scalar. Use this property to distinguish the state from other objects in its parent chart. |
Subviewer | RO | Subviewer for the state, specified as a |
Tag | RW | User-defined tag for the state, specified as data of any type. |
TestPoint | RW | Whether to set the state as a test point, specified as a numeric or logical 1
( |
Type | RO | Decomposition of sibling states, specified as |
Stateflow.StateTransitionTableChart
Use a Stateflow.StateTransitionTableChart
object to represent a
finite state machine for sequential modal logic in tabular format. Instead of drawing states
and transitions in a Stateflow chart, you can use a State Transition Table block to model a state
machine in a concise, compact format that requires minimal maintenance of graphical objects.
For more information, see Model Finite State Machines Using State Transition Tables.
Property Name | Access | Description |
---|---|---|
ActionLanguage | RW | Action language used to program the state transition table, specified as
|
ChartColor | RW | Background color for the chart that is automatically generated for the state
transition table, specified as a three-element numeric vector of the form
|
ChartUpdate | RW | Activation method for the state transition table, specified as
|
Debug | RW | Debugger properties for the state transition table, specified as a
For more information, see Set Breakpoints to Debug Charts. |
Description | RW | Description for the state transition table, specified as a string scalar or character vector. |
Dirty | RW | Whether the state transition table has changed after being opened or saved,
specified as a numeric or logical 1 ( |
DoNotAutogenerateEnum | RW | Whether to define the enumerated data type for the active state data output
manually, specified as a numeric or logical 1 ( |
Document | RW | Document link for the state transition table, specified as a string scalar or character vector. |
Editor | RO | Editor for the state transition table, specified as a |
EmlDefaultFimath | RW | Default
This property applies only when the |
EnableBitOps | RW | Whether to use bit operations in state and transition actions in the state
transition table, specified as a numeric or logical 1 ( |
EnableNonTerminalStates | RW | Whether to enable super step semantics for the state transition table, specified
as a numeric or logical 1 ( |
EnableZeroCrossings | RW | Whether to enable zero-crossing detection on state transitions in the state
transition table, specified as a numeric or logical 1 ( |
EnumTypeName | RW | Name of the enumerated data type for the active state data object for the state transition table, specified as a string scalar or character vector. For more information, see Enum Name. |
ExecuteAtInitialization | RW | Whether to initialize the state configuration of the state transition table at
time zero instead of at the first input event, specified as a numeric or logical 1
( |
HasOutputData | RW | Whether to create an active state data output port for the state transition table,
specified as a numeric or logical 1 ( |
Iced | RO | Whether the state transition table is locked, specified as a numeric or logical 1
( |
Id | RO | Unique identifier, specified as an integer scalar. Use this property to distinguish the state transition table from other objects in the model. The value of this property is reassigned every time you start a new MATLAB session and may be recycled after an object is deleted. |
InitializeOutput | RW | Whether to initialize the output data every time the state transition table wakes
up, specified as a numeric or logical 1 ( |
InputFimath | RW | Default
This property applies only when the |
JunctionColor | RW | Color for junctions in the chart that is automatically generated for the state
transition table, specified as a three-element numeric vector of the form
|
Locked | RW | Whether the state transition table is locked, specified as a numeric or logical 1
( |
Machine | RO | Machine that contains the state transition table, specified as a |
Name | RW | Name of the state transition table, specified as a string scalar or character vector. |
NonTerminalMaxCounts | RW | Maximum number of transitions the state transition table can take in one super
step, specified as an integer scalar. This property applies only when the
|
NonTerminalUnstableBehavior | RW | Behavior if a super step for the state transition table exceeds the maximum number
of transitions specified in the
This property applies only when the
|
OutputData | RO | Active state data object for the state transition table, specified as a |
OutputMonitoringMode | RW | Monitoring mode for the active state output data, specified as
|
OutputPortName | RW | Name of the active state data object for the state transition table, specified as
a string scalar or character vector. This property applies only when the
|
Path | RO | Location of the state transition table in the model hierarchy, specified as a character vector. |
SampleTime | RW | Sample time for activating the state transition table, specified as a string
scalar or character vector. This property applies only when the
|
SaturateOnIntegerOverflow | RW | Whether the data in the state transition table saturates on integer overflow,
specified as a numeric or logical 1 ( |
StateColor | RW | Color for the states in the chart that is automatically generated for the state
transition table, specified as a three-element numeric vector of the form
|
StateFont | RW | Font for the state labels in the chart that is automatically generated for the
state transition table, specified as a
|
StateLabelColor | RW | Color for the state labels in the chart that is automatically generated for the
state transition table, specified as a three-element numeric vector of the form
|
StateMachineType | RW | State machine semantics implemented by the state transition table, specified as
|
StatesWhenEnabling | RW | Behavior of the states when a function-call input event reenables the state transition table, specified as one of these values:
For more information, see Control States in Charts Enabled by Function-Call Input Events. |
SupportVariableSizing | RW | Whether the state transition table supports variable-size data, specified as a
numeric or logical 1 ( |
Tag | RW | User-defined tag for the state transition table, specified as data of any type. |
TransitionColor | RW | Color for transitions in the chart that is automatically generated for the state
transition table, specified as a three-element numeric vector of the form
|
TransitionFont | RW | Font for the transition labels in the chart that is automatically generated for
the state transition table, specified as a
|
TransitionLabelColor | RW | Color for the transition labels in the chart that is automatically generated for
the state transition table, specified as a three-element numeric vector of the form
|
TreatAsFi | RW | Inherited Simulink signals to treat as Fixed-Point Designer
This property applies only when the |
TreatDimensionOfLengthOneAsFixedSize | RW | Whether the state transition table treats output data with a dimension of length 1
as fixed size, specified as a numeric or logical |
Visible | RW | Whether the Stateflow Editor window is displaying the state transition table, specified as a
numeric or logical 1 ( |
Stateflow.Transition
Use Stateflow.Transition
objects to create transitions from one
operating mode to another. For more information, see Transition Between Operating Modes.
Property Name | Access | Description |
---|---|---|
ArrowSize | RW | Size of the transition arrow at the destination, specified as a scalar. When you
change the destination of the transition, this property resets to the value of the
|
Chart | RO | Chart that contains the transition, specified as a
|
CommentText | RW | Comment text added to the transition, specified as a string scalar or character
vector. This property applies only when the |
Condition | RO | Transition condition, specified as a character vector. The value of this property
depends on the |
ConditionAction | RO | Transition condition action, specified as a character vector. The value of this
property depends on the |
Debug | RW | Debugger properties for the transition, specified as a
For more information, see Set Breakpoints to Debug Charts. |
Description | RW | Description for the transition, specified as a string scalar or character vector. |
Destination | RW | Destination of the transition, specified as an empty array or a Stateflow API object of one of these types:
|
DestinationEndPoint | RW | Position of the transition endpoint at its destination, specified as a two-element
numeric vector |
DestinationOClock | RW | Location of the transition endpoint at its destination, specified as a scalar between 0 and 12 that describes a clock position. |
Document | RW | Document link for the transition, specified as a string scalar or character vector. |
ExecutionOrder | RW | Execution order for the transition when its source is active, specified as an
integer scalar. This property applies only when the
|
FontSize | RW | Font size for the transition label, specified as a scalar. The
|
Id | RO | Unique identifier, specified as an integer scalar. Unlike
|
IsCommented | RO | Whether the transition is commented out, specified as a numeric or logical 1
( |
IsExplicitlyCommented | RW | Whether to comment out the transition, specified as a numeric or logical 1
( |
IsImplicitlyCommented | RO | Whether the transition is implicitly commented out, specified as a numeric or
logical 1 ( |
IsVariant | RW | Whether the transition is a variant transition, specified as a numeric or logical
1 ( |
LabelPosition | RW | Position and size of the transition label, specified as a four-element numeric
vector of the form |
LabelString | RW | Label for the transition, specified as a string scalar or character vector. For more information, see Specify Labels in States and Transitions Programmatically. |
Machine | RO | Machine that contains the transition, specified as a |
MidPoint | RW | Position of the midpoint of the transition, specified as a two-element numeric
vector |
Path | RO | Location of the parent of the transition in the model hierarchy, specified as a character vector. |
SSIdNumber | RO | Session-independent identifier, specified as an integer scalar. Use this property to distinguish the transition from other objects in its parent chart. |
Source | RW | Source of the transition, specified as an empty array or a Stateflow API object of one of these types:
|
SourceEndpoint | RW | Position of the transition endpoint at its source, specified as a two-element
numeric vector |
SourceOClock | RW | Location of the transition endpoint at its source, specified as a scalar between 0 and 12 that describes a clock position. |
Subviewer | RO | Subviewer for the transition, specified as a |
Tag | RW | User-defined tag for the transition, specified as data of any type. |
TransitionAction | RO | Transition action, specified as a character vector. The value of this property
depends on the |
Trigger | RO | Transition trigger, specified as a character vector. The value of this property
depends on the |
Stateflow.TruthTable
Use Stateflow.TruthTable
objects to create truth table functions
that implement combinatorial logic design in a tabular format. You can use truth table
functions to model decision making for fault detection and management and mode switching. For
more information, see Use Truth Tables to Model Combinatorial Logic.
Property Name | Access | Description |
---|---|---|
ActionTable | RW | Action table for the truth table, specified as a cell array of character vectors. |
BadIntersection | RO | Whether the truth table graphically intersects a box, state, or function,
specified as a numeric or logical 1 ( |
Chart | RO | Chart that contains the truth table, specified as a
|
CommentText | RW | Comment text added to the truth table, specified as a string scalar or character
vector. This property applies only when the |
ConditionTable | RW | Condition table for the truth table, specified as a cell array of character vectors. |
Debug | RW | Debugger properties for the truth table, specified as a
This property applies only when both the |
Description | RW | Description for the truth table, specified as a string scalar or character vector. |
Document | RW | Document link for the truth table, specified as a string scalar or character vector. |
EmlDefaultFimath | RW | Default
This property applies only when the |
FontSize | RW | Font size for the truth table label, specified as a scalar. The
|
Id | RO | Unique identifier, specified as an integer scalar. Unlike
|
InlineOption | RW | Appearance of the truth table in generated code, specified as one of these values:
For more information, see Inline State Functions in Generated Code (Simulink Coder). |
InputFimath | RW | Default
This property applies only when the |
IsCommented | RO | Whether the truth table is commented out, specified as a numeric or logical 1
( |
IsExplicitlyCommented | RW | Whether to comment out the truth table, specified as a numeric or logical 1
( |
IsImplicitlyCommented | RO | Whether the truth table is implicitly commented out, specified as a numeric or
logical 1 ( |
LabelString | RW | Label for the truth table, specified as a string scalar or character vector. |
Language | RW | Action language used to program the truth table, specified as
|
Machine | RO | Machine that contains the truth table, specified as a |
Name | RW | Name of the truth table, specified as a string scalar or character vector. |
OverSpecDiagnostic | RW | Level of diagnostic action when the truth table is overspecified, specified as
|
Path | RO | Location of the parent of the truth table in the model hierarchy, specified as a character vector. |
Position | RW | Position and size of the truth table, specified as a four-element numeric vector
of the form |
SSIdNumber | RO | Session-independent identifier, specified as an integer scalar. Use this property to distinguish the truth table from other objects in the model. |
SaturateOnIntegerOverflow | RW | Whether the data in the truth table saturates on integer overflow, specified as a
numeric or logical 1 ( |
Subviewer | RO | Subviewer for the truth table, specified as a |
Tag | RW | User-defined tag for the truth table, specified as data of any type. |
UnderSpecDiagnostic | RW | Level of diagnostic action when the truth table is underspecified, specified as
|
Stateflow.TruthTableChart
Use Stateflow.TruthTableChart
objects to implement combinatorial
logic design in a tabular format. You can use Truth
Table blocks to model decision making for fault detection and management and mode
switching. For more information, see Use Truth Tables to Model Combinatorial Logic.
Property Name | Access | Description |
---|---|---|
ActionTable | RW | Action table for the truth table, specified as a cell array of character vectors. |
ChartUpdate | RW | Activation method for the truth table, specified as
|
ConditionTable | RW | Condition table for the truth table, specified as a cell array of character vectors. |
Description | RW | Description for the truth table, specified as a string scalar or character vector. |
Dirty | RW | Whether the truth table has changed after being opened or saved, specified as a
numeric or logical 1 ( |
Document | RW | Document link for the truth table, specified as a string scalar or character vector. |
EmlDefaultFimath | RW | Default
|
Iced | RO | Whether the truth table is locked, specified as a numeric or logical 1
( |
Id | RO | Unique identifier, specified as an integer scalar. Use this property to distinguish the truth table from other objects in the model. The value of this property is reassigned every time you start a new MATLAB session and may be recycled after an object is deleted. |
InputFimath | RW | Default
|
Locked | RW | Whether the truth table is locked, specified as a numeric or logical 1
( |
Machine | RO | Machine that contains the truth table, specified as a |
Name | RW | Name of the truth table, specified as a string scalar or character vector. |
OverSpecDiagnostic | RW | Level of diagnostic action when the truth table is overspecified, specified as
|
Path | RO | Location of the truth table in the model hierarchy, specified as a character vector. |
SampleTime | RW | Sample time for activating the truth table, specified as a string scalar or
character vector. This property applies only when the |
SaturateOnIntegerOverflow | RW | Whether the data in the truth table saturates on integer overflow, specified as a
numeric or logical 1 ( |
SupportVariableSizing | RW | Whether the truth table supports variable-size data, specified as a numeric or
logical 1 ( |
Tag | RW | User-defined tag for the truth table, specified as data of any type. |
TreatAsFi | RW | Inherited Simulink signals to treat as Fixed-Point Designer
|
TreatDimensionOfLengthOneAsFixedSize | RW | Whether the truth table treats output data with a dimension of length 1 as fixed
size, specified as a numeric or logical |
UnderSpecDiagnostic | RW | Level of diagnostic action when the truth table is underspecified, specified as
|
See Also
sfclipboard
| sfnew
| sfroot