The following reference tables for Stateflow® API properties and methods have these columns:
Name — The name of the property or method.
To access or set a property value or to call a method, use its name in dot notation
along with a Stateflow object. Properties with multiple levels of hierarchy (such as the
LoggingInfo
and Props
properties of data
objects) must be set individually. For more information, see Access Properties and Methods of Stateflow Objects.
Type — The data type for the property. Some
property types are other Stateflow API objects. For example, the Machine
property of an
object is the Stateflow.Machine
object that contains the
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 or method.
These methods create Stateflow API objects. Each method takes a parent object as an input and returns a handle to the new object. For more information, see Create and Destroy Stateflow Objects.
Name | Description |
---|---|
Stateflow.Annotation | Create an annotation in a parent chart, state, box, or function. See Properties and Methods. |
Stateflow.AtomicBox | Create an atomic box in a parent chart, state, box, or function. See Properties and Methods. |
Stateflow.AtomicSubchart | Create an atomic subchart in a parent chart, state, or box. See Properties and Methods. |
Stateflow.Box | Create a box in a parent chart, state, box, or function. See Properties and Methods. |
Stateflow.Data | Create a data in a parent machine, chart, state, box, or function. See Properties and Methods. |
Stateflow.EMFunction | Create a MATLAB® function in a parent chart, state, box, or function. See Properties and Methods. |
Stateflow.Event | Create an event in a parent chart, state, or box. See Properties and Methods. |
Stateflow.Function | Create a graphical function in a parent chart, state, box, or function. See Properties and Methods. |
Stateflow.Junction | Create a junction in a parent chart, state, box, or function. See Properties and Methods. |
Stateflow.Message | Create a message in a parent chart, state, or box. See Properties and Methods. |
Stateflow.SimulinkBasedState | Create a Simulink® based state in a parent chart, state, or box. See Properties and Methods. |
Stateflow.SLFunction | Create a Simulink function in a parent chart, state, box, or function. See Properties and Methods. |
Stateflow.State | Create a state in a parent chart, state, or box. See Properties and Methods. |
Stateflow.Transition | Create a transition in a parent chart, state, box, or function. See Properties and Methods. |
Stateflow.TruthTable | Create a truth table function in a parent chart, state, box, or function. See Properties and Methods. |
Root
ObjectThe Root
object is the parent of all Stateflow API objects. You automatically create a Root
object when
you load a Simulink model that contains a Stateflow chart or call the function sfnew
. To create a handle to the Root
object, call the
sfroot
function:
rt = sfroot;
Name | Description |
---|---|
classhandle | Return a read-only handle to the schema class of the Root
object type. |
find | Find all objects inside the |
get | Return the value of the specified property for the
|
set | Set the value of the specified property for the |
struct | Return a MATLAB structure that contains all of the property values for the
|
Stateflow.Annotation
To create an annotation in a parent chart, state, box, or function, use the constructor
method Stateflow.Annotation
. For example, if
ch
is a handle to a Chart
object,
enter:
an = Stateflow.Annotation(ch);
Name | Type | Access | Description |
---|---|---|---|
Alignment | Enum | RW | Alignment of the text in this annotation. Options are
'CENTER' , 'LEFT' (default), or
'RIGHT' . |
AutoBackgroundColor | Boolean | RW | Use the automatic background color for this annotation. Default value is
true . |
AutoForegroundColor | Boolean | RW | Use the automatic foreground text color for this annotation. Default value is
true . |
BackgroundColor | Numeric vector | RW | Background color for this annotation. Numeric vector [r g
b] that specifies the red, green, and blue values of the color
normalized to the range 0.0 to 1.0. Default value is [1 1
1] . |
Chart | Chart | RO | Chart that contains this annotation. |
ClickFcn | Character vector | RW | MATLAB code to execute when you click this annotation. Default value is
'' . |
DeleteFcn | Character vector | RW | MATLAB code to execute before you delete this annotation. Default value is
'' . |
Description | Character vector | RW | Description of this annotation. Default value is
'' . |
Document | Character vector | RW | Document link for this annotation. Default value is
'' . |
DropShadow | Boolean | RW | Display a drop shadow. Default value is false . |
FixedHeight | Boolean | RW | Fix the height of the annotation box. Options are:
|
FixedWidth | Boolean | RW | Fix the width of the annotation box. Options are:
|
Font. Angle | Enum | RW | Font angle for the text in this annotation. Options are
'ITALIC' or 'NORMAL' (default). |
Font. Name | Character vector | RO | Font for the text in this annotation. The StateFont.Name
property of the chart that contains the annotation sets the value of this
property. |
Font. Size | Double | RW | Font size for the text in this annotation. The
StateFont.Size property of the chart that contains the
annotation sets the initial value of this property. |
Font. Weight | Enum | RW | Font weight for the text in this annotation. Options are
'BOLD' or 'NORMAL' (default). |
ForegroundColor | Numeric vector | RW | Foreground color for this annotation. Numeric vector [r g
b] that specifies the red, green, and blue values of the color
normalized to the range 0.0 to 1.0. Default value is [0 0
0] . |
Id | Integer | RO | Unique identifier that distinguishes this annotation from other objects in the model. |
InternalMargins | Numeric vector | RW | Space from the bounding box of the text to the borders of this annotation.
Numeric vector [left top right bottom] . Default value is
[0 0 0 0] . |
Interpretation | Enum | RW | Specify how to interpret the contents of the Text property
in this annotation. Options are 'OFF' (default),
'RICH' , or 'TEX' . |
LoadFcn | Character vector | RW | MATLAB code to execute when you load the model that contains this
annotation. Default value is '' . |
Machine | Machine | RO | Machine that contains this annotation. |
Path | Character vector | RO | Location of the parent of this annotation in the model hierarchy. |
PlainText | Character vector | RO | Text for this annotation without formatting. |
Position | Numeric vector | RW | Position and size of this annotation in the chart. Numeric vector
[left top width height] . Default value is [0 0 8
16] . |
Subviewer | Chart , State , Box ,
or Function | RO | Chart or subchart where you can graphically view this annotation. |
Tag | Any type | RW | Tag for this annotation. Holds data of any type. Default value is
[] . |
Text | Character vector | RW | Text for this annotation. Default value is '?' . |
UseDisplayTextAsClickCallback | Boolean | RW | Use the contents of the Text property as the click
function for this annotation. Default value is false . |
Name | Description |
---|---|
classhandle | Return a read-only handle to the schema class of the
Annotation object type. |
delete | Delete this annotation. |
dialog | Open the Annotation properties dialog box. |
disp | Display all properties and values for this annotation. |
fitToView | Zoom in on this annotation in the chart. |
get | Return the value of the specified property for this annotation. |
help | Display all properties and descriptions for this annotation. |
methods | Display all methods for this annotation. |
set | Set the value of the specified property for this annotation. |
setImage | Insert an image into this annotation. |
struct | Return a MATLAB structure that contains all of the property values for this annotation. |
up | Return a handle to the object that contains this annotation. |
view | Zoom in and select this annotation. |
Stateflow.AtomicBox
To create an atomic box in a parent chart, state, box, or function, use the constructor
method Stateflow.AtomicBox
. For example, if
ch
is a handle to a Chart
object,
enter:
ab = Stateflow.AtomicBox(ch);
Name | Type | Access | Description |
---|---|---|---|
ArrowSize | Double | RW | Size of incoming transition arrows for this atomic box. Default value is
8 . |
BadIntersection | Boolean | RO | Indicates if this atomic box graphically intersects a box, state, or function. |
Chart | Chart | RO | Chart that contains this atomic box. |
Description | Character vector | RW | Description of this atomic box. Default value is
'' . |
Document | Character vector | RW | Document link for this atomic box. Default value is
'' . |
FontSize | Double | RW | Font size for the label of this atomic box. The
StateFont.Size property of the chart that contains the atomic
box sets the initial value of this property. |
Id | Integer | RO | Unique identifier that distinguishes this atomic box from other objects in the model. |
IsExplicitlyCommented | Boolean | RW | Explicitly comment out this atomic box. Default value is
false . Equivalent to right-clicking the atomic box and
selecting Comment Out. |
IsImplicitlyCommented | Boolean | RO | Indicates if this atomic box is implicitly commented out. An atomic box is implicitly commented out when you comment out a superstate in its hierarchy. |
IsLink | Boolean | RO | Indicates if this atomic box is a library link. |
LabelString | Character vector | RW | Full label for this atomic box. Default value is
'?' . |
Machine | Machine | RO | Machine that contains this atomic box. |
Name | Character vector | RW | Name of this atomic box. Default value is '' . |
Path | Character vector | RO | Location of the parent of this atomic box in the model hierarchy. |
Position | Numeric vector | RW | Position and size of this atomic box in the chart. Numeric vector
[left top width height] . Default value is [0 0 90
60] . |
Subviewer | Chart , State , Box ,
or Function | RO | Chart or subchart where you can graphically view this atomic box. |
Tag | Any type | RW | Tag for this atomic box. Holds data of any type. Default value is
[] . |
Name | Description |
---|---|
classhandle | Return a read-only handle to the schema class of the
AtomicBox object type. |
delete | Delete this atomic box. |
dialog | Open the Box properties dialog box. |
disp | Display all properties and values for this atomic box. |
find | Find all objects inside this atomic box that match the specified criteria. |
fitToView | Zoom in on this atomic box in the chart. |
get | Return the value of the specified property for this atomic box. |
help | Display all properties and descriptions for this atomic box. |
highlight | Highlight this atomic box in the chart. |
isCommented | Return a Boolean value that indicates if this atomic box is explicitly or implicitly commented out. |
methods | Display all methods for this atomic box. |
set | Set the value of the specified property for this atomic box. |
struct | Return a MATLAB structure that contains all of the property values for this atomic box. |
up | Return a handle to the object that contains this atomic box. |
view | Display the contents of this atomic box. |
Stateflow.AtomicSubchart
To create an atomic subchart in a parent chart, state, or box, use the constructor
method Stateflow.AtomicSubchart
. For example, if
ch
is a handle to a Chart
object,
enter:
as = Stateflow.AtomicSubchart(ch);
Name | Type | Access | Description |
---|---|---|---|
ArrowSize | Double | RW | Size of incoming transition arrows for this atomic subchart. Default value is
8 . |
BadIntersection | Boolean | RO | Indicates if this atomic subchart graphically intersects a box, state, or function. |
Chart | Chart | RO | Chart that contains this atomic subchart. |
Debug. Breakpoints. OnDuring | Boolean | RW | Set the During State breakpoint for this atomic subchart.
Default value is false . |
Debug. Breakpoints. OnEntry | Boolean | RW | Set the On State Entry breakpoint for this atomic
subchart. Default value is false . |
Debug. Breakpoints. OnExit | Boolean | RW | Set the On State Exit breakpoint for this atomic subchart.
Default value is false . |
Description | Character vector | RW | Description of this atomic subchart. Default value is
'' . |
Document | Character vector | RW | Document link for this atomic subchart. Default value is
'' . |
ExecutionOrder | Integer | RW | Order in which this atomic subchart wakes up in parallel (AND) decomposition.
This property applies only when the
UserSpecifiedStateTransitionExecutionOrder property of the
chart that contains the atomic subchart is true . |
FontSize | Double | RW | Font size for the label of this atomic subchart. The
StateFont.Size property of the chart that contains the atomic
subchart sets the initial value of this property. |
HasOutputData | Boolean | RW | Create an active state data output port for this atomic subchart. Default
value is false . See Monitor State Activity Through Active State Data. |
Id | Integer | RO | Unique identifier that distinguishes this atomic subchart from other objects in the model. |
IsExplicitlyCommented | Boolean | RW | Explicitly comment out this atomic subchart. Default value is
false . Equivalent to right-clicking the atomic subchart and
selecting Comment Out. |
IsImplicitlyCommented | Boolean | RO | Indicates if this atomic subchart is implicitly commented out. An atomic subchart is implicitly commented out when you comment out a superstate in its hierarchy. |
IsLink | Boolean | RO | Indicates if this atomic subchart is a library link. |
LabelString | Character vector | RW | Full label for this atomic subchart. Default value is
'?' . |
Machine | Machine | RO | Machine that contains this atomic subchart. |
Name | Character vector | RW | Name of this atomic subchart. Default value is '' . |
OutputData | Data | RO | Active state data object for this atomic subchart. This property applies only
when the HasOutputData property for this atomic subchart is
true . See Monitor State Activity Through Active State Data. |
OutputMonitoringMode | Character vector | RO | Indicates the monitoring mode for the active state output data. For atomic
subcharts, the only option is 'SelfActivity' . |
Path | Character vector | RO | Location of the parent of this atomic subchart in the model hierarchy. |
Position | Numeric vector | RW | Position and size of this atomic subchart in the chart. Numeric vector
[left top width height] . Default value is [0 0 90
60] . |
Subviewer | Chart , State , or
Box | RO | Chart or subchart where you can graphically view this atomic subchart. |
Tag | Any type | RW | Tag for this atomic subchart. Holds data of any type. Default value is
[] . |
TestPoint | Boolean | RW | Set this atomic subchart as a Stateflow test point. Default value is false . See Monitor Test Points in Stateflow Charts. |
Type | Enum | RO | Type of decomposition for this atomic subchart. Options are
'AND' (parallel) or 'OR' (exclusive). The
atomic subchart inherits this property from the Decomposition
property of its parent. |
Name | Description |
---|---|
classhandle | Return a read-only handle to the schema class of the
AtomicSubchart object type. |
delete | Delete this atomic subchart |
dialog | Open the State properties dialog box. |
disp | Display all properties and values for this atomic subchart. |
find | Find all objects inside this atomic subchart that match the specified criteria. |
fitToView | Zoom in on this atomic subchart in the chart. |
get | Return the value of the specified property for this atomic subchart. |
help | Display all properties and descriptions for this atomic subchart. |
highlight | Highlight this atomic subchart in the chart. |
isCommented | Return a Boolean value that indicates if this atomic subchart is explicitly or implicitly commented out. |
methods | Display all methods for this atomic subchart. |
set | Set the value of the specified property for this atomic subchart. |
struct | Return a MATLAB structure that contains all of the property values for this atomic subchart. |
up | Return a handle to the object that contains this atomic subchart. |
view | Display the contents of this atomic subchart. |
Stateflow.Box
To create a box in a parent chart, state, box, or function, use the constructor method
Stateflow.Box
. For example, if
ch
is a handle to a Chart
object,
enter:
bx = Stateflow.Box(ch);
Name | Type | Access | Description |
---|---|---|---|
ArrowSize | Double | RW | Size of incoming transition arrows for this box. Default value is
8 . |
BadIntersection | Boolean | RO | Indicates if this box graphically intersects a box, state, or function. |
Chart | Chart | RO | Chart that contains this box. |
Description | Character vector | RW | Description of this box. Default value is '' . |
Document | Character vector | RW | Document link for this box. Default value is '' . |
FontSize | Double | RW | Font size for the label of this box. The StateFont.Size
property of the chart that contains the box sets the initial value of this
property. |
Id | Integer | RO | Unique identifier that distinguishes this box from other objects in the model. |
IsExplicitlyCommented | Boolean | RW | Explicitly comment out this box. Default value is false .
Equivalent to right-clicking the box and selecting Comment
Out. |
IsGrouped | Boolean | RW | Specify if this box is a group. Default value is false .
See Copy by Grouping. |
IsImplicitlyCommented | Boolean | RO | Indicates if this box is implicitly commented out. A box is implicitly commented out when you comment out a superstate in its hierarchy. |
IsSubchart | Boolean | RW | Specify if this box is a subchart. Default value is
false . |
LabelString | Character vector | RW | Full label for this box. Default value is '?' . |
Machine | Machine | RO | Machine that contains this box. |
Name | Character vector | RW | Name of this box. Default value is '' . |
Path | Character vector | RO | Location of the parent of this box in the model hierarchy. |
Position | Numeric vector | RW | Position and size of this box in the chart. Numeric vector [left top
width height] . Default value is [0 0 90
60] . |
Subviewer | Chart , State , Box ,
or Function | RO | Chart or subchart where you can graphically view this box. |
Tag | Any type | RW | Tag for this box. Holds data of any type. Default value is
[] . |
Name | Description |
---|---|
classhandle | Return a read-only handle to the schema class of the Box
object type. |
defaultTransitions | Return the default transitions at the top level of containment of this box. |
delete | Delete this box. |
dialog | Open the Box properties dialog box. |
disp | Display all properties and values for this box. |
find | Find all objects inside this box that match the specified criteria. |
fitToView | Zoom in on this box in the chart. |
get | Return the value of the specified property for this box. |
help | Display all properties and descriptions for this box. |
highlight | Highlight this box in the chart. |
innerTransitions | Return an array of the transitions that originate in this box and terminate on a contained object. |
isCommented | Return a Boolean value that indicates if this box is explicitly or implicitly commented out. |
methods | Display all methods for this box. |
outerTransitions | Return an array of the transitions that exit the outer edge of this box and terminate on an object outside the containment of this box. |
set | Set the value of the specified property for this box. |
sinkedTransitions | Return all inner and outer transitions whose destination is this box. |
sourcedTransitions | Return all inner and outer transitions whose source is this box. |
struct | Return a MATLAB structure that contains all of the property values for this box. |
up | Return a handle to the object that contains this box. |
view | Zoom in and select this box. If the box is a subchart, display its contents. |
Stateflow.Chart
To create a Simulink model that contains an empty Stateflow chart, call the function sfnew
:
sfnew
Name | Type | Access | Description |
---|---|---|---|
ActionLanguage | Enum | RW | Action language used to program this chart. Options are
'C' or 'MATLAB' (default). See Differences Between MATLAB and C as Action Language Syntax. |
ChartColor | Numeric vector | RW | Background color for this chart. Numeric vector [r g b]
that specifies the red, green, and blue values of the color normalized to the
range 0.0 to 1.0. Default value is [1 0.9608 0.8824] . |
ChartUpdate | Enum | RW | Activation method for this chart. Options are
'CONTINUOUS' , 'DISCRETE' , or
'INHERITED' (default). See Update Method. |
Debug. Breakpoints. OnEntry | Boolean | RW | Set the On Chart Entry breakpoint for this chart. Default
value is false . |
Decomposition | Enum | RW | State decomposition at the top level of containment in this chart. Options
are 'EXCLUSIVE_OR' (default) and
'PARALLEL_AND' . |
Description | Character vector | RW | Description of this chart. Default value is '' . |
Dirty | Boolean | RW | Indicates if this chart has changed since being opened or saved. Default
value is false . |
Document | Character vector | RW | Document link for this chart. Default value is '' . |
Editor | Editor | RO | Editor object for this chart. |
EmlDefaultFimath | Enum | RW | Default
This property applies only to charts that use MATLAB as the action language. |
EnableBitOps | Boolean | RW | Use C-bit operations in state and transition actions in this chart. Default
value is false . This property applies only to charts that use C
as the action language. See Supported Operations for Chart Data. |
EnableNonTerminalStates | Boolean | RW | Use super step semantics for this chart. Default value is
false . See Super Step Semantics. |
EnableZeroCrossings | Boolean | RW | Use zero-crossing detection on state transitions in this chart. Default value
is true . This property applies only when the
ChartUpdate property for this chart is set to
'CONTINUOUS' . See Disable Zero-Crossing Detection. |
ErrorColor | Numeric vector | RW | Color for errors in this chart. Numeric vector [r g b]
that specifies the red, green, and blue values of the color normalized to the
range 0.0 to 1.0. Default value is [1 0 0] . |
ExecuteAt Initialization | Boolean | RW | Initialize the state configuration of this chart at time zero instead of at
the first input event. Default value is false . See Execution of a Chart at Initialization. |
ExportChart Functions | Boolean | RW | Export graphical functions at the chart level to other blocks in the
Simulink model. Default value is false . See Export Stateflow Functions for Reuse. |
GeneratePreprocessorConditions | Boolean | RW | Indicates if the generated code for a chart with variant conditions includes a preprocessor conditional statement. This option is only valid when generating code with Embedded Coder®. |
HasOutputData | Boolean | RW | Create an active state data output port for this chart. Default value is
false . See Monitor State Activity Through Active State Data. |
Iced | Boolean | RO | Equivalent to property Locked . Used internally to prevent
changes in this chart during simulation. |
Id | Integer | RO | Unique identifier that distinguishes this chart from other objects in the model. |
InitializeOutput | Boolean | RW | Apply the initial value of the output data every time this chart wakes up.
Default value is false . See Initialize outputs every time chart wakes up. |
InputFimath | Character vector | RW | Specify the
This property applies only when the
|
JunctionColor | Numeric vector | RW | Color for junctions in this chart. Numeric vector [r g b]
that specifies the red, green, and blue values of the color normalized to the
range 0.0 to 1.0. Default value is [0.6824 0.3294 0] . |
Locked | Boolean | RW | Prevent changes in this chart. Default value is
false . |
Machine | Machine | RO | Machine that contains this chart. |
Name | Character vector | RW | Name of this chart. Default value is 'Chart' . |
NonTerminal MaxCounts | Integer | RW | Maximum number of transitions this chart can take in one super step. Default
value is 1000 . This property applies only when the
EnableNonTerminalStates property for this chart is
true . See Super Step Semantics. |
NonTerminal UnstableBehavior | Enum | RW | Behavior during simulation if this chart exceeds the maximum number of
transitions specified in the
This property applies only when the
|
OutputData | Data | RO | Active state data object for this chart. This property applies only when the
HasOutputData property for this chart is
true . See Monitor State Activity Through Active State Data. |
OutputMonitoringMode | Enum | RW | Indicates the monitoring mode for the active state output data. Options are
'ChildActivity' (default) or
'LeafStateActivity' . This property applies only when the
HasOutputData property for this chart is
true . See Monitor State Activity Through Active State Data. |
Path | Character vector | RO | Location of this chart in the model hierarchy. |
RegisterExported FunctionsWithSimulink | Boolean | RW | Enable the Simulink model to call graphical, truth table, and MATLAB functions in this chart. Default value is false .
See Export Stateflow Functions for Reuse. |
SampleTime | Character vector | RW | Sample time for activating this chart. Default value is
'-1' . This property applies only when the
ChartUpdate property for this chart is
'DISCRETE' . |
SaturateOn IntegerOverflow | Boolean | RW | Specify the behavior of integer overflows in this chart. Options are:
For more information, see Handle Integer Overflow for Chart Data. |
StateColor | Numeric vector | RW | Color for state boxes in this chart. Numeric vector [r g
b] that specifies the red, green, and blue values of the color
normalized to the range 0.0 to 1.0. Default value is [0 0
0] . |
StateFont. Angle | Enum | RW | Font angle for the labels in boxes, functions, and states in this chart.
Options are 'ITALIC' or 'NORMAL'
(default). |
StateFont. Name | Character vector | RW | Font for the labels in annotations, boxes, functions, and states in this
chart. Default value is 'Helvetica' . |
StateFont. Size | Integer | RW | Initial font size for the labels in annotations, boxes, functions, and states
in this chart. Default value is 12 . |
StateFont. Weight | Enum | RW | Font weight for the labels in boxes, functions, and states in this chart.
Options are 'BOLD' or 'NORMAL'
(default). |
StateLabelColor | Numeric vector | RW | Color for state labels in this chart. Numeric vector [r g
b] that specifies the red, green, and blue values of the color
normalized to the range 0.0 to 1.0. Default value is [0 0
0] . |
StateMachineType | Enum | RW | Type of state machine semantics. Options are 'Classic'
(default), 'Mealy' , or 'Moore' . See Overview of Mealy and Moore Machines. |
StatesWhenEnabling | Enum | RW | Specify the behavior of states when a function-call input event reenables this chart. Options are:
This property applies only when the chart contains function-call input events. See Control States in Charts Enabled by Function-Call Input Events. |
StrongDataTyping WithSimulink | Boolean | RW | Use strong data typing when this chart interfaces with Simulink input and output signals. Default value is true .
This property applies only to charts that use C as the action language. See Use strong data typing with Simulink I/O. |
SupportVariableSizing | Boolean | RW | Support input and output data that vary in dimension when simulating this
chart. Default value is true . See Declare Variable-Size Data in Stateflow Charts. |
Tag | Any type | RW | Tag for this chart. Holds data of any type. Default value is
[] . |
TransitionColor | Numeric vector | RW | Color for transitions in this chart. Numeric vector [r g
b] that specifies the red, green, and blue values of the color
normalized to the range 0.0 to 1.0. Default value is [0.2902 0.3294
0.6039] . |
TransitionFont. Angle | Enum | RW | Font angle for the transition labels in this chart. Options are
'ITALIC' or 'NORMAL' (default). |
TransitionFont. Name | Character vector | RW | Font for the transition labels in this chart. Default value is
'Helvetica' . |
TransitionFont. Size | Integer | RW | Initial font size for the transition labels in this chart. Default value is
12 . |
TransitionFont. Weight | Enum | RW | Font weight for the transition labels in this chart. Options are
'BOLD' or 'NORMAL' (default). |
TransitionLabel Color | Numeric vector | RW | Color for the transition labels in this chart. Numeric vector [r g
b] that specifies the red, green, and blue values of the color
normalized to the range 0.0 to 1.0. Default value is [0.2902 0.3294
0.6039] . |
TreatAsFi | Enum | RW | Treat inherited fixed-point and integer signals as Fixed-Point Designer™
This property applies only to charts that use MATLAB as the action language. |
UserSpecifiedState TransitionExecutionOrder | Boolean | RW | Use explicit ordering of parallel states and transitions. Default value is
true . This property applies only to charts that use C as the
action language. See User-specified state/transition execution order. |
Visible | Boolean | RW | Indicates if the editor is displaying this chart. |
Name | Description |
---|---|
classhandle | Return a read-only handle to the schema class of the Chart
object type. |
defaultTransitions | Return the default transitions at the top level of containment of this chart. |
dialog | Open the Chart properties dialog box. |
disp | Display all properties and values for this chart. |
find | Find all objects inside this chart that match the specified criteria. |
fitToView | Zoom in on this chart. |
get | Return the value of the specified property for this chart. |
help | Display all properties and descriptions for this chart. |
methods | Display all methods for this chart. |
parse | Parse this chart. |
set | Set the value of the specified property for this chart. |
struct | Return a MATLAB structure that contains all of the property values for this chart. |
view | Display the contents of this chart. |
Stateflow.Clipboard
To create a handle to the Clipboard
object, call the sfclipboard
function:
cb = sfclipboard;
Stateflow.Data
To create a data object in a parent machine, chart, state, box, or function, use the
constructor method Stateflow.Data
. For example, if
ch
is a handle to a Chart
object,
enter:
x = Stateflow.Data(ch);
Name | Type | Access | Description |
---|---|---|---|
CompiledSize | Character vector | RO | Size of this data object as determined by the compiler. |
CompiledType | Character vector | RO | Type of this data object as determined by the compiler. |
DataType | Character vector | RW | Type of this data object.
For more information, see the section Add Data in Create Charts by Using the Stateflow API. |
Description | Character vector | RW | Description of this data object. Default value is
'' . |
Document | Character vector | RW | Document link for this data object. Default value is
'' . |
Id | Integer | RO | Unique identifier that distinguishes this data object from other objects in the model. |
InitializeMethod | Enum | RW | Method for initializing the value of this data object. Options depend on the scope of the data:
|
LoggingInfo. DataLogging | Boolean | RW | Enable signal logging for this data object. Default value is
false . |
LoggingInfo. DecimateData | Boolean | RW | Limit the amount of data logged by skipping samples. Uses the interval
specified by the LoggingInfo.Decimation property of this data
object. Default value is false . |
LoggingInfo. Decimation | Integer | RW | Decimation interval. Default value is 2 . This value means
the chart logs every other sample of this data object. |
LoggingInfo. LimitDataPoints | Boolean | RW | Limit the number of data points to log. Uses the value specified by the
LoggingInfo.MaxPoints property of this data object. Default
value is false . |
LoggingInfo. MaxPoints | Integer | RW | Maximum number of data points to log. Default value is
5000 . This value means the chart logs the last 5000 data
points generated by the simulation for this data object. |
LoggingInfo. NameMode | Enum | RW | Source of the signal name used to log this data object. Options are:
|
LoggingInfo. LoggingName | Character vector | RW | Custom signal name used for logging this data object. |
Machine | Machine | RO | Machine that contains this data object. |
Name | Character vector | RW | Name of this data object. |
Path | Character vector | RO | Location of the parent of this data object in the model hierarchy. |
Port | Integer | RW | Port index for this data object. This property applies only to input and output data. |
Props. Array. FirstIndex | Character vector | RW | Index for the first element of this data object. Default value is
0 . This property applies only to array data in charts that
use C as the action language. |
Props. Array. IsDynamic | Boolean | RW | Allow the size of this data object to change at run time. Default value is
false . Equivalent to the Variable
Size check box in the Data properties dialog box. See Declare Variable-Size Data in Stateflow Charts. |
Props. Array. Size | Character vector | RW | Size of this data object. Default value is '0' . See Specify Size of Stateflow Data. |
Props. Complexity | Enum | RW | Enable this data object to take complex values. Options are
'On' or 'Off' (default). See Complex Data in Stateflow Charts. |
Props. Frame | Enum | RW | Enable this data object to accept frame-based signals. Options are:
|
Props. InitialValue | Character vector | RW | Initial value of this data object. Default value is
'' . |
Props. Range. Maximum | Character vector | RW | Maximum value for this data object. Default value is
'' . |
Props. Range. Minimum | Character vector | RW | Minimum value for this data object. Default value is
'' . |
Props. Resolve To Signal Object | Boolean | RW | Specify if this data object resolves to a Simulink.Signal
object that you define in the model or base workspace. Default value is
false . See Resolve Data Properties from Simulink Signal Objects. |
Props. Type. BusObject | Character vector | RW | Name of the Simulink.Bus object that defines this data
object. This property applies only when the Props.Type.Method
property of this data object is 'Bus Object' . See Access Bus Signals Through Stateflow Structures. |
Props. Type. EnumType | Character vector | RW | Name of the enumerated type that defines this data object. This property
applies only when the Props.Type.Method property of this data
object is 'Enumerated' . See Reference Values by Name by Using Enumerated Data. |
Props. Type. Expression | Character vector | RW | Expression that evaluates to a data type for this data object. This property
applies only when the Props.Type.Method property of this data
object is 'Expression' . See Specify Data Properties by Using MATLAB Expressions. |
Props. Type. Fixpt. Bias | Character vector | RW | Bias for this data object. This property applies only to fixed-point data
with the Props.Type.Fixpt.ScalingMode property set to
'Slope and bias' . See Fixed-Point Data in Stateflow Charts. |
Props. Type. Fixpt. FractionLength | Character vector | RW | Location of the binary point for this data object. This property applies only
to fixed-point data when the Props.Type.Fixpt.ScalingMode
property is 'Binary point' . See Fixed-Point Data in Stateflow Charts. |
Props. Type. Fixpt. Lock | Boolean | RW | Prevents replacement of the fixed-point type of this data object with
an autoscaled type chosen by the Fixed-Point Tool (Fixed-Point Designer). Default value is
|
Props. Type. Fixpt. ScalingMode | Enum | RW | Method for scaling this data object. Options are 'Binary
point' , 'Slope and bias' , or
'None' (default). This property applies to fixed-point data.
See Fixed-Point Data in Stateflow Charts. |
Props. Type. Fixpt. Slope | Character vector | RW | Slope for this data object. This property applies only to fixed-point data
when the Props.Type.Fixpt.ScalingMode property set to
'Slope and bias' . See Fixed-Point Data in Stateflow Charts. |
Props. Type. Method | Enum | RW | Method for setting the type of this data object. Options depend on the scope of the data:
Equivalent to the Mode field of the Data Type Assistant in the Data properties dialog box. See Specify Type of Stateflow Data. |
Props. Type. Signed | Boolean | RW | Specify if this data object is signed. Default value is
true . This property applies only to fixed-point data. See
Fixed-Point Data in Stateflow Charts. |
Props. Type. WordLength | Character vector | RW | Bit size of the word that holds the quantized integer of this data object. This property applies only to fixed-point data. See Fixed-Point Data in Stateflow Charts. |
Props. Unit. Name | Character vector | RW | Units of measurement for this data object. Default value is
'' . See Specify Units for Stateflow Data. |
SaveToWorkspace | Boolean | RW | Assign the value of this data object to a variable of the same name in the
MATLAB base workspace at the end of the simulation. Default value is
false . See Save Final Value to Base Workspace. |
Scope | Enum | RW | Scope of this data object. Options are |
Tag | Any type | RW | Tag for this data object. Holds data of any type. Default value is
[] . |
TestPoint | Boolean | RW | Set this data object as a Stateflow test point. Default value is false . See Monitor Test Points in Stateflow Charts. |
Tunable | Boolean | RW | Indicates that the value of this data object can be modified during
simulation. Default is true . This property applies only to
parameter data. |
Name | Description |
---|---|
classhandle | Return a read-only handle to the schema class of the Data
object type. |
delete | Delete this data object. |
dialog | Open the Data properties dialog box. |
disp | Display all properties and values for this data object. |
get | Return the value of the specified property for this data object. |
help | Display all properties and descriptions for this data object. |
methods | Display all methods for this data object. |
set | Set the value of the specified property for this data object. |
struct | Return a MATLAB structure that contains all of the property values for this data object. |
up | Return a handle to the object that contains this data object. |
view | Display this data object in the Model Explorer. |
Stateflow.Editor
Each chart has its own Editor
object. To create a handle to an
Editor
object, access the Editor
property for the
chart. For example, if ch
is a handle to a Chart
object, enter:
ed = ch.Editor;
Name | Type | Access | Description |
---|---|---|---|
WindowPosition | Numeric vector | RW | Position and size of the Stateflow editor window. Numeric vector [left top width
height] . |
ZoomFactor | Double | RW | Magnification level of this chart in the editor. A value of
1 corresponds to a magnification of 100%. |
Name | Description |
---|---|
classhandle | Return a read-only handle to the schema class of the
Editor object type. |
disp | Display all properties and values for this |
get | Return the value of the specified property for this
|
help | Display all properties and descriptions for this
|
methods | Display all methods for this |
set | Set the value of the specified property for this
|
struct | Return a MATLAB structure that contains all of the property values for this
|
zoomIn | Zoom in on the Stateflow chart that contains this |
zoomOut | Zoom out on the Stateflow chart that contains this |
Stateflow.EMFunction
To create a MATLAB function in a parent chart, state, box, or function, use the constructor
method Stateflow.EMFunction
. For example, if
ch
is a handle to a Chart
object,
enter:
f = Stateflow.EMFunction(ch);
Name | Type | Access | Description |
---|---|---|---|
BadIntersection | Boolean | RO | Indicates if this MATLAB function graphically intersects a box, state, or function. |
Chart | Chart | RO | Chart that contains this MATLAB function. |
Description | Character vector | RW | Description of this MATLAB function. Default value is '' . |
Document | Character vector | RW | Document link for this MATLAB function. Default value is '' . |
FontSize | Double | RW | Font size for the label of this MATLAB function. The StateFont.Size property of the
chart that contains the function sets the initial value of this property. |
Id | Integer | RO | Unique identifier that distinguishes this MATLAB function from other objects in the model. |
InlineOption | Character vector | RW | Specify how this MATLAB function appears in generated code. Options are:
For more information, see Inline State Functions in Generated Code (Simulink Coder). |
IsExplicitlyCommented | Boolean | RW | Explicitly comment out this MATLAB function. Default value is false . Equivalent to
right-clicking the function and selecting Comment
Out. |
IsImplicitlyCommented | Boolean | RO | Indicates if this MATLAB function is implicitly commented out. A function is implicitly commented out when you comment out a superstate in its hierarchy. |
LabelString | Character vector | RW | Full label of this MATLAB function. Label syntax is
' .
Default value is '()' . |
Machine | Machine | RO | Machine that contains this MATLAB function. |
Name | Character vector | RW | Name of this MATLAB function. Default value is '' . |
Path | Character vector | RO | Location of the parent of this MATLAB function in the model hierarchy. |
Position | Numeric vector | RW | Position and size of this MATLAB function in the chart. Numeric vector [left top width
height] . Default value is [0 0 90 60] . |
Script | Character vector | RW | Code for this MATLAB function. To specify the value of this property, create a
character vector by calling the str = sprintf('function y=f(x) \n y=x+1;');
f.Script = str; |
Subviewer | Chart , State , Box ,
or Function | RO | Chart or subchart where you can graphically view this MATLAB function. |
Tag | Any type | RW | Tag for this MATLAB function. Holds data of any type. Default value is
[] . |
Name | Description |
---|---|
classhandle | Return a read-only handle to the schema class of the
EMFunction object type. |
delete | Delete this function. |
dialog | Open the MATLAB Function properties dialog box. |
disp | Display all properties and values for this function. |
find | Find all objects inside this function that match the specified criteria. |
fitToView | Zoom in on this function in the chart. |
get | Return the value of the specified property for this function. |
help | Display all properties and descriptions for this function. |
highlight | Highlight this function in the chart. |
isCommented | Return a Boolean value that indicates if this function is explicitly or implicitly commented out. |
methods | Display all methods for this function. |
set | Set the value of the specified property for this function. |
struct | Return a MATLAB structure that contains all of the property values for this function. |
up | Return a handle to the object that contains this function. |
view | Open this function in the MATLAB Editor. |
Stateflow.Event
To create an event in a parent chart, state, or box, use the constructor method Stateflow.Event
. For example, if ch
is a handle to a
Chart
object,
enter:
e = Stateflow.Event(ch);
Name | Type | Access | Description |
---|---|---|---|
| Boolean | RW | Set the End of Broadcast breakpoint of this event. Default
value is false . This property applies only to local
events. |
| Boolean | RW | Set the Start of Broadcast breakpoint of this event.
Default value is false . This property applies only to local or
input events. |
Description | Character vector | RW | Description of this event. Default value is '' . |
Document | Character vector | RW | Document link for this event. Default value is '' . |
Id | Integer | RO | Unique identifier that distinguishes this event from other objects in the model. |
Machine | Machine | RO | Machine that contains this event. |
Name | Character vector | RW | Name of this event. |
Path | Character vector | RO | Location of the parent of this event in the model hierarchy. |
Port | Integer | RW | Port index for this event. This property applies only to input and output events. |
Scope | Enum | RW | Scope of this event. Options are |
Tag | Any type | RW | Tag for this event. Holds data of any type. Default value is
[] . |
Trigger | Enum | RW | Type of trigger associated with this event. Options depend on the scope of the event:
This property does not apply to local events. |
Name | Description |
---|---|
classhandle | Return a read-only handle to the schema class of the Event
object type. |
delete | Delete this event. |
dialog | Open the Event properties dialog box. |
disp | Display all properties and values for this event. |
get | Return the value of the specified property for this event. |
help | Display all properties and descriptions for this event. |
methods | Display all methods for this event. |
set | Set the value of the specified property for this event. |
struct | Return a MATLAB structure that contains all of the property values for this event. |
up | Return a handle to the object that contains this event. |
view | Display this data object in the Model Explorer. |
Stateflow.Function
To create a graphical function in a parent chart, state, box, or function, use the
constructor method Stateflow.Function
. For example, if
ch
is a handle to a Chart
object,
enter:
f = Stateflow.Function(ch);
Name | Type | Access | Description |
---|---|---|---|
BadIntersection | Boolean | RO | Indicates if this graphical function graphically intersects a box, state, or function. |
Chart | Chart | RO | Chart that contains this graphical function. |
Debug. Breakpoints. OnDuring | Boolean | RW | Set the During Function Call breakpoint for this graphical
function. Default value is false . |
Description | Character vector | RW | Description of this graphical function. Default value is
'' . |
Document | Character vector | RW | Document link for this graphical function. Default value is
'' . |
FontSize | Double | RW | Font size for the label of this graphical function. The
StateFont.Size property of the chart that contains the
function sets the initial value of this property. |
Id | Integer | RO | Unique identifier that distinguishes this graphical function from other objects in the model. |
InlineOption | Character vector | RW | Specify how this graphical function appears in generated code. Options are:
For more information, see Inline State Functions in Generated Code (Simulink Coder). |
IsExplicitlyCommented | Boolean | RW | Explicitly comment out this graphical function. Default value is
false . Equivalent to right-clicking the function and
selecting Comment Out. |
IsGrouped | Boolean | RW | Specify if this graphical function is a group. Default value is
false . See Copy by Grouping. |
IsImplicitlyCommented | Boolean | RO | Indicates if this graphical function is implicitly commented out. A function is implicitly commented out when you comment out a superstate in its hierarchy. |
IsSubchart | Boolean | RW | Specify if this graphical function is a subchart. Default value is
false . |
LabelString | Character vector | RW | Full label of this graphical function. Label syntax is
' .
Default value is '()' . |
Machine | Machine | RO | Machine that contains this graphical function. |
Name | Character vector | RW | Name of this graphical function. Default value is
'' . |
Path | Character vector | RO | Location of the parent of this graphical function in the model hierarchy. |
Position | Numeric vector | RW | Position and size of this graphical function in the chart. Numeric vector
[left top width height] . Default value is [0 0 90
60] . |
Subviewer | Chart , State , Box ,
or Function | RO | Chart or subchart where you can graphically view this graphical function. |
Tag | Any type | RW | Tag for this graphical function. Holds data of any type. Default value is
[] . |
Name | Description |
---|---|
classhandle | Return a read-only handle to the schema class of the
Function object type. |
defaultTransitions | Return the default transitions at the top level of containment of this function. |
delete | Delete this function. |
dialog | Open the Function properties dialog box. |
disp | Display all properties and values for this function. |
find | Find all objects inside this function that match the specified criteria. |
fitToView | Zoom in on this function in the chart. |
get | Return the value of the specified property for this function. |
help | Display all properties and descriptions for this function. |
highlight | Highlight this function in the chart. |
isCommented | Return a Boolean value that indicates if this function is explicitly or implicitly commented out. |
methods | Display all methods for this function. |
set | Set the value of the specified property for this function. |
struct | Return a MATLAB structure that contains all of the property values for this function. |
up | Return a handle to the object that contains this function. |
view | Zoom in and select this function. If the function is a subchart, display its contents. |
Stateflow.Junction
To create a junction in a parent chart, state, box, or function, use the constructor
method Stateflow.Junction
. For example, if
ch
is a handle to a Chart
object,
enter:
j = Stateflow.Junction(ch);
Name | Type | Access | Description |
---|---|---|---|
ArrowSize | Double | RW | Size of incoming transition arrows for this junction. Default value is
8 . |
Chart | Chart | RO | Chart that contains this junction. |
Description | Character vector | RW | Description of this junction. Default value is '' . |
Document | Character vector | RW | Document link for this junction. Default value is
'' . |
Id | Integer | RO | Unique identifier that distinguishes this junction from other objects in the model. |
IsExplicitlyCommented | Boolean | RW | Explicitly comment out this junction. Default value is
false . Equivalent to right-clicking the junction and
selecting Comment Out. |
IsImplicitlyCommented | Boolean | RO | Indicates if this junction is implicitly commented out. A junction is implicitly commented out when you comment out a superstate in its hierarchy. |
| Machine | RO | Machine that contains this junction. |
Path | Character vector | RO | Location of the parent of this junction in the model hierarchy. |
Position. Center | Numeric vector | RW | Position of the center of this junction. Numeric vector [x
y] of coordinates relative to the upper left corner of the parent
chart or state. Default value is [7 7] . |
Position. Radius | Integer | RW | Radius of this junction. Default value is 7 . |
Subviewer | Chart , State , Box ,
or Function | RO | Chart or subchart where you can graphically view this junction. |
Tag | Any type | RW | Tag for this junction. Holds data of any type. Default value is
[] . |
Type | Enum | RW | Type for this junction. Options are 'CONNECTIVE' (default)
or 'HISTORY' . |
Name | Description |
---|---|
classhandle | Return a read-only handle to the schema class of the
Junction object type. |
delete | Delete this junction. |
dialog | Open the Connective Junction properties dialog box. |
disp | Display all properties and values for this junction. |
fitToView | Zoom in on this junction in the chart. |
get | Return the value of the specified property for this junction. |
help | Display all properties and descriptions for this junction. |
highlight | Highlight this junction in the chart. |
isCommented | Return a Boolean value that indicates if this junction is explicitly or implicitly commented out. |
methods | Display all methods for this junction. |
set | Set the value of the specified property for this junction. |
sinkedTransitions | Return all inner and outer transitions whose destination is this junction. |
sourcedTransitions | Return all inner and outer transitions whose source is this junction. |
struct | Return a MATLAB structure that contains all of the property values for this junction. |
up | Return a handle to the object that contains this junction. |
view | Zoom in and select this junction. |
Stateflow.Machine
The Stateflow machine contains all the charts in a Simulink model. You automatically create a Machine
object when you
load a model that contains a Stateflow chart or call the function sfnew
.
To create a handle to the Machine
object, use the find
method of the Root
object. For example, if
rt
is a handle to a Root
object,
enter:
m = rt.find('-isa','Stateflow.Machine');
Name | Type | Access | Description |
---|---|---|---|
Created | Character vector | RO | Date of the creation of this machine. |
Creator | Character vector | RW | Creator of this machine. Default value is
'Unknown' . |
Debug. Animation. Delay | Double | RW | Delay value to slow down the animation for charts in this machine. Default
value is 0 . |
Debug. Animation. Enabled | Boolean | RW | Enable animation for charts in this machine. Default value is
true . |
Description | Character vector | RW | Description of this machine. Default value is '' . |
Dirty | Boolean | RW | Indicates if the Simulink model for this machine has changed since being opened or saved. |
Document | Character vector | RW | Document link for this machine. Default value is
'' . |
FullFileName | Character vector | RO | Full path name of file that contains the Simulink model for this machine. Default value is
'' . |
Iced | Boolean | RO | Equivalent to property Locked . Used internally to prevent
changes in this machine during simulation. |
Id | Integer | RO | Unique identifier that distinguishes this machine from other objects loaded in memory. |
IsLibrary | Boolean | RO | Indicates if the Simulink model for this machine builds a library and not an application.
Default value is false . |
Locked | Boolean | RW | Prevents changes in the Simulink model for this machine. Default value is
false . |
Machine | Machine | RO | A handle to this Machine object. |
Modified | Character vector | RW | Comment text for recording modifications to the Simulink model that defines this machine. Default value is
'' . |
Name | Character vector | RO | Name of the Simulink model that defines this machine. Default value is
'untitled' . |
Path | Character vector | RO | Location of this machine in the model hierarchy. |
Tag | Any type | RW | Tag for this machine. Holds data of any type. Default value is
[] . |
Version | Character vector | RW | Comment text for recording the version of the Simulink model that defines this machine. Default value is
'none' . |
Name | Description |
---|---|
classhandle | Return a read-only handle to the schema class of the
Machine object type. |
dialog | Open the Machine properties dialog box. |
disp | Display all properties and values for this machine. |
find | Find all objects inside this machine that match the specified criteria. Do
not use the -depth switch with the find
method for a Machine object. |
get | Return the value of the specified property for this machine. |
help | Display all properties and descriptions for this machine. |
methods | Display all methods for this machine. |
parse | Parse all the charts in this machine. |
set | Set the value of the specified property for this machine. |
struct | Return a MATLAB structure that contains all of the property values for this machine. |
Stateflow.Message
To create a message in a parent chart, state, or box, use the constructor method Stateflow.Message
. For example, if ch
is a handle to a
Chart
object,
enter:
msg = Stateflow.Message(ch);
Name | Type | Access | Description |
---|---|---|---|
CompiledSize | Character vector | RW | Size of the data for this message as determined by the compiler. |
CompiledType | Character vector | RW | Type of the data for this message as determined by the compiler. |
DataType | Character vector | RW | Type of the data for this message.
|
Description | Character vector | RW | Description of this message. Default value is '' . |
Document | Character vector | RW | Document link for this message. Default value is
'' . |
Id | Integer | RO | Unique identifier that distinguishes this message from other objects in the model. |
Machine | Machine | RO | Machine that contains this message. |
| Enum | RW | Type of priority queue for this message. Options are:
This property applies only when the |
Name | Character vector | RW | Name of this message. |
Path | Character vector | RO | Location of the parent of this message in the model hierarchy. |
Port | Integer | RW | Port index for this message. This property applies only to input and output messages. |
Props. Array. Size | Character vector | RW | Size of the data for this message. Default value is '0' .
See Specify Size of Stateflow Data. |
Props. Complexity | Enum | RW | Enable the data for this message to take complex values. Options are
'On' or 'Off' (default). See Complex Data in Stateflow Charts. |
Props. Frame | Enum | RW | Enable the data for this message to accept frame-based signals. Options are:
|
Props. InitialValue | Character vector | RW | Initial value of the data for this message. Default value is
'' . |
Props. Type. BusObject | Character vector | RW | Name of the Simulink.Bus object that defines the data for
this message. This property applies only when the
Props.Type.Method property of this message is 'Bus
Object' . See Access Bus Signals Through Stateflow Structures. |
Props. Type. EnumType | Character vector | RW | Name of the enumerated type that defines the data for this message. This
property applies only when the Props.Type.Method property of
this message is 'Enumerated' . See Reference Values by Name by Using Enumerated Data. |
Props. Type. Expression | Character vector | RW | Expression that evaluates to a data type for the data for this message. This
property applies only when the Props.Type.Method property of
this message is 'Expression' . See Specify Data Properties by Using MATLAB Expressions. |
Props. Type. Method | Enum | RW | Method for setting the data type for this message. Options are
'Inherited' , 'Built-in' ,
'Enumerated' , 'Expression' , or
'Bus Object' . Equivalent to the Mode
field of the Data Type Assistant in the Data properties dialog box. See Specify Type of Stateflow Data. |
QueueCapacity | Integer | RW | Length of the internal queue for this message. Default value is
10 . This property applies only to input and local messages.
For more information, see Message Queue Properties. |
QueueOverflowDiagnostic | Enum | RW | Level of diagnostic action when the number of incoming messages exceeds the
queue capacity for this message. Options are 'Error' (default),
'Warning' , or 'None' . This property
applies only to input and local messages. For more information, see Message Queue Properties. |
QueueType | Enum | RW | Indicates the order in which messages are removed from the receiving queue. Options are:
This property applies only to input and local messages. For more information, see Message Queue Properties. |
Scope | Enum | RW | Scope of this message. Options are |
Tag | Any type | RW | Tag for this message. Holds data of any type. Default value is
[] . |
UseInternalQueue | Boolean | RW | Indicates that the Stateflow chart maintains an internal receiving queue for this input message.
Default value is true . This property applies only to input
messages. For more information, see Message Queue Properties. |
Name | Description |
---|---|
classhandle | Return a read-only handle to the schema class of the
Message object type. |
delete | Delete this message. |
dialog | Open the Message properties dialog box. |
disp | Display all properties and values for this message. |
get | Return the value of the specified property for this message. |
help | Display all properties and descriptions for this message. |
methods | Display all methods for this message. |
set | Set the value of the specified property for this message. |
struct | Return a MATLAB structure that contains all of the property values for this message. |
up | Return a handle to the object that contains this message. |
view | Display this data object in the Model Explorer. |
Stateflow.SimulinkBasedState
To create a Simulink based state in a parent chart, state, or box, use the constructor method
Stateflow.SimulinkBasedState
. For example, if ch
is a handle
to a Chart
object,
enter:
sbs = Stateflow.SimulinkBasedState(ch);
Name | Type | Access | Description |
---|---|---|---|
ArrowSize | Double | RW | Size of incoming transition arrows for this Simulink based state. Default value is 8 . |
BadIntersection | Boolean | RO | Indicates if this Simulink based state graphically intersects a box, state, or function. |
Chart | Chart | RO | Chart that contains this Simulink based state. |
ContentPreviewEnabled | Boolean | RW | Display a preview of the contents of this Simulink based state at the Stateflow level. Default value is
true . |
Debug. Breakpoints. OnDuring | Boolean | RW | Set the During State breakpoint for this Simulink based state. Default value is false . |
Debug. Breakpoints. OnEntry | Boolean | RW | Set the On State Entry breakpoint for this Simulink based state. Default value is false . |
Debug. Breakpoints. OnExit | Boolean | RW | Set the On State Exit breakpoint for this Simulink based state. Default value is false . |
Description | Character vector | RW | Description of this Simulink based state. Default value is '' . |
Document | Character vector | RW | Document link for this Simulink based state. Default value is '' . |
ExecutionOrder | Integer | RW | Order in which this Simulink based state wakes up in parallel (AND) decomposition. This property
applies only when the
UserSpecifiedStateTransitionExecutionOrder property of the
chart that contains the state is true . |
FontSize | Double | RW | Font size for the label of this Simulink based state. The StateFont.Size property of the
chart that contains the state sets the initial value of this property. |
HasOutputData | Boolean | RW | Create an active state data output port for this Simulink based state. Default value is false . See Monitor State Activity Through Active State Data. |
Id | Integer | RO | Unique identifier that distinguishes this Simulink based state from other objects in the model. |
IsExplicitlyCommented | Boolean | RW | Explicitly comment out this Simulink based state. Default value is false . Equivalent
to right-clicking the state and selecting Comment
Out. |
IsImplicitlyCommented | Boolean | RO | Indicates if this Simulink based state is implicitly commented out. A state is implicitly commented out when you comment out a superstate in its hierarchy. |
IsLink | Boolean | RO | Indicates if this Simulink based state is a library link. |
LoggingInfo. DataLogging | Boolean | RW | Enable signal logging for this Simulink based state. Default value is false . |
LoggingInfo. DecimateData | Boolean | RW | Limit the amount of data logged by skipping samples. Uses the interval
specified by the LoggingInfo.Decimation property of this
Simulink based state. Default value is false . |
LoggingInfo. Decimation | Integer | RW | Decimation interval. Default value is 2 . This value means
the chart logs every other sample of this Simulink based state. |
LoggingInfo. LimitDataPoints | Boolean | RW | Limit the number of data points to log. Uses the value specified by the
LoggingInfo.MaxPoints property of this Simulink based state. Default value is false . |
LoggingInfo. MaxPoints | Integer | RW | Maximum number of data points to log. Default value is
5000 . This value means the chart logs the last 5000 data
points generated by the simulation for this Simulink based state. |
LoggingInfo. NameMode | Enum | RW | Source of the signal name used to log this Simulink based state. Options are:
|
LoggingInfo. LoggingName | Character vector | RW | Custom signal name used for logging this Simulink based state. |
Machine | Machine | RO | Machine that contains this Simulink based state. |
Name | Character vector | RW | Name of this Simulink based state. Default value is '' . |
OutputData | Data | RO | Active state data object for this Simulink based state. This property applies only when the
HasOutputData property for this state is
true . See Monitor State Activity Through Active State Data. |
OutputMonitoringMode | Character vector | RO | Indicates the monitoring mode for the active state output data. For
Simulink based states, the only option is
'SelfActivity' . |
Path | Character vector | RO | Location of the parent of this Simulink based state in the model hierarchy. |
Position | Numeric vector | RW | Position and size of this Simulink based state in the chart. Numeric vector [left top width
height] . Default value is [0 0 90 60] . |
Subviewer | Chart , State , or
Box | RO | Chart or subchart where you can graphically view this Simulink based state. |
Tag | Any type | RW | Tag for this Simulink based state. Holds data of any type. Default value is
[] . |
TestPoint | Boolean | RW | Set this Simulink based state as a Stateflow test point. Default value is false . See Monitor Test Points in Stateflow Charts. |
Type | Enum | RO | Type of decomposition for this Simulink based state. Options are 'AND' (parallel) or
'OR' (exclusive). The Simulink based state inherits this property from the
Decomposition property of its parent. |
Name | Description |
---|---|
classhandle | Return a read-only handle to the schema class of the
SimulinkBasedState object type. |
delete | Delete this Simulink based state. |
dialog | Open the Simulink Based State properties dialog box. |
disp | Display all properties and values for this Simulink based state. |
find | Find all objects inside this Simulink based state that match the specified criteria. |
fitToView | Zoom in on this Simulink based state in the chart. |
get | Return the value of the specified property for this Simulink based state. |
help | Display all properties and descriptions for this Simulink based state. |
highlight | Highlight this Simulink based state in the chart. |
isCommented | Return a Boolean value that indicates if this Simulink based state is explicitly or implicitly commented out. |
methods | Display all methods for this Simulink based state. |
set | Set the value of the specified property for this Simulink based state. |
struct | Return a MATLAB structure that contains all of the property values for this Simulink based state. |
up | Return a handle to the object that contains this Simulink based state. |
view | Display the contents of this Simulink based state. |
Stateflow.SLFunction
To create a Simulink function in a parent chart, state, box, or function, use the constructor
method Stateflow.SLFunction
. For example, if
ch
is a handle to a Chart
object,
enter:
f = Stateflow.SLFunction(ch);
Name | Type | Access | Description |
---|---|---|---|
BadIntersection | Boolean | RO | Indicates if this Simulink function graphically intersects a box, state, or function. |
Chart | Chart | RO | Chart that contains this Simulink function. |
Description | Character vector | RW | Description of this Simulink function. Default value is '' . |
Document | Character vector | RW | Document link for this Simulink function. Default value is '' . |
FontSize | Double | RW | Font size for the label of this Simulink function. The StateFont.Size property of the
chart that contains the function sets the initial value of this property. |
Id | Integer | RO | Unique identifier that distinguishes this Simulink function from other objects in the model. |
IsExplicitlyCommented | Boolean | RW | Explicitly comment out this Simulink function. Default value is false . Equivalent to
right-clicking the function and selecting Comment
Out. |
IsImplicitlyCommented | Boolean | RO | Indicates if this Simulink function is implicitly commented out. A function is implicitly commented out when you comment out a superstate in its hierarchy. |
LabelString | Character vector | RW | Full label of this Simulink function. Label syntax is
' .
Default value is '()' . |
Machine | Machine | RO | Machine that contains this Simulink function. |
Name | Character vector | RW | Name of this Simulink function. Default value is '' . |
Path | Character vector | RO | Location of the parent of this Simulink function in the model hierarchy. |
Position | Numeric vector | RW | Position and size of this Simulink function in the chart. Numeric vector [left top width
height] . Default value is [0 0 90 60] . |
Subviewer | Chart , State , Box ,
or Function | RO | Chart or subchart where you can graphically view this Simulink function. |
Tag | Any type | RW | Tag for this Simulink function. Holds data of any type. Default value is
[] . |
Name | Description |
---|---|
classhandle | Return a read-only handle to the schema class of the
SLFunction object type. |
delete | Delete this function. |
dialog | Open the Block Parameters properties dialog box. |
disp | Display all properties and values for this function. |
find | Find all objects inside this function that match the specified criteria. |
fitToView | Zoom in on this function in the chart. |
get | Return the value of the specified property for this function. |
help | Display all properties and descriptions for this function. |
highlight | Highlight this function in the chart. |
isCommented | Return a Boolean value that indicates if this function is explicitly or implicitly commented out. |
methods | Display all methods for this function. |
set | Set the value of the specified property for this function. |
struct | Return a MATLAB structure that contains all of the property values for this function. |
up | Return a handle to the object that contains this function. |
view | Display the contents of this function. |
Stateflow.State
To create a state in a parent chart, state, or box, use the constructor method Stateflow.State
. For example, if ch
is a handle to a
Chart
object,
enter:
st = Stateflow.State(ch);
Name | Type | Access | Description |
---|---|---|---|
ArrowSize | Double | RW | Size of incoming transition arrows for this state. Default value is
8 . |
BadIntersection | Boolean | RO | Indicates if this state graphically intersects a box, state, or function. |
Chart | Chart | RO | Chart that contains this state. |
Debug. Breakpoints. OnDuring | Boolean | RW | Set the During State breakpoint for this state. Default
value is false . |
Debug. Breakpoints. OnEntry | Boolean | RW | Set the On State Entry breakpoint for this state. Default
value is false . |
Debug. Breakpoints. OnExit | Boolean | RW | Set the On State Exit breakpoint for this state. Default
value is false . |
Decomposition | Enum | RW | State decomposition at the top level of containment in this state. Options
are 'EXCLUSIVE_OR' (default) and
'PARALLEL_AND' . |
Description | Character vector | RW | Description of this state. Default value is '' . |
Document | Character vector | RW | Document link for this state. Default value is '' . |
DuringAction | Character vector | RO | Text in the during action in this state. The value of this
property depends on the LabelString property for the state. See
Specify Labels in States and Transitions Programmatically. This property is not supported in Moore
charts. |
EntryAction | Character vector | RO | Text in the entry action in this state. The value of this
property depends on the LabelString property for the state. See
Specify Labels in States and Transitions Programmatically. This property is not supported in Moore
charts. |
ExecutionOrder | Integer | RW | Order in which this state wakes up in parallel (AND) decomposition. This
property applies only when the
UserSpecifiedStateTransitionExecutionOrder property of the
chart that contains the state is true . |
ExitAction | Character vector | RO | Text in the exit action in this state. The value of this
property depends on the LabelString property for the state. See
Specify Labels in States and Transitions Programmatically. This property is not supported in Moore
charts. |
FontSize | Double | RW | Font size for the label of this state. The StateFont.Size
property of the chart that contains the state sets the initial value of this
property. |
HasOutputData | Boolean | RW | Create an active state data output port for this state. Default value is
false . See Monitor State Activity Through Active State Data. |
Id | Integer | RO | Unique identifier that distinguishes this state from other objects in the model. |
InlineOption | Character vector | RW | Specify how this state appears in generated code. Options are:
For more information, see Inline State Functions in Generated Code (Simulink Coder). |
IsExplicitlyCommented | Boolean | RW | Explicitly comment out this state. Default value is false .
Equivalent to right-clicking the state and selecting Comment
Out. |
IsGrouped | Boolean | RW | Specify if this state is a group. Default value is false .
See Copy by Grouping. |
IsImplicitlyCommented | Boolean | RO | Indicates if this state is implicitly commented out. A state is implicitly commented out when you comment out a superstate in its hierarchy. |
IsSubchart | Boolean | RW | Specify if this state is a subchart. Default value is
false . |
LabelString | Character vector | RW | Full label of this state. Default value is '?' . See Specify Labels in States and Transitions Programmatically. |
LoggingInfo. DataLogging | Boolean | RW | Enable signal logging for this state. Default value is
false . |
LoggingInfo. DecimateData | Boolean | RW | Limit the amount of data logged by skipping samples. Uses the interval
specified by the LoggingInfo.Decimation property of this state.
Default value is false . |
LoggingInfo. Decimation | Integer | RW | Decimation interval. Default value is 2 . This value means
the chart logs every other sample of this state. |
LoggingInfo. LimitDataPoints | Boolean | RW | Limit the number of data points to log. Uses the value specified by the
LoggingInfo.MaxPoints property of this state. Default value
is false . |
LoggingInfo. MaxPoints | Integer | RW | Maximum number of data points to log. Default value is
5000 . This value means the chart logs the last 5000 data
points generated by the simulation for this state. |
LoggingInfo. NameMode | Enum | RW | Source of the signal name used to log this state. Options are:
|
LoggingInfo. LoggingName | Character vector | RW | Custom signal name used for logging this state. |
Machine | Machine | RO | Machine that contains this state. |
MooreAction | Character vector | RO | Text in the action in this state. The value of this property depends on the
LabelString property for the state. See Specify Labels in States and Transitions Programmatically. This property is supported only in Moore
charts. For more information, see Design Rules for Moore Charts. |
Name | Character vector | RW | Name of this state. Default value is '' . |
OnAction | Cell array of character vectors | RO | Text in the {'trigger1','action1',...,'triggerN','actionN'} The
value of this property depends on the |
OutputData | Data | RO | Active state data object for this state. This property applies only when the
HasOutputData property for this state is
true . See Monitor State Activity Through Active State Data. |
OutputMonitoringMode | Enum | RW | Indicates the monitoring mode for the active state output data. Options are
'ChildActivity' , 'LeafStateActivity' , or
'SelfActivity' (default). This property applies only when the
HasOutputData property for this state is
true . |
Path | Character vector | RO | Location of the parent of this state in the model hierarchy. |
Position | Numeric vector | RW | Position and size of this state in the chart. Numeric vector [left
top width height] . Default value is [0 0 90
60] . |
Subviewer | Chart , State , or
Box | RO | Chart or subchart where you can graphically view this state. |
Tag | Any type | RW | Tag for this state. Holds data of any type. Default value is
[] . |
TestPoint | Boolean | RW | Set this state as a Stateflow test point. Default value is false . See Monitor Test Points in Stateflow Charts. |
Type | Enum | RO | Type of decomposition for this state. Options are 'AND'
(parallel) or 'OR' (exclusive). The state inherits this
property from the Decomposition property of its parent. |
Name | Description |
---|---|
classhandle | Return a read-only handle to the schema class of the State
object type. |
defaultTransitions | Return the default transitions at the top level of containment of this state. |
delete | Delete this state. |
dialog | Open the State properties dialog box. |
disp | Display all properties and values for this state. |
find | Find all objects inside this state that match the specified criteria. |
fitToView | Zoom in on this state in the chart. |
get | Return the value of the specified property for this state. |
help | Display all properties and descriptions for this state. |
highlight | Highlight this state in the chart. |
innerTransitions | Return an array of the transitions that originate in this state and terminate on a contained object. |
isCommented | Return a Boolean value that indicates if this state is explicitly or implicitly commented out. |
methods | Display all methods for this state. |
outerTransitions | Return an array of the transitions that exit the outer edge of this state and terminate on an object outside the containment of this state. |
set | Set the value of the specified property for this state. |
sinkedTransitions | Return all inner and outer transitions whose destination is this state. |
sourcedTransitions | Return all inner and outer transitions whose source is this state. |
struct | Return a MATLAB structure that contains all of the property values for this state. |
up | Return a handle to the object that contains this state. |
view | Zoom in and select this state. If the state is a subchart, display its contents. |
Stateflow.StateTransitionTableChart
To create a Simulink model that contains an empty State Transition Table block, call the function sfnew
:
sfnew -STT
Name | Type | Access | Description |
---|---|---|---|
ActionLanguage | Enum | RW | Action language used to program the state transition table. Options are
C or MATLAB (default). See Differences Between MATLAB and C as Action Language Syntax. |
ChartColor | Numeric vector | RW | Background color of the automatically generated chart for this state
transition table. Numeric vector [r g b] that specifies the
red, green, and blue values of the color normalized to the range 0.0 to 1.0.
Default value is [1 0.9608 0.8824] . |
ChartUpdate | Enum | RW | Activation method of this state transition table. Options are
'INHERITED' (default), 'DISCRETE' , or
'CONTINUOUS' . See Update Method. |
Debug. Breakpoints. OnEntry | Boolean | RW | Set the On Chart Entry breakpoint for this state
transition table. Default value is false . |
Description | Character vector | RW | Description of this state transition table. Default value is
'' . |
Dirty | Boolean | RW | Indicates if this state transition table has changed since being opened or
saved. Default value is false . |
Document | Character vector | RW | Document link for this state transition table. Default value is
'' . |
Editor | Editor | RO | Editor object for this state transition table. |
EmlDefaultFimath | Character vector | RW | Default
This property applies only to state transition tables that use MATLAB as the action language. |
EnableBitOps | Boolean | RW | Use C-bit operations in state and transition actions in this state transition
table. Default value is false . This property applies only to
state transition tables that use C as the action language. See Supported Operations for Chart Data. |
EnableNonTerminalStates | Boolean | RW | Use super step semantics for this state transition table. Default value is
false . See Super Step Semantics. |
EnableZeroCrossings | Boolean | RW | Use zero-crossing detection on state transitions in this state transition
table. Default value is true . This property applies only when
the ChartUpdate property for this state transition table is set
to 'CONTINUOUS' . See Disable Zero-Crossing Detection. |
ErrorColor | Numeric vector | RW | Color for errors in this state transition table. Numeric vector [r g
b] that specifies the red, green, and blue values of the color
normalized to the range 0.0 to 1.0. Default value is [1 0
0] . |
ExecuteAt Initialization | Boolean | RW | Initialize the state configuration of this state transition table at time
zero instead of at the first input event. Default value is
false . See Execution of a Chart at Initialization. |
HasOutputData | Boolean | RW | Create an active state data output port for this state transition table.
Default value is false . See Monitor State Activity Through Active State Data. |
Iced | Boolean | RO | Equivalent to property Locked . Used internally to prevent
changes in this state transition table during simulation. |
Id | Integer | RO | Unique identifier that distinguishes this state transition table from other objects in the model. |
InitializeOutput | Boolean | RW | Apply the initial value of the output data every time this state transition
table wakes up. Default value is false . See Initialize outputs every time chart wakes up. |
InputFimath | Character vector | RW | Specify the
This property applies only when the
|
JunctionColor | Numeric vector | RW | Color for junctions in the automatically generated chart for this state
transition table. Numeric vector [r g b] that specifies the
red, green, and blue values of the color normalized to the range 0.0 to 1.0.
Default value is [0.6824 0.3294 0] . |
Locked | Boolean | RW | Prevent changes in this state transition table. Default value is
false . |
Machine | Machine | RO | Machine that contains this state transition table. |
Name | Character vector | RW | Name of this state transition table. Default value is 'State
Transition Table' . |
NonTerminal MaxCounts | Character vector | RW | Maximum number of transitions this state transition table can take in one
super step. Default value is 1000 . This property applies only
when the EnableNonTerminalStates property for this state
transition table is true . See Super Step Semantics. |
NonTerminal UnstableBehavior | Enum | RW | Behavior during simulation if this state transition table exceeds the
maximum number of transitions specified in the
This property applies only when the
|
OutputData | Data | RO | Active state data object for this state transition table. This property
applies only when the HasOutputData property for this state
transition table is true . See Monitor State Activity Through Active State Data. |
OutputMonitoringMode | Character vector | RW | Indicates the monitoring mode for the active state output data. Options are
'ChildActivity' (default) or
'LeafStateActivity' . This property applies only when the
HasOutputData property for this state transition table is
true . See Monitor State Activity Through Active State Data. |
Path | Character vector | RO | Location of this state transition table in the model hierarchy. |
SampleTime | Character vector | RW | Sample time for activating this state transition table. Default value is
'-1' . This property applies only when the
ChartUpdate property for this state transition table is
'DISCRETE' . |
SaturateOn IntegerOverflow | Boolean | RW | Specify the behavior of integer overflows in this state transition table. Options are:
For more information, see Handle Integer Overflow for Chart Data. |
StateColor | Numeric vector | RW | Color for state boxes in the automatically generated chart for this state
transition table. Numeric vector [r g b] that specifies the
red, green, and blue values of the color normalized to the range 0.0 to 1.0.
Default value is [0 0 0] . |
StateFont. Angle | Enum | RW | Font angle for the state labels in the automatically generated chart for this
state transition table. Options are 'ITALIC' or
'NORMAL' (default). |
StateFont. Name | Character vector | RW | Font for the state labels in the automatically generated chart for this state
transition table. Default value is 'Helvetica' . |
StateFont. Size | Integer | RW | Font size for the state labels in the automatically generated chart for this
state transition table. Default value is 12 . |
StateFont. Weight | Enum | RW | Font weight for the state labels in the automatically generated chart for
this state transition table. Options are 'BOLD' or
'NORMAL' (default). |
StateLabelColor | Numeric vector | RW | Color for state labels in the automatically generated chart for this state
transition table. Numeric vector [r g b] that specifies the
red, green, and blue values of the color normalized to the range 0.0 to 1.0.
Default value is [0 0 0] . |
StateMachineType | Enum | RW | Type of state machine semantics. Options are 'Classic'
(default), 'Mealy' , or 'Moore' . See Overview of Mealy and Moore Machines. |
StatesWhenEnabling | Enum | RW | Specify behavior of states when a function-call input event reenables this state transition table. Options are:
This property applies only when the state transition table contains function-call input events. See Control States in Charts Enabled by Function-Call Input Events. |
StrongDataTyping WithSimulink | Boolean | RW | Use strong data typing when this state transition table interfaces with
Simulink input and output signals. Default value is true .
This property applies only to state transition tables that use C as the action
language. See Use strong data typing with Simulink I/O. |
SupportVariableSizing | Boolean | RW | Support input and output data that vary in dimension during simulation
in this state transition table. Default value is |
Tag | Any type | RW | Tag for this state transition table. Holds data of any type. Default value is
[] . |
TransitionColor | Numeric vector | RW | Color for transitions in the automatically generated chart for this state
transition table. Numeric vector [r g b] that specifies the
red, green, and blue values of the color normalized to the range 0.0 to 1.0.
Default value is [0.2902 0.3294 0.6039] . |
TransitionFont. Angle | Enum | RW | Font angle for transition labels in the automatically generated chart for
this state transition table. Options are 'ITALIC' or
'NORMAL' (default). |
TransitionFont. Name | Character vector | RW | Font for transition labels in the automatically generated chart for this
state transition table. Default value is 'Helvetica' . |
TransitionFont. Size | Integer | RW | Font size for transition labels in the automatically generated chart for this
state transition table. Default value is 12 . |
TransitionFont. Weight | Enum | RW | Font weight for transition labels in the automatically generated chart for
this state transition table. Options are 'BOLD' or
'NORMAL' (default). |
TransitionLabel Color | Numeric vector | RW | Color for transition labels in the automatically generated chart for this
state transition table. Numeric vector [r g b] that specifies
the red, green, and blue values of the color normalized to the range 0.0 to 1.0.
Default value is [0.2902 0.3294 0.6039] . |
TreatAsFi | Enum | RW | Treat inherited fixed-point and integer signals as Fixed-Point Designer
This property applies only to state transition tables that use MATLAB as the action language. |
Visible | Boolean | RW | Indicates if the editor is displaying this state transition table. |
Name | Description |
---|---|
classhandle | Return a read-only handle to the schema class of the
StateTransitionTableChart object type. |
dialog | Open the State Transition Table properties dialog box. |
disp | Display all properties and values for this state transition table. |
find | Find all objects inside this state transition table that match the specified criteria. |
get | Return the value of the specified property for this state transition table. |
help | Display all properties and descriptions for this state transition table. |
methods | Display all methods for this state transition table. |
parse | Parse this state transition table. |
set | Set the value of the specified property for this state transition table. |
struct | Return a MATLAB structure that contains all of the property values for this state transition table. |
view | Display the contents of this state transition table. |
Stateflow.Transition
To create a transition in a parent chart, state, box, or function, use the constructor
method Stateflow.Transition
. For example, if
ch
is a handle to a Chart
object,
enter:
tr = Stateflow.Transition(ch);
Name | Type | Access | Description |
---|---|---|---|
ArrowSize | Double | RW | Size of the arrow for this transition. Default value is
10 . |
Chart | Chart | RO | Chart that contains this transition. |
Condition | Character vector | RO | Text in the condition on this transition. The value of this property depends
on the LabelString property for the transition. See Specify Labels in States and Transitions Programmatically. |
ConditionAction | Character vector | RO | Text in the condition action on this transition. The value of this property
depends on the LabelString property for the transition. See
Specify Labels in States and Transitions Programmatically. |
Debug. Breakpoints. WhenTested | Boolean | RW | Set the When Transition is Tested breakpoint for this
transition. Default value is false . |
Debug. Breakpoints. WhenValid | Boolean | RW | Set the When Transition is Valid breakpoint for this
transition. Default value is false . |
Description | Character vector | RW | Description of this transition. Default value is
'' . |
Destination | State , Box , or
Junction | RW | Destination state, box, or junction for this transition. Default value is
[] . |
DestinationEndPoint | Numeric vector | RW | Position of the transition endpoint at its destination. Numeric vector
[x y] of coordinates relative to the upper left corner of the
chart. Default value is [40 40] . |
DestinationOClock | Double | RW | Location of the transition endpoint at its destination. Numeric value between
0 and 12 that specifies a clock position. Default value is
0 . |
Document | Character vector | RW | Document link for this transition. Default value is
'' . |
ExecutionOrder | Integer | RW | Order in which this transition executes when its source is active. This
property applies only when the
UserSpecifiedStateTransitionExecutionOrder property of the
chart that contains the transition is true . See Transition Evaluation Order. |
FontSize | Double | RW | Font size for the label on this transition. The
TransitionFont.Size property of the chart that contains the
state sets the initial value of this property. |
Id | Integer | RO | Unique identifier that distinguishes this transition from other objects in the model. |
IsExplicitlyCommented | Boolean | RW | Explicitly comment out this transition. Default value is
false . Equivalent to right-clicking the transition and
selecting Comment Out. |
IsImplicitlyCommented | Boolean | RO | Indicates if this transition is implicitly commented out. A transition is implicitly commented out when you comment out a superstate in its hierarchy or a state or junction to which the transition is attached. |
IsVariant | Boolean | RW | Indicates if this transition is a variant transition. |
LabelPosition | Numeric vector | RW | Position and size of this label on this transition in the chart. Numeric
vector [left top width height] . Default value is [0 0
8 14] . |
LabelString | Character vector | RW | Full label on this transition. Default value is '?' . See
Specify Labels in States and Transitions Programmatically. |
Machine | Machine | RO | Machine that contains this transition. |
MidPoint | Numeric vector | RW | Coordinates of the midpoint of the transition. Numeric vector [x
y] of coordinates relative to the upper left corner of the chart.
Default value is [21 21] . |
Path | Character vector | RO | Location of the parent of this transition in the model hierarchy. |
Source | State , Box , or
Junction | RW | Source state, box, or junction of this transition. Default value is
[] . |
SourceEndPoint | Double | RW | Position of the transition endpoint at its source. Numeric vector [x
y] of coordinates relative to the upper left corner of the chart.
Default value is [2 2] . |
SourceOClock | Double | RW | Location of the transition endpoint at its source. Numeric value between 0
and 12 that specifies a clock position. Default value is
0 . |
Subviewer | Chart , State , Box ,
or Function | RO | Chart or subchart where you can graphically view this transition. |
Tag | Any type | RW | Tag for this transition. Holds data of any type. Default value is
[] . |
TransitionAction | Character vector | RO | Text in the transition action on this transition. The value of this property
depends on the LabelString property for the transition. See
Specify Labels in States and Transitions Programmatically. |
Trigger | Character vector | RO | Text in the trigger on this transition. The value of this property depends on
the LabelString property for the transition. See Specify Labels in States and Transitions Programmatically. |
Name | Description |
---|---|
classhandle | Return a read-only handle to the schema class of the
Transition object type. |
delete | Delete this transition. |
dialog | Open the Transition properties dialog box. |
disp | Display all properties and values for this transition. |
fitToView | Zoom in on this transition in the chart. |
get | Return the value of the specified property for this transition. |
help | Display all properties and descriptions for this transition. |
highlight | Highlight this transition in the chart. |
isCommented | Return a Boolean value that indicates if this transition is explicitly or implicitly commented out. |
methods | Display all methods for this transition. |
set | Set the value of the specified property for this transition. |
struct | Return a MATLAB structure that contains all of the property values for this transition. |
up | Return a handle to the object that contains this transition. |
view | Zoom in and select this transition. |
Stateflow.TruthTable
To create a truth table function in a parent chart, state, box, or function, use the
constructor method Stateflow.TruthTable
. For example, if
ch
is a handle to a Chart
object,
enter:
f = Stateflow.TruthTable(ch);
Name | Type | Access | Description |
---|---|---|---|
ActionTable | Cell array of character vectors | RW | Action table for this truth table function. Default value is
[] . |
BadIntersection | Boolean | RO | Indicates if this truth table function graphically intersects a box, state, or function. |
Chart | Chart | RO | Chart that contains this truth table function. |
ConditionTable | Cell array of character vectors | RW | Condition table for this truth table function. Default value is
[] . |
Debug. Breakpoints. OnDuring | Boolean | RW | Set the During Function Call breakpoint for this truth
table function. Default value is false . |
Description | Character vector | RW | Description of this truth table function. Default value is
'' . |
Document | Character vector | RW | Document link for this truth table function. Default value is
'' . |
FontSize | Double | RW | Font size for the label of this truth table function. The
StateFont.Size property of the chart that contains the
function sets the initial value of this property. |
Id | Integer | RO | Unique identifier that distinguishes this truth table function from other objects in the model. |
InlineOption | Character vector | RW | Specify how this truth table function appears in generated code. Options are:
For more information, see Inline State Functions in Generated Code (Simulink Coder). |
IsExplicitlyCommented | Boolean | RW | Explicitly comment out this truth table function. Default value is
false . Equivalent to right-clicking the function and
selecting Comment Out. |
IsImplicitlyCommented | Boolean | RO | Indicates if this truth table function is implicitly commented out. A function is implicitly commented out when you comment out a superstate in its hierarchy. |
LabelString | Character vector | RW | Full label of this truth table function. Label syntax is
' .
Default value is '()' . |
Language | Enum | RW | Action language used to program the truth table function. Options are
C or MATLAB (default). See Differences Between MATLAB and C as Action Language Syntax. |
Machine | Machine | RO | Machine that contains this truth table function. |
Name | Character vector | RW | Name of this truth table function. Default value is
'' . |
OverSpecDiagnostic | Character vector | RW | Level of diagnostic action when this truth table function is overspecified.
Options are 'Error' (default), 'Warning' , or
'None' . See Correct Overspecified and Underspecified Truth Tables. |
Path | Character vector | RO | Location of the parent of this truth table function in the model hierarchy. |
Position | Numeric vector | RW | Position and size of this truth table function in the chart. Numeric vector
[left top width height] . Default value is [0 0 90
60] . |
Subviewer | Chart , State , Box ,
or Function | RO | Chart or subchart where you can graphically view this truth table function. |
Tag | Any type | RW | Tag for this truth table function. Holds data of any type. Default value is
[] . |
UnderSpecDiagnostic | Character vector | RW | Level of diagnostic action when this truth table function is underspecified.
Options are 'Error' (default), 'Warning' , or
'None' . See Correct Overspecified and Underspecified Truth Tables. |
Name | Description |
---|---|
classhandle | Return a read-only handle to the schema class of the
TruthTable object type. |
delete | Delete this function. |
dialog | Open the Truth Table properties dialog box. |
disp | Display all properties and values for this function. |
find | Find all objects inside this function that match the specified criteria. |
fitToView | Zoom in on this function in the chart. |
get | Return the value of the specified property for this function. |
help | Display all properties and descriptions for this function. |
highlight | Highlight this function in the chart. |
isCommented | Return a Boolean value that indicates if this function is explicitly or implicitly commented out. |
methods | Display all methods for this function. |
set | Set the value of the specified property for this function. |
struct | Return a MATLAB structure that contains all of the property values for this function. |
up | Return a handle to the object that contains this function. |
view | Display the contents of this function. |
Stateflow.TruthTableChart
To create a Simulink model that contains an empty Truth Table block, call the function sfnew
:
sfnew -TT
Name | Type | Access | Description |
---|---|---|---|
ActionTable | Cell array of character vectors | RW | Action table for this truth table. Default value is
[] . |
ChartUpdate | Enum | RW | Activation method of this truth table. Options are
'INHERITED' (default), 'DISCRETE' , or
'CONTINUOUS' . See Update Method. |
ConditionTable | Cell array of character vectors | RW | Condition table for this truth table. Default value is
[] . |
Description | Character vector | RW | Description of this truth table. Default value is
'' . |
Dirty | Boolean | RW | Indicates if this truth table has changed since being opened or saved.
Default value is false . |
Document | Character vector | RW | Document link for this truth table. Default value is
'' . |
EmlDefaultFimath | Character vector | RW | Default
|
Iced | Boolean | RO | Equivalent to property Locked . Used internally to prevent
changes in this truth table during simulation. |
Id | Integer | RO | Unique identifier that distinguishes this truth table from other objects in the model. |
InputFimath | Character vector | RW | Specify the
This property applies only when the
|
Locked | Boolean | RW | Prevent changes in this truth table. Default value is
false . |
Machine | Machine | RO | Machine that contains this truth table. |
Name | Character vector | RW | Name of this truth table. Default value is 'Truth
Table' . |
OverSpecDiagnostic | Enum | RW | Level of diagnostic action when this truth table is overspecified. Options
are 'Error' (default), 'Warning' , or
'None' . See Correct Overspecified and Underspecified Truth Tables. |
Path | Character vector | RO | Location of this truth table in the model hierarchy. |
SampleTime | Character vector | RW | Sample time for activating this truth table. Default value is
'-1' . This property applies only when the
ChartUpdate property for this truth table is
'DISCRETE' . |
SaturateOn IntegerOverflow | Boolean | RW | Specify behavior of integer overflows in this truth table. Options are:
For more information, see Handle Integer Overflow for Chart Data. |
StatesWhenEnabling | Enum | RW | Specify behavior of states when a function-call input event reenables this truth table. Options are:
This property applies only when the truth table contains function-call input events. See Control States in Charts Enabled by Function-Call Input Events. |
SupportVariableSizing | Boolean | RW | Support input and output data that vary in dimension during simulation
in this truth table. Default value is |
Tag | Any type | RW | Tag for this truth table. Holds data of any type. Default value is
[] . |
TreatAsFi | Enum | RW | Treat inherited fixed-point and integer signals as Fixed-Point Designer
|
UnderSpecDiagnostic | Enum | RW | Level of diagnostic action when this truth table is underspecified. Options
are 'Error' (default), 'Warning' , or
'None' . See Correct Overspecified and Underspecified Truth Tables. |
Name | Description |
---|---|
classhandle | Return a read-only handle to the schema class of the
TruthTableChart object type. |
dialog | Open the Truth Table properties dialog box. |
disp | Display all properties and values for this truth table. |
find | Find all objects inside this truth table that match the specified criteria. |
get | Return the value of the specified property for this truth table. |
help | Display all properties and descriptions for this truth table. |
methods | Display all methods for this truth table. |
parse | Parse this truth table. |
set | Set the value of the specified property for this truth table. |
struct | Return a MATLAB structure that contains all of the property values for this truth table. |
view | Display the contents of this truth table. |
sfclipboard
| sfnew
| sfroot