Properties and Methods Sorted By Application

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.

  • Objects — The types of objects that have this property or method. The object types are listed as: Annotation (A), Atomic Box (AB), Atomic Subchart (AS), Box (B), Chart (C), Clipboard (CB), Data (D), Event (E), Editor (ED), Graphical Function (GF), Junction (J), Machine (M), MATLAB® Function (MLF), Message (MSG), Root (R), State (S), Simulink® Based State (SBS), Simulink Function (SLF), State Transition Table (STT), Transition (T), Truth Table (TT), and Truth Table Function (TTF).

Access

Properties

Property

Type

Access

Description

Objects

ChartChart

RO

Chart that contains this object.

A AB AS B GF J MLF S SBS SLF T TTF

Editor

Editor

RO

Editor object for this chart or state transition table.

C STT

MachineMachine

RO

Machine that contains this object.

A AB AS B C D E GF J M MLF MSG S SBS SLF STT T TT TTF

Methods

Method

Description

Objects

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

A AB AS B C D E ED GF J M MLF MSG R S SBS SLF STT T TT TTF

defaultTransitions

Return the default transitions at the top level of containment of this object.

B C GF S

disp

Display all properties and values for this object.

A AB AS B C D E ED GF J M MLF MSG S SBS SLF STT T TT TTF

find

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

A AB AS B C CB D E ED GF J M MLF MSG R S SBS SLF STT T TT TTF

get

Return the value of the specified property for this object.

A AB AS B C CB D E ED GF J M MLF MSG R S SBS SLF STT T TT TTF

help

Display all properties and descriptions for this object.

A AB AS B C CB D E ED GF J M MLF MSG S SBS SLF STT T TT TTF

innerTransitions

Return an array of the transitions that originate in this object and terminate on a contained object.

B S

methods

Display all methods for this object.

A AB AS B C CB D E ED GF J M MLF MSG S SBS SLF STT T TT TTF

outerTransitions

Return an array of the transitions that exit the outer edge of this object and terminate on an object outside the containment of this object.

B S

set

Set the value of the specified property for this object.

A AB AS B C CB D E ED GF J M MLF MSG R S SBS SLF STT T TT TTF

sinkedTransitions

Return all inner and outer transitions whose destination is this object.

B J S

sourcedTransitions

Return all inner and outer transitions whose source is this object.

B J S

struct

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

A AB AS B C D E ED GF J M MLF MSG R S SBS SLF STT T TT TTF

upReturn parent of this object.

A AB AS B D E GF J MLF MSG S SBS SLF T TTF

Creation and Deletion

Method

Description

Objects

copy

Copy the specified objects to the clipboard.

CB

delete

Delete this object.

A AB AS B D E GF J MLF MSG S SBS SLF T TTF

pasteTo

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

CB

setImage

Insert an image into an annotation.

A

Stateflow.AnnotationCreate an annotation in a parent chart, state, box, or function.N/A
Stateflow.AtomicBoxCreate an atomic box in a parent chart, state, box, or function.N/A
Stateflow.AtomicSubchartCreate an atomic subchart in a parent chart, state, or box.N/A
Stateflow.BoxCreate a box in a parent chart, state, box, or function.N/A
Stateflow.DataCreate a data in a parent machine, chart, state, box, or function.N/A
Stateflow.EMFunctionCreate a MATLAB function in a parent chart, state, box, or function.N/A
Stateflow.EventCreate an event in a parent chart, state, or box.N/A
Stateflow.FunctionCreate a graphical function in a parent chart, state, box, or function.N/A
Stateflow.JunctionCreate a junction in a parent chart, state, box, or function.N/A
Stateflow.MessageCreate a message in a parent chart, state, or box.N/A
Stateflow.SimulinkBasedStateCreate a Simulink based state in a parent chart, state, or box.N/A
Stateflow.SLFunctionCreate a Simulink function in a parent chart, state, box, or function.N/A
Stateflow.State

Create a state in a parent chart, state, or box.

N/A
Stateflow.Transition

Create a transition in a parent chart, state, box, or function.

N/A
Stateflow.TruthTable

Create a truth table function in a parent chart, state, box, or function.

N/A

Debugging

Properties

Property

Type

Access

Description

Objects

Debug.Animation.Delay

Double

RW

Delay value to slow down the animation for charts in this machine. Default value is 0.

M

Debug.Animation.Enabled

Boolean

RW

Enable animation for charts in this machine. Default value is true.

M

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.

E

Debug.Breakpoints.OnDuring

