Properties and Methods Sorted by Stateflow Object

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.

Constructor Methods

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.AnnotationCreate an annotation in a parent chart, state, box, or function. See Properties and Methods.
Stateflow.AtomicBoxCreate an atomic box in a parent chart, state, box, or function. See Properties and Methods.
Stateflow.AtomicSubchartCreate an atomic subchart in a parent chart, state, or box. See Properties and Methods.
Stateflow.BoxCreate a box in a parent chart, state, box, or function. See Properties and Methods.
Stateflow.DataCreate a data in a parent machine, chart, state, box, or function. See Properties and Methods.
Stateflow.EMFunctionCreate a MATLAB® function in a parent chart, state, box, or function. See Properties and Methods.
Stateflow.EventCreate an event in a parent chart, state, or box. See Properties and Methods.
Stateflow.FunctionCreate a graphical function in a parent chart, state, box, or function. See Properties and Methods.
Stateflow.JunctionCreate a junction in a parent chart, state, box, or function. See Properties and Methods.
Stateflow.MessageCreate a message in a parent chart, state, or box. See Properties and Methods.
Stateflow.SimulinkBasedStateCreate a Simulink® based state in a parent chart, state, or box. See Properties and Methods.
Stateflow.SLFunctionCreate 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 Object

The 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;
For more information, see Access the Machine Object.

Methods

Name

Description

classhandleReturn a read-only handle to the schema class of the Root object type.
find

Find all objects inside the Root object that match the specified criteria.

get

Return the value of the specified property for the Root object.

set

Set the value of the specified property for the Root object.

struct

Return a MATLAB structure that contains all of the property values for the Root object.

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);
For more information, see Add Descriptive Comments in a Chart.

Properties

Name

Type

Access

Description

Alignment

Enum

RW

Alignment of the text in this annotation. Options are 'CENTER', 'LEFT' (default), or 'RIGHT'.
AutoBackgroundColorBoolean

RW

Use the automatic background color for this annotation. Default value is true.
AutoForegroundColorBoolean

RW

Use the automatic foreground text color for this annotation. Default value is true.
BackgroundColorNumeric 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].
ChartChart

RO

Chart that contains this annotation.
ClickFcn

Character vector

RW

MATLAB code to execute when you click this annotation. Default value is ''. See Add an Annotation Callback (Simulink).
DeleteFcn

Character vector

RW

MATLAB code to execute before you delete this annotation. Default value is ''. See Add an Annotation Callback (Simulink).
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:

  • true - Fixes the height of the annotation box and hides content that is longer than the box.

  • false - Resizes the annotation box vertically as you add content (default).

FixedWidth

Boolean

RW

Fix the width of the annotation box. Options are:

  • true - Fixes the width of the annotation box and wraps text that is longer than the box.

  • false - Resizes the annotation box horizontally as you add content (default).

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).
ForegroundColorNumeric 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.
InternalMarginsNumeric 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 ''. See Add an Annotation Callback (Simulink).
MachineMachine

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.
PositionNumeric vector

RW

Position and size of this annotation in the chart. Numeric vector [left top width height]. Default value is [0 0 8 16].
SubviewerChart, 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 '?'.
UseDisplayTextAsClickCallbackBoolean

RW

Use the contents of the Text property as the click function for this annotation. Default value is false. See Add an Annotation Callback (Simulink).

Methods

Name

Description

classhandleReturn 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.

upReturn 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);
For more information, see Reuse Functions by Using Atomic Boxes.

Properties

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.
ChartChart

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 '?'.
MachineMachine

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].
SubviewerChart, 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 [].

Methods

Name

Description

classhandleReturn 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.

upReturn 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);
For more information, see Create Reusable Subcomponents by Using Atomic Subcharts.

Properties

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.
ChartChart

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 '?'.
MachineMachine

RO

Machine that contains this atomic subchart.
Name

Character vector

RW

Name of this atomic subchart. Default value is ''.
OutputDataDataROActive 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].
SubviewerChart, 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.

Methods

Name

Description

classhandleReturn 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.

upReturn 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);
For more information, see Group Chart Objects by Using Boxes.

Properties

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.
ChartChart

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 '?'.
MachineMachine

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].
SubviewerChart, 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 [].

Methods

Name

Description

classhandleReturn 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.

upReturn 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. For more information, see Create Charts by Using the Stateflow API.

Properties

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.
ChartColorNumeric 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 ''.
EditorEditor

RO

Editor object for this chart.
EmlDefaultFimath

Enum

RW

Default fimath properties for this chart. Options are:

  • 'Same as MATLAB Default' - Use the same fimath properties as the current default fimath (default).

  • 'Other:UserSpecified' - Use the InputFimath property to specify the default fimath object.

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].
ExecuteAtInitialization

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.
ExportChartFunctions

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.
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 embedded.fimath object associated with inputs from Simulink blocks. You can:

  • Enter an expression that constructs a fimath object.

  • Enter the variable name for a fimath object in the MATLAB or model workspace.

This property applies only when the EmlDefaultFimath property for this chart is 'Other:UserSpecified'.

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.
MachineMachine

RO

Machine that contains this chart.
Name

Character vector

RW

Name of this chart. Default value is 'Chart'.
NonTerminalMaxCountsInteger

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.
NonTerminalUnstableBehavior

Enum

RW

Behavior during simulation if this chart exceeds the maximum number of transitions specified in the NonTerminalMaxCounts property before reaching a stable state. Options are:

  • 'PROCEED' - The chart goes to sleep with the last active state configuration (default).

  • 'THROW ERROR' - The chart generates an error.

This property applies only when the EnableNonTerminalStates property for this chart is true. See Super Step Semantics.

OutputDataDataROActive 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.
OutputMonitoringModeEnum

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.
RegisterExportedFunctionsWithSimulink

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'.
SaturateOnIntegerOverflow

Boolean

RW

Specify the behavior of integer overflows in this chart. Options are:

  • true - The chart saturates integer overflows (default).

  • false - The chart wraps integer overflows.

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.
StatesWhenEnablingEnum

RW

Specify the behavior of states when a function-call input event reenables this chart. Options are:

  • 'held' - The chart maintains the most recent values of the states (default).

  • 'reset' - The chart reverts to the initial conditions of the states.

This property applies only when the chart contains function-call input events. See Control States in Charts Enabled by Function-Call Input Events.

StrongDataTypingWithSimulink

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).
TransitionLabelColor

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™ fi objects. Options are:

  • 'Fixed-point' - The chart treats all fixed-point inputs as fi objects (default).

  • 'Fixed-point & Integer' - The chart treats all fixed-point and integer inputs as fi objects.

This property applies only to charts that use MATLAB as the action language.

UserSpecifiedStateTransitionExecutionOrder

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.

Methods

Name

Description

classhandleReturn 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;
For more information, see Copy and Paste Stateflow Objects.

Methods

Name

Description

copy

Copy the specified objects to this clipboard.

methods

Display all methods for this clipboard.

pasteTo

Paste the contents of this clipboard to the specified container object.

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);
For more information, see Set Data Properties.

Properties

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.
DataTypeCharacter vectorRW

Type of this data object.

  • If the Props.Type.Method property of this data object is 'Built-in', you can specify this property with one of these options: 'double' (default), 'single', 'int8', 'int16', 'int32', 'int64' (C charts only), 'uint8', 'uint16', 'uint32', 'uint64' (C charts only), 'boolean', 'ml', or 'string' (C charts only).

  • Otherwise, the Props.Type properties of this data object determine the value of this property.

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.
InitializeMethodEnum

RW

Method for initializing the value of this data object. Options depend on the scope of the data:

  • For local and output data, use 'Expression' (default) or 'Parameter'.

  • For constant data, use 'Expression' (read-only).

  • For data store memory, input, and parameter data, use 'Not Needed' (read-only).

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:

  • 'Custom' - Use the custom signal name specified by the LoggingInfo.LoggingName property.

  • 'SignalName' - Use the name of the data object (default).

LoggingInfo.LoggingName

Character vector

RW

Custom signal name used for logging this data object.
MachineMachine

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:

  • 'Frame based' - The data object supports frame-based signals.

  • 'Sample based' - The data object supports sample-based signals (default).

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.ResolveToSignalObject

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. Default value is false. See Autoscaling Using the Fixed-Point Tool (Fixed-Point Designer).

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:

  • For local, input, output, or parameter data, use 'Built-in', 'Fixed point', 'Enumerated', 'Expression', 'Inherited' (default), or 'Bus Object'.

  • For constant data, use 'Built-in' (default), 'Fixed point', or 'Expression'.

  • For data store memory data, use 'Inherited' (read-only).

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 'Local' (default), 'Constant', 'Parameter', 'Input', 'Output', 'Data Store Memory', 'Temporary', 'Imported', or 'Exported'. For more information, see Scope.

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.