Boolean

RW

Set the During State breakpoint for this state or the During Function Call breakpoint for this function. Default value is false.

AS GF S SBS TTF

Debug.Breakpoints.OnEntry

Boolean

RW

Set the On State Entry breakpoint for this state or the On Chart Entry breakpoint for this chart. Default value is false.

AS C S SBS STT

Debug.Breakpoints.OnExit

Boolean

RW

Set the On State Exit breakpoint for this state. Default value is false.

AS S SBS

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.

E

Debug.Breakpoints.WhenTested

Boolean

RW

Set the When Transition is Tested breakpoint for this transition. Default value is false.

T

Debug.Breakpoints.WhenValid

Boolean

RW

Set the When Transition is Valid breakpoint for this transition. Default value is false.

T

TestPoint

Boolean

RW

Set this state or data object as a Stateflow test point. Default value is false. See Monitor Test Points in Stateflow Charts.

AS D S SBS

IsExplicitlyCommented

Boolean

RW

Explicitly comment out this object. Default value is false. Equivalent to right-clicking the object and selecting Comment Out.

AB AS B GF J MLF S SBS SLF T TTF

IsImplicitlyCommented

Boolean

RO

Indicates if this object is implicitly commented out. An object is implicitly commented out when you comment out a superstate in its hierarchy.

AB AS B GF J MLF S SBS SLF T TTF

Methods

Method

Description

Objects

isCommented

Return a Boolean value that indicates if this object is explicitly or implicitly commented out.

AB AS B GF J MLF S SBS SLF T TTF

parse

Parse this chart or all the charts in this machine.

C M STT TT

Display Control

Properties

Property

Type

Access

Description

Objects

SubviewerChart, State, or Box

RO

Chart or subchart where you can graphically view this object.

A AB AS B GF J MLF S SBS SLF T TTF

Visible

Boolean

RW

Indicates if the editor is displaying this chart or state transition table.

C STT

ZoomFactor

Double

RW

Magnification level of this chart in the editor. A value of 1 corresponds to a magnification of 100%.

ED

Methods

Method

Description

Objects

dialog

Open the properties dialog box for this object.

A AB AS B C D E GF J M MLF MSG S SBS SLF STT T TT TTF

fitToView

Zoom in on this object in the editor.

A AB AS B C GF J MLF S SBS SLF T TTF

highlight

Highlight this object in the chart.

AB AS B GF J MLF S SBS SLF T TTF

view

Zoom in and select this object. If appropriate, display its contents in the Stateflow Editor, the Model Explorer, the MATLAB Editor.

A AB AS B C D E GF J MLF MSG S SBS SLF STT T TT TTF

zoomInZoom in on the Stateflow chart that contains this Editor object.ED
zoomOutZoom out on the Stateflow chart that contains this Editor object.ED

Graphical Appearance

Color Properties

Property

Type

Access

Description

Objects

AutoBackgroundColorBoolean

RW

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

A

AutoForegroundColorBoolean

RW

Use the automatic foreground text color for this annotation. Default value is true.

A

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

A

ChartColor

Numeric vector

RW

Background color for this chart or for 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].

C STT

ErrorColor

Numeric vector

RW

Color for errors in this chart or 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].

C STT

ForegroundColor

Numeric vector

RW

Foreground color for this annotation. Numeric vector [r g b] that specifies the red, green, and blue values of the color normalized to the range 0.0 to 1.0. Default value is [0 0 0].

A

JunctionColor

Numeric vector

RW

Color for junctions in this chart or 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].

C STT

StateColor

Numeric vector

RW

Color for state boxes in this chart or 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].

C STT

StateLabelColor

Numeric vector

RW

Color for state labels in this chart or 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].

C STT

TransitionColor

Numeric vector

RW

Color for transitions in this chart or 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].

C STT

TransitionLabelColor

Numeric vector

RW

Color for transition labels in this chart or 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].

C STT

Drawing Properties

Property

Type

Access

Description

Objects

ArrowSize

Double

RW

For transitions, size of the transition arrow. Default value is 10.

For other objects, size of incoming transition arrows. Default value is 8.

AB AS B J S SBS T

DropShadow

Boolean

RW

Display a drop shadow. Default value is false.

A

Font Properties

Property

Type

Access

Description

Objects

Font.Angle

Enum

RW

Font angle for the text in this annotation. Options are 'ITALIC' or 'NORMAL' (default).A
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.A
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.A
Font.Weight

Enum

RW