Methods

Name

Description

classhandleReturn 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.

upReturn 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;
For more information, see Modify the Graphical Properties of Your Chart.

Properties

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%.

Methods

Name

Description

classhandleReturn a read-only handle to the schema class of the Editor object type.
disp

Display all properties and values for this Editor object.

get

Return the value of the specified property for this Editor object.

help

Display all properties and descriptions for this Editor object.

methods

Display all methods for this Editor object.

set

Set the value of the specified property for this Editor object.

struct

Return a MATLAB structure that contains all of the property values for this Editor object.

zoomIn

Zoom in on the Stateflow chart that contains this Editor object.

zoomOut

Zoom out on the Stateflow chart that contains this Editor object.

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);
For more information, see Reuse MATLAB Code by Defining MATLAB Functions.

Properties

Name

Type

Access

Description

BadIntersection

Boolean

RO

Indicates if this MATLAB function graphically intersects a box, state, or function.
ChartChart

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:

  • 'Inline' - Calls to the MATLAB function are replaced by code.

  • 'Function' - MATLAB function is implemented as a separate C function.

  • 'Auto' - An internal calculation determines the appearance of function calls in generated code (default).

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 'return = Name(arguments)'. Default value is '()'.
MachineMachine

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 sprintf function. For example, if f is a handle to this function, enter:

str = sprintf('function y=f(x) \n y=x+1;');
f.Script = str;

SubviewerChart, 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 [].

Methods

Name

Description

classhandleReturn 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.

upReturn 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);
For more information, see Synchronize Model Components by Broadcasting Events.

Properties

Name

Type

Access

Description

Debug.Breakpoints.EndBroadcast

Boolean

RW

Set the End of Broadcast breakpoint of this event. Default value is false. This property applies only to local events.

Debug.Breakpoints.StartBroadcast

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.
MachineMachine

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 'Input', 'Local' (default), or 'Output'. For more information, see Scope.

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:

  • For input events, use 'Rising', 'Falling', 'Either', or 'Function call' (default).

  • For output events, use 'Either' or 'Function call' (default).

This property does not apply to local events.

Methods

Name

Description

classhandleReturn 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.

upReturn 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);
For more information, see Reuse Logic Patterns by Defining Graphical Functions.

Properties

Name

Type

Access

Description

BadIntersection

Boolean

RO

Indicates if this graphical function graphically intersects a box, state, or function.
ChartChart

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:

  • 'Inline' - Calls to the graphical function are replaced by code.

  • 'Function' - The graphical function is implemented as a separate C function.

  • 'Auto' - An internal calculation determines the appearance of function calls in generated code (default).

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 'return = Name(arguments)'. Default value is '()'.
MachineMachine

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].
SubviewerChart, 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 [].

Methods

Name

Description

classhandleReturn 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.

upReturn 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);
For more information, see Connective Junctions and Record State Activity by Using History Junctions.

Properties

Name

Type

Access

Description

ArrowSize

Double

RW

Size of incoming transition arrows for this junction. Default value is 8.
ChartChart

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

Machine

RO

Machine that contains this junction.
Path

Character vector

RO

Location of the parent of this junction in the model hierarchy.
Position.CenterNumeric 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.RadiusInteger

RW

Radius of this junction. Default value is 7.
SubviewerChart, 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'.

Methods

Name

Description

classhandleReturn 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.

upReturn 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');
For more information, see Access the Machine Object.

Properties

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.
MachineMachine

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'.

Methods

Name

Description

classhandleReturn 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.

findFind 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:

m = Stateflow.Message(ch);
For more information, see Communicate with Stateflow Charts by Sending Messages.

Properties

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.
DataTypeCharacter vectorRW

Type of the data for this message.

  • If the Props.Type.Method property of this data object is 'Built-in', you can specify this property with one of these options: 'double' (default), 'single', 'int8', 'int16', 'int32', 'uint8', 'uint16', 'uint32', 'boolean', 'ml', or 'string' (C charts only).

  • Otherwise, the Props.Type properties of this data object determine the value of this property.

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.
MachineMachine

RO

Machine that contains this message.

MessagePriorityOrder

Enum

RW

Type of priority queue for this message. Options are:

  • 'Ascending' - Messages are received in ascending order of the message data value (default).

  • 'Descending' - Messages are received in descending order of the message data value.

This property applies only when the QueueType property of this message is Priority.

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:

  • 'Frame based' - The message supports frame-based signals.

  • 'Sample based' - The message supports sample-based signals (default).

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:

  • 'FIFO' - First in, first out (default).

  • 'LIFO' - Last in, first out.

  • 'Priority' - Remove messages according to the value in the data field. To specify the order, use the MessagePriorityOrder property for the message.

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 'Input', 'Local', or 'Output' (default). For more information, see Scope.

Tag

Any type

RW

Tag for this message. Holds data of any type. Default value is [].
UseInternalQueueBooleanRWIndicates 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.

Methods

Name

Description

classhandleReturn a read-only handle to the schema class of the Mesage 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.

upReturn 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);
For more information, see Simulink Subsystems as States.

Properties

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.
ChartChart

RO

Chart that contains this Simulink based state.
ContentPreviewEnabledBooleanRWDisplay 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.
LabelString

Character vector

RW

Full label of this Simulink based state. Default value is '?'.
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:

  • 'Custom' - Use the custom signal name specified by the LoggingInfo.LoggingName property.

  • 'SignalName' - Use the name of the Simulink based state (default).

LoggingInfo.LoggingName

Character vector

RW

Custom signal name used for logging this Simulink based state.
MachineMachine

RO

Machine that contains this Simulink based state.
Name

Character vector

RW

Name of this Simulink based state. Default value is ''.
OutputDataDataROActive 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].
SubviewerChart, 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.

Methods

Name

Description

classhandleReturn 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.

upReturn 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);
For more information, see Reuse Simulink Components in Stateflow Charts.

Properties

Name

Type

Access

Description

BadIntersection

Boolean

RO

Indicates if this Simulink function graphically intersects a box, state, or function.
ChartChart

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 'return = Name(arguments)'. Default value is '()'.
MachineMachine

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].
SubviewerChart, 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 [].

Methods

Name

Description

classhandleReturn 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.

upReturn 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:

s = Stateflow.State(ch);
For more information, see Represent Operating Modes by Using States.

Properties

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.
ChartChart

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 ''.
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.
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:

  • 'Inline' - Calls to state functions are replaced by code.

  • 'Function' - State functions are implemented as separate C functions.

  • 'Auto' - An internal calculation determines the appearance of state functions in generated code (default).

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 Enter Multiline Labels in States and Transitions.
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.NameModeEnum

RW

Source of the signal name used to log this state. Options are:

  • 'Custom' - Use the custom signal name specified by the LoggingInfo.LoggingName property.

  • 'SignalName' - Use the name of the state (default).

LoggingInfo.LoggingName

Character vector

RW

Custom signal name used for logging this state.
MachineMachine

RO

Machine that contains this state.
Name

Character vector

RW

Name of this state. Default value is ''.
OutputDataDataROActive 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].
SubviewerChart, 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.

Methods

Name

Description

classhandleReturn 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.

upReturn a handle to the object that contains this state.
viewZoom 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 -STT. For more information, see State Transition Tables in Stateflow.

Properties

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.
ChartColorNumeric 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 ''.
EditorEditor

RO

Editor object for this state transition table.
EmlDefaultFimath

Character vector

RW

Default fimath properties for this state transition table. Options are:

  • 'Same as MATLAB Default' - Use the same fimath properties as the current default fimath (default).

  • 'Other:UserSpecified' - Use the InputFimath property to specify the default fimath object.

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].
ExecuteAtInitialization

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 embedded.fimath object associated with inputs from Simulink blocks. You can:

  • Enter an expression that constructs a fimath object.

  • Enter the variable name for a fimath object in the MATLAB or model workspace.

This property applies only when the EmlDefaultFimath property for this state transition table is 'Other:UserSpecified'.

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.
MachineMachine

RO

Machine that contains this state transition table.
Name

Character vector

RW