Font weight for the text in this annotation. Options are 'BOLD' or 'NORMAL' (default).A

FontSize

Double

RW

Font size for the label of this object. The StateFont.Size property of the chart that contains the object sets the initial value of this property.

AB AS B GF MLF S SBS SLF T TTF

StateFont.Angle

Enum

RW

Font angle for the state labels in this chart or in the automatically generated chart for this state transition table. Options are 'ITALIC' or 'NORMAL' (default).

C STT

StateFont.Name

Character vector

RW

Font for the state labels in this chart or in the automatically generated chart for this state transition table. Default value is 'Helvetica'.

C STT

StateFont.Size

Integer

RW

Font size for the state labels in this chart or in the automatically generated chart for this state transition table. Default value is 12.

C STT

StateFont.Weight

Enum

RW

Font weight for the state labels in this chart or in the automatically generated chart for this state transition table. Options are 'BOLD' or 'NORMAL' (default).

C STT

TransitionFont.Angle

Enum

RW

Font angle for transition labels in this chart or in the automatically generated chart for this state transition table. Options are 'ITALIC' or 'NORMAL' (default).

C STT

TransitionFont.Name

Character vector

RW

Font for transition labels in this chart or in the automatically generated chart for this state transition table. Default value is 'Helvetica'.

C STT

TransitionFont.Size

Integer

RW

Font size for transition labels in this chart or in the automatically generated chart for this state transition table. Default value is 12.

C STT

TransitionFont.Weight

Enum

RW

Font weight for transition labels in this chart or in the automatically generated chart for this state transition table. Options are 'BOLD' or 'NORMAL' (default).

C STT

Position Properties

Property

Type

Access

Description

Objects

BadIntersection

Boolean

RO

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

AB AS B GF MLF S SLF SBS TTF

Destination

State, Box, or Junction

RW

Destination state, box, or junction for this transition. Default value is [].T

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

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

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

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

Position

Numeric vector

RW

Position and size of this object in the chart. Numeric vector [left top width height]. Default value depends on the object type.

A AB AS B GF MLF S SBS SLF TTF

Position.Center

Numeric vector

RW

Position of the center of this junction. Numeric vector [x y] of coordinates relative to the upper left corner of the parent chart or state. Default value is [7 7].J

Position.Radius

Integer

RW

Radius of this junction. Default value is 7.J

Source

State, Box, or Junction

RW

Source state, box, or junction of this transition. Default value is [].T

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

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

WindowPosition

Numeric vector

RW

Position and size of the Stateflow editor window. Numeric vector [left top width height].ED

Text Properties

Property

Type

Access

Description

Objects

Alignment

Enum

RW

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

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

A

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

A

InternalMargins

Numeric vector

RW

Space from the bounding box of the text to the borders of this annotation. Numeric vector [left top right bottom]. Default value is [0 0 0 0].A

Interpretation

Enum

RW

Specify how to interpret the contents of the Text property in this annotation. Options are 'OFF' (default), 'RICH', or 'TEX'.A

LabelString

Character vector

RW

Full label for this object. Default value depends on the object type.

AB AS B GF MLF S SBS SLF T TTF

PlainText

Character vector

RO

Text for this annotation without formatting.

A

Text

Character vector

RW

Text for this annotation. Default value is '?'.A

Identifiers

Property

Type

Access

Description

Objects

Description

Character vector

RW

Description of this object. Default value is ''.

A AB AS B C D E GF J M MLF MSG S SBS SLF STT T TT TTF

Document

Character vector

RW

Document link for this object. Default value is ''.

A AB AS B C D E GF J M MLF MSG S SBS SLF STT T TT TTF

FullFileName

Character vector

RO

Full path name of file that contains the Simulink model for this machine. Default value is ''.M

Id

Integer

RO

Unique identifier that distinguishes this object from other objects in the model.

A AB AS B C D E GF J M MLF MSG S SBS SLF STT T TT TTF

Name

Character vector

RO for Machine objects

RW for all other objects

Name of this object. Default value depends on the object type.

AB AS B C D E GF M MLF MSG S SBS SLF STT TT TTF

Path

Character vector

RO

Location of the parent of this object in the model hierarchy.

A AB AS B C D E GF J M MLF MSG S SBS SLF STT T TT TTF

Tag

Any Type

RW

Tag for this object. Holds data of any type. Default value is [].

A AB AS B C D E GF J M MLF MSG S SBS SLF STT T TT TTF

Interface with Simulink

Property

Type

Access

Description

Objects

ChartUpdate

Enum

RW

Activation method for this chart. Options are 'CONTINUOUS', 'DISCRETE', or 'INHERITED' (default). See Update Method.

C STT TT

ClickFcn

Character vector

RW

MATLAB code to be executed when a user single-clicks this note. Stateflow stores the code entered in this field with the chart. See Associate a Click Function with an Annotation (Simulink) for more information.

A

DeleteFcn

Character vector

RW

MATLAB code to be executed before deleting this note. See Annotation Callback Functions (Simulink).

A

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.

C STT TT

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.

C STT

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

HasOutputData

Boolean

RW

Create an active state data output port for this chart or state. Default value is false. See Monitor State Activity Through Active State Data.

AS C S SBS STT

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

C STT

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

C STT TT

IsLink

Boolean

RO

Indicates if this object is a library link.

AB AS SBS

LoadFcn

Character vector

RW

MATLAB code to be executed when the model containing this note is loaded. See Annotation Callback Functions (Simulink).

A

OutputDataDataROActive state data object for this chart or state. This property applies only when the HasOutputData property for this object is true. See Monitor State Activity Through Active State Data.

AS C S SBS STT

OutputMonitoringMode

Character vector

RW

Indicates the monitoring mode for the active state output data.

  • For charts and state transition tables, options are 'ChildActivity' (default) or 'LeafStateActivity'.

  • For states, options are 'ChildActivity', 'LeafStateActivity', or 'SelfActivity' (default).

  • For atomic subcharts and Simulink based states, the only option is 'SelfActivity' (read-only).

This property applies only when the HasOutputData property for this object is true. See Monitor State Activity Through Active State Data.

AS C S SBS STT

Port

Integer

RW

Port index for this data object, event, or message. This property applies only to input and output data, events, and messages.

D E MSG

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

C STT TT

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.

C STT TT

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 state transition tables that use C as the action language. See Use Strong Data Typing with Simulink I/O.

C STT

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.

C STT TT

UseDisplayTextAsClickCallback

Boolean

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

Logging

Property

Type

Access

Description

Objects

LoggingInfo.DataLogging

Boolean

RW

Enable signal logging for this state or data object. Default value is false.

D S SBS

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 or data object. Default value is false.

D S SBS

LoggingInfo.Decimation

Integer

RW

Decimation interval. Default value is 2. This value means the chart logs every other sample of this state or data object.

D S SBS

LoggingInfo.LimitDataPoints

Boolean

RW

Limit the number of data points to log. Uses the value specified by the LoggingInfo.MaxPoints property of this state or data object. Default value is false.

D S SBS

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 or data object.

D S SBS

LoggingInfo.NameMode

Enum

RW

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

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

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

D S SBS

LoggingInfo.LoggingName

Character vector

RW

Custom signal name used for logging this state or data object.

D S SBS

Specification

Chart and Machine

Property

Type

Access

Description

Objects

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.

C STT

Created

Character vector

RO

Date of creation of this machine.

M

Creator

Character vector

RW

Creator of this machine. Default value is 'Unknown'.M

Dirty

Boolean

RW

Indicates if this chart or the Simulink model for this machine has changed since being opened or saved.

C M STT TT

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.

C STT

EnableNonTerminalStates

Boolean

RW

Use super step semantics for this chart. Default value is false. See Super Step Semantics.

C STT

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.

C STT

Iced

Boolean

RO

Equivalent to property Locked. Used internally to prevent changes in this chart or machine during simulation.

C M STT TT

IsLibrary

Boolean

RO

Indicates if the Simulink model for this machine builds a library and not an application. Default value is false.M

Locked

Boolean

RW

Prevents changes in this chart or in the Simulink model for this machine. Default value is false.

C M STT TT

Modified

Character vector

RW

Comment text for recording modifications to the Simulink model that defines this machine. Default value is ''.M
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.

C STT

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.

C STT

StateMachineType

Enum

RW

Type of state machine semantics. Options are 'Classic' (default), 'Mealy', or 'Moore'. See Overview of Mealy and Moore Machines.

C STT

Version

Character vector

RW

Comment text for recording the version of the Simulink model that defines this machine. Default value is 'none'.M

Data, Events, and Messages

Property

Type

Access

Description

Objects

CompiledSize

Character vector

RO

Size of this data object as determined by the compiler.

D MSG

CompiledType

Character vector

RO

Type of this data object as determined by the compiler.

D MSG

DataType

Enum

RW

Type of this data object or message data.

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

D MSG

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

D

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.