Name of this state transition table. Default value is 'State Transition Table'.
NonTerminalMaxCounts

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.
NonTerminalUnstableBehavior

Enum

RW

Behavior during simulation if this state transition table exceeds the maximum number of transitions specified in the NonTerminalMaxCounts property before reaching a stable state. Options are:

  • 'PROCEED' - The state transition table goes to sleep with the last active state configuration (default).

  • 'THROW ERROR' - The state transition table generates an error.

This property applies only when the EnableNonTerminalStates property for this state transition table is true. See Super Step Semantics.

OutputDataDataROActive 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'.
SaturateOnIntegerOverflow

Boolean

RW

Specify the behavior of integer overflows in this state transition table. Options are:

  • true - The state transition table saturates integer overflows (default).

  • false - The state transition table wraps integer overflows.

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.
StatesWhenEnablingEnum

RW

Specify behavior of states when a function-call input event reenables this state transition table. Options are:

  • 'held' - The state transition table maintains most recent values of the states (default).

  • 'reset' - The state transition table reverts to the initial conditions of the states.

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.

StrongDataTypingWithSimulink

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 true. See Declare Variable-Size Data in Stateflow Charts.

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).
TransitionLabelColor

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 fi objects. Options are:

  • 'Fixed-point' - The state transition table treats all fixed-point inputs as fi objects (default).

  • 'Fixed-point & Integer' - The state transition table treats all fixed-point and integer inputs as fi objects.

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.

Methods

Name

Description

classhandleReturn 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);
For more information, see Transition Between Operating Modes.

Properties

Name

Type

Access

Description

ArrowSize

Double

RW

Size of the arrow for this transition. Default value is 10.
ChartChart

RO

Chart that contains this transition.
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 ''.
DestinationState, 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.
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 Enter Multiline Labels in States and Transitions.
MachineMachine

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.
SourceState, 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.
SubviewerChart, 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 [].

Methods

Name

Description

classhandleReturn 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.

upReturn 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);
For more information, see Reuse Combinatorial Logic by Defining Truth Tables.

Properties

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.
ChartChart

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:

  • 'Inline' - Calls to the truth table function are replaced by code.

  • 'Function' - The truth table function is implemented as a separate C function.

  • 'Auto' - An internal calculation determines the appearance of function calls in generated code (default).

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 'return = Name(arguments)'. 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.
MachineMachine

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].
SubviewerChart, 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.

Methods

Name

Description

classhandleReturn 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.

upReturn 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 -TT. For more information, see Reuse Combinatorial Logic by Defining Truth Tables.

Properties

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 fimath properties for this truth table. Options are:

  • 'Same as MATLAB Default' - Use the same fimath properties as the current default fimath (default).

  • 'Other:UserSpecified' - Use the InputFimath property to specify the default fimath object.

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 embedded.fimath object associated with inputs from Simulink blocks. You can:

  • Enter an expression that constructs a fimath object.

  • Enter the variable name for a fimath object in the MATLAB or model workspace.

This property applies only when the EmlDefaultFimath property for this truth table is 'Other:UserSpecified'.

Locked

Boolean

RW

Prevent changes in this truth table. Default value is false.
MachineMachine

RO

Machine that contains this truth table.
Name

Character vector

RW

Name of this truth table. Default value is 'Truth Table'.
OverSpecDiagnosticEnum

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'.
SaturateOnIntegerOverflow

Boolean

RW

Specify behavior of integer overflows in this truth table. Options are:

  • true - The truth table saturates integer overflows (default).

  • false - The truth table wraps integer overflows.

For more information, see Handle Integer Overflow for Chart Data.

StatesWhenEnablingEnum

RW

Specify behavior of states when a function-call input event reenables this truth table. Options are:

  • 'held' - The truth table maintains the most recent values of the states (default).

  • 'reset' - The truth table reverts to the initial conditions of the states.

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 true. See Declare Variable-Size Data in Stateflow Charts.

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 fi objects. Options are:

  • 'Fixed-point' - The truth table treats all fixed-point inputs as fi objects (default).

  • 'Fixed-point & Integer' - The truth table treats all fixed-point and integer inputs as fi objects.

UnderSpecDiagnosticEnum

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.

Methods

Name

Description

classhandleReturn 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.

See Also

| |

Related Topics