MSG

Port

Integer

RW

Port index for this data object, event, or message. This property applies only to input and output data, events, and messages.

D E MSG

Props.Array.FirstIndex

Character vector

RW

Index for the first element of this data object or message data. Default value is 0. This property applies only to array data in charts that use C as the action language.

D MSG

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.

D

Props.Array.Size

Character vector

RW

Size of this data object or message data. Default value is '0'. See Specify Size of Stateflow Data.

D MSG

Props.Complexity

Enum

RW

Enable this data object or message data to take complex values. Options are 'On' or 'Off' (default). See Complex Data in Stateflow Charts.

D MSG

Props.Frame

Enum

RW

Enable this data object or message data 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).

D MSG

Props.InitialValue

Character vector

RW

Initial value of this data object or message data. Default value is ''.

D MSG

Props.Range.Maximum

Character vector

RW

Maximum value for this data object. Default value is ''.

D

Props.Range.Minimum

Character vector

RW

Minimum value for this data object. Default value is ''.

D

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.

D

Props.Type.BusObject

Character vector

RW

Name of the Simulink.Bus object that defines this data object or message data. This property applies only when the Props.Type.Method property of this data object is 'Bus Object'. See Access Bus Signals Through Stateflow Structures.

D MSG

Props.Type.EnumType

Character vector

RW

Name of the enumerated type that defines this data object or message data. 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.

D MSG

Props.Type.Expression

Character vector

RW

Expression that evaluates to a data type for this data object or message data. This property applies only when the Props.Type.Method property of this data object is 'Expression'. See Specify Data Properties by Using MATLAB Expressions.

D MSG

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.

D

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.

D

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

D

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.

D

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.

D

Props.Type.Method

Enum

RW

Method for setting the type of this data object or message data.

  • For data objects, options depend on the scope:

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

  • For message data, 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.

D MSG

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.

D

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.

D

Props.Unit.Name

Character vector

RW

Units of measurement for this data object. Default value is ''. See Specify Units for Stateflow Data.

D

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

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

C STT TT

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.

D

Scope

Enum

RW

Scope of this data object, event, or message.

  • For data objects, options are 'Local' (default), 'Constant', 'Parameter', 'Input', 'Output', 'Data Store Memory', 'Temporary', 'Imported', or 'Exported'.

  • For events, options are 'Input', 'Local' (default), or 'Output'.

  • For messages, options are 'Input', 'Local', or 'Output' (default).

D E MSG

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.

C STT TT

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.

E

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.

D

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.

MSG

Graphical Objects

Property

Type

Access

Description

Objects

ActionTable

Cell array of character vectors

RW

Action table for this truth table. Default value is [].

TT TTF

ConditionTable

Cell array of character vectors

RW

Condition table for this truth table. Default value is [].

TT TTF

ContentPreviewEnabledBooleanRWDisplay a preview of the contents of this Simulink based state at the Stateflow level. Default value is true.SBS
Decomposition

Enum

RW

State decomposition at the top level of containment in this object. Options are 'EXCLUSIVE_OR' (default) and 'PARALLEL_AND'.

C S

ExecutionOrder

Integer

RW

Order in which this state wakes up in parallel (AND) decomposition or this transition executes when its source is active. This property applies only when the UserSpecifiedStateTransitionExecutionOrder property of the chart that contains the object is true.

AS S SBS T

InlineOption

Character vector

RW

Specify how this function or state appears in generated code. Options are:

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

  • 'Function' - 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).

GF MLF S TTF

IsGrouped

Boolean

RW

Specify if this object is a group. Default value is false. See Copy by Grouping.

B GF S

IsSubchart

Boolean

RW

Specify if this object is a subchart. Default value is false.

B GF S

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

OverSpecDiagnostic

Enum

RW

Level of diagnostic action when this truth table is overspecified. Options are 'Error' (default), 'Warning', or 'None'. See Correct Overspecified and Underspecified Truth Tables.

TT TTF

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;

MLF

Type

Enum

RW for junctions

RO for states

Type for this junction or state.

  • For junctions, options are 'CONNECTIVE' (default) or 'HISTORY'.

  • For states, options are 'AND' (parallel) or 'OR' (exclusive). The state inherits this property from the Decomposition property of its parent.

J S SBS

UnderSpecDiagnostic

Enum

RW

Level of diagnostic action when this truth table is underspecified. Options are 'Error' (default), 'Warning', or 'None'. See Correct Overspecified and Underspecified Truth Tables.

TT TTF