Skip to Main Content Skip to Search
Product Documentation

Properties and Methods Sorted Alphabetically By Application

Reference Table Column Descriptions

Reference tables for Stateflow API properties and methods have these columns:

Access Methods

The following methods find, get, and set objects and their properties.

Method

Description

Objects

defaultTransitions

Return the default transitions in this chart at the top level of containment.

C S B F

disp

Display the property names and their settings for this object.

C S AS B F N T J D E X TT EM SLF

find

Find all objects that this object contains that meet the criteria specified by the arguments.

All

get

Return the specified property settings for this object.

All

help

Display a list of properties for this object with short descriptions. Used with all objects except the Root and Machine object.

All

innerTransitions

Return the inner transitions that originate with this object and terminate on a contained object.

S B

methods

Return the methods of this object.

All

outerTransitions

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

S B

set

Set the specified property of this object with a specified value. Used with all objects except the Root object.

All

sinkedTransitions

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

S B J

sourcedTransitions

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

S B J

struct

Return a MATLAB structure containing the property settings of this object.

C S AS B F N T J D E X TT EM SLF

Code Generation and Target Building

Code Generation and Build Methods

The following methods control parsing, code generation, and building of custom targets.

Method

Description

Objects

build

Build this custom target only for those portions of the target's charts that have changed since the last build (i.e., incrementally).

See also the methods rebuildAll, generate, rebuildAll, and make.

X

generate

Generate code for this custom target only for those portions of this target's charts that have changed since the last code generation (i.e., incrementally).

See also the methods build, rebuildAll, regenerateAll, and make.

X

getCodeFlag

Return the value of the specified code flag for this custom target.

X

make

Compile this custom target incrementally, only for those portions of this target's charts that have changed since the last compilation.

See also the methods build, rebuildAll, generate, and regenerateAll.

X

parse

Parses all the charts in this machine (model) or just this chart.

M C

rebuildAll

Completely rebuild this custom target.

See also the methods build, generate, regenerateAll, and make.

X

regenerateAll

Completely regenerate code for this custom target.

See also the methods build, rebuildAll, generate, and make.

X

setCodeFlag

Set the value of the specified code flag for this custom target.

X

Code Generation Properties

The following properties control the code generated from the Stateflow charts in a model.

Property

Type

Access

Description

Objects

ApplyToAllLibs

Boolean

RW

If set to true, use settings in this custom target for all libraries. Equivalent to selecting the Use these custom code settings for all libraries check box in the Custom Target dialog box.

X

CodeFlagsInfo

Array

RO

A MATLAB vector of structures containing information on code flag settings for this custom target. Each element in the vector is a MATLAB structure with information about a specific code flag. Each flag corresponds to a selection in the properties dialog box for this target.

If you want to see information about the first flag for a Target object x, use these commands:

cfi = x.CodeFlagsInfo
disp(cfi(1))

If you want to see the names of all the flags, use this command:

cfi.name

The Name member of the CodeFlagsInfo structure is shorthand for a longer expression in the properties dialog box. For example, the name 'comments' refers to the dialog box setting User Comments in generated code.

You use the name of a code flag to get and set the code flag value with the methods getCodeFlag and setCodeFlag. Changing the vector returned by CodeFlagsInfo does not change an actual flag.

X

EnableBitOps

Boolean

RW

If set to true, enable C-like bit operations in generated code for this chart. Equivalent to selecting the Enable C-bit operations check box in the Chart properties dialog box.

C

Custom Code Properties

The following properties control the custom code that you include with a Stateflow chart.

Property

Type

Access

Description

Objects

CodegenDirectory

String

RW

Folder to store generated code for a custom target (default = ''). Equivalent to the entry in the Generated Code Directory field of the custom code settings in the Custom Target dialog box.

X

CustomCode

String

RW

Custom code included at the top of the generated header file for a custom target (default = ''). Equivalent to the entry in the Include Code field of the custom code settings in the Custom Target dialog box.

X

UserIncludeDirs

String

RW

Space-separated list of custom include folder paths for a custom target (default = ''). Equivalent to the entry in the Include Paths field of the custom code settings in the Custom Target dialog box.

    Note   If your list includes any Windows path strings that contain spaces, each instance must be enclosed in double quotes within the argument string, for example,

    'C:\Project "C:\Custom Files"'

X

UserLibraries

String

RW

Space-separated list of custom libraries for a custom target (default = ''). Equivalent to the entry in the Libraries field of the custom code settings in the Custom Target dialog box.

X

UserSources

String

RW

Space-separated list of custom source files for a custom target (default = ''). Equivalent to the entry in the Source Files field of the custom code settings in the Custom Target dialog box.

X

ReservedNames

String

RW

Comma- or space-separated list of names to not use in Stateflow generated code for a custom target. Equivalent to the entry in the Reserved Names field of the custom code settings in the Custom Target dialog box.

    Note   This property applies only to nonlibrary models. You cannot specify this property for library models.

X

Containment

The following properties control how one Stateflow object contains another Stateflow object.

Property

Type

Access

Description

Objects

Chart

Chart

RO

Chart object containing this object.

S AS B F N T J TT EM SLF

Decomposition

Enum

RW

Set this property to 'EXCLUSIVE_OR' to specify exclusive (OR) decomposition for the states at the first level of containment in this chart or state. Set to 'PARALLEL_AND' to specify parallel (AND) decomposition for these states.

C S

IsGrouped

Boolean

RW

If set to true, group this object.

Nothing is allowed to change inside a grouped object. You must first ungroup the object before you can change its contents.

This property is also useful for copying states and their contents to a new location. See Copying by Grouping (Recommended).

S B F

IsSubchart

Boolean

RW

If set to true, makes this state, box, or graphical function a subchart.

S B F

Machine

Machine

RO

Machine that contains this object. A machine object contains all of the Chart objects in a Model.

C S AS B F N T J D E X TT EM SLF

Creating and Deleting Objects

Use the following methods to create and delete Stateflow objects.

Method

Description

Objects

copy

Copy the specified array of objects to the clipboard for pasting. See also the pasteTo method.

CB

delete

Delete this object.

All but R M C CB ED

pasteTo

Paste the objects in the Clipboard to the specified container object. See also copy method.

CB

Stateflow.AtomicSubchart

Create an atomic subchart for a parent chart or state.

NA

Stateflow.Box

Create a box for a parent chart, state, box, or function.

NA

Stateflow.Data

Create a data for a parent machine, chart, state, box, or function.

NA

Stateflow.EMFunction

Create a MATLAB function for a parent chart or state.

NA

Stateflow.Event

Create an event for a parent chart or state.

NA

Stateflow.Function

Create a graphical function for a parent chart, state, box, or function.

NA

Stateflow.Junction

Create a junction for a parent chart, state, box, or function.

NA

Stateflow.Note

Create a note for a parent chart or state.

NA

Stateflow.SLFunction

Create a Simulink function for a parent chart or state.

NA

Stateflow.State

Create a state for a parent chart, state, box, or function.

NA

Stateflow.Target

Create a custom target for a parent machine.

NA

Stateflow.Transition

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

NA

Stateflow.TruthTable

Create a truth table function for a parent chart or state.

NA

Data Definition Properties

The following properties control the type, size, and value of data in Stateflow charts.

Property

Type

Access

Description

Objects

DataType

Enum

RW

Data type of this data. Can have one of the following possible values: 'boolean', 'uint8', 'int8', 'uint16', 'int16', 'uint32', 'int32', 'single', 'double' and 'fixpt'. Equivalent to an entry in the Type column for this data in the Model Explorer or the Type field in the Data properties dialog box.

D

FixptType.
Bias

Double

RW

The Bias value for this fixed-point type.

D

FixptType.
FractionalSlope

Double

RW

The Fractional Slope value for this fixed-point type.

D

FixptType.
RadixPoint

Integer

RW

The power of two specifying the binary point location for this fixed-point type.

D

FixptType.
BaseType

Enum

RW

The size and sign of the base for the quantized integer, Q, of this fixed-point type.

D

ParsedInfo.
Array.
FirstIndex

Integer

RO

Numeric equivalent of string Data property Props.Range.FirstIndex.

D

ParsedInfo.
Array.
Size

Integer

RO

Numeric equivalent of string Data property Props.Array.Size.

D

ParsedInfo.
InitialValue

Double

RO

Numeric equivalent of string Data property Props.InitialValue.

D

ParsedInfo.
Range.
Maximum

Double

RO

Numeric equivalent of string Data property Props.Range.Maximum.

D

ParsedInfo.
Range.
Minimum

Double

RO

Numeric equivalent of string Data property Props.Range.Minimum.

D

Port

Integer

RW

Port index number for this input or output data or event (default = 1).

D E

Props.
Array.
FirstIndex

String

RW

Index of the first element of this data if it is an array (Props.Array.Size >= 1). Equivalent to entering a value of zero or greater in the First index field of the Data properties dialog box.

D

Props.
Array.
Size

String

RW

Specifying a positive value for this property specifies that this data is an array of specified size. Equivalent to entering a positive value in the Size column for this data in the Model Explorer or in the Size field of the Data properties dialog box.

D

Props.
Complexity

Enum

RW

If set to 'On', the data can take complex values. The default value is 'Off', which indicates that the data cannot take complex values. Equivalent to setting Complexity in the Data properties dialog box.

D

Props.
Frame

Enum

RW

If set to 'Frame based', the data supports frame-based signals. The default value is 'Sample based', which indicates that the data supports sample-based signals.

D

Props.
InitialValue

String

RW

If the source of the initial value for this data is the Stateflow hierarchy, this is the value used. Equivalent to entering this value in the InitVal column for this data in the Model Explorer or similar field in the Data properties dialog box.

D

Props.
Range.
Maximum

String

RW

Maximum value that this data can have during execution or simulation of the state machine. Equivalent to entering value in Max column for this data in the Model Explorer or the Maximum field in the Data properties dialog box.

D

Props.
Range.
Minimum

String

RW

Minimum value that this data can have during execution or simulation of the state machine. Equivalent to entering value in the Min column for this data in the Model Explorer or in the Minimum field in the Data properties dialog box.

D

Props.
Resolve
To
Signal
Object

Integer

RW

If set to 1, the data must resolve to a Simulink.Signal object that you define in the model workspace or base workspace. The default value is 0, indicating that the data does not have to resolve to a signal object. Equivalent to setting Data must resolve to Simulink signal object in the Data properties dialog box.

D

Props.
Type.
BusObject

String

RW

If Props.Type.Method is Bus Object, you must set this property to the name of the Simulink.Bus object that defines this data (see Working with Structures and Bus Signals in Stateflow Charts in the Stateflow documentation). Equivalent to setting the data type Mode to Bus Object, and entering the name of a Simulink.Bus object in the Data Type Assistant of the Data properties dialog box.

D

Props.
Type.
EnumType

String

RW

If Props.Type.Method is Enumerated, you must set this property to the name of the enumerated type that defines this data (see Using Enumerated Data in Stateflow Charts in the Stateflow documentation). Equivalent to setting the data type Mode to Enumerated, and entering the name of an enumerated type in the Data Type Assistant of the Data properties dialog box.

D

Props.
Type.
Expression

String

RW

If Props.Type.Method is Expression, you must set this property to an expression that evaluates to a data type (see Entering Expressions and Parameters for Data Properties in the Stateflow documentation). Equivalent to setting the data type Mode to Expression, and entering an expression in the Data Type Assistant of the Data properties dialog box.

D

Props.
Type.
Fixpt.
Bias

String

RW

The bias value for fixed-point data (default = 0.0) when Props.Type.Fixpt.ScalingMode equals Slope and bias; otherwise this value is ignored. Equivalent to entering a real number in the Bias field of the Data Type Assistant in the Data properties dialog box.

D

Props.
Type.
Fixpt.
FractionLength

String

RW

The location of the binary point in fixed-point data (default = 0) when Props.Type.Fixpt.ScalingMode equals Binary point; otherwise this value is ignored. Equivalent to entering a positive or negative integer in the Fraction length field of the Data Type Assistant in the Data properties dialog box.

D

Props.
Type.
Fixpt.
Lock

Integer

RW

If set to 1 (default = 0), prevents Simulink software from replacing the current fixed-point type with a type that the Fixed-Point Tool or Fixed-Point Advisor chooses. Equivalent to selecting Lock data type setting against changes by the fixed-point tools in the Data properties dialog box.

D

Props.
Type.
Fixpt.
ScalingMode

String

RW

Method for scaling fixed point data to avoid overflow conditions and minimize quantization errors. The settings are:

  • None (the default)

  • Binary point

  • Slope and bias

Equivalent to setting the Scaling field of the Data Type Assistant in the Data properties dialog box.

D

Props.
Type.
Fixpt.
Slope

String

RW

The slope value for fixed-point data (default = 1.0) when Props.Type.Fixpt.ScalingMode equals Slope and bias; otherwise this value is ignored. Equivalent to entering a positive real number in the Slope field of the Data Type Assistant in the Data properties dialog box.

D

Props.
Type.
Method

String

RW

Method for setting the type of this data, based on scope:

  • If scope is Local , you can set this property to Built in, Fixed point, Enumerated, Expression, or Bus Object.

  • If scope is Constant, you can set this property to Built in, Fixed point, or Expression.

  • If scope is Parameter, Input, or Output, you can set this property to Inherit, Built in, Fixed point, Enumerated, Expression, or Bus Object.

  • If scope is Data Store Memory, you should set Props.Type.Method to Inherit as a read-only property.

Equivalent to setting the Mode field of the Data Type Assistant in the Data properties dialog box.

D

Props.
Type.
Signed

Integer

RW

If set to 1, indicates that fixed-point data should be signed. The default value is 0, indicating that the data is unsigned. Equivalent to setting the Signedness field of the Data Type Assistant in the Data properties dialog box.

D

Props.
Type.
Units

String

RW

Units of measurement for the data value (default = '').

D

Props.
Type.
WordLength

String

RW

Size in bits of the word that will hold the quantized integer of fixed-point data. Equivalent to entering an integer in the Word length field of the Data Type Assistant in the Data properties dialog box.

D

SaveTo
Workspace

Integer

RW

If set to 1 (default = 0), this data is saved to the MATLAB workspace. Setting this property to 1 is equivalent to selecting the SaveToWorkspace column entry for this data in the Model Explorer or selecting the Save final value to base workspace field in the Data properties dialog box.

D

Scope

Enum

RW

Scope of this data:

  • Local — Data defined in current Stateflow chart.

  • Constant — Read-only constant value that is visible to the parent Stateflow object and its children.

  • Parameter — Constant defined in the MATLAB workspace or derived from a Simulink parameter that is defined and initialized in the parent masked subsystem.

  • Input — If the parent is a graphical, truth table, or MATLAB function, the data is an input argument. Otherwise, it is provided by the Simulink model to the Stateflow chart via an input port.

  • Output — If the parent is a graphical, truth table, or MATLAB function, the data is a return value. Otherwise, it is provided by the Stateflow chart to the Simulink model via an output port.

  • Data Store Memory — Data that binds to a Simulink data store.

  • Temporary — Data that persists only during the execution of a function.

  • Imported — Data parented by the Simulink model, but defined in external code embedded in the Stateflow machine.

  • Exported — Data from the Simulink model that you provide to external code. Parent must be a Stateflow machine.

Equivalent to setting the Scope field in the Data properties dialog box. See Scope in the Stateflow documentation.

D

TestPoint

Integer

RW

If set to 1 (default = 0), sets this data as a Stateflow test point. You can monitor individual Stateflow test points with a floating scope during model simulation. You can also log test point values into MATLAB workspace objects. See Monitoring Test Points in Stateflow Charts in the Stateflow documentation.

D

Debugging Properties

The following properties control values used in debugging Stateflow chart applications with the Stateflow Debugger.

Property

Type

Access

Description

Objects

Debug.
Animation.
Delay

Double

RW

Specify a delay (slow down) value for animation. Equivalent to setting the Delay (sec) field in the Debugger window.

M

Debug.
Animation.
Enabled

Boolean

RW

If true, animation (simulation) is enabled. If false (=0), disabled. Equivalent to selecting the Enabled or Disabled radio button in the Debugger window.

M

Debug.
BreakOn.
ChartEntry

Boolean

RW

If true, sets the chart entry breakpoint for all charts in this machine. Equivalent to selecting the Chart Entry check box in the Debugger window.

M

Debug.
BreakOn.
EventBroadcast

Boolean

RW

If true, sets the event broadcast breakpoint for all charts in this machine. Equivalent to selecting the Event Broadcast check box in the Debugger window.

M

Debug.
BreakOn.
StateEntry

Boolean

RW

If true, sets the state entry breakpoint for all states in this machine. Equivalent to selecting the State Entry check box in the Debugger window.

M

Debug.
Breakpoints.
EndBroadcast

Boolean

RW

If true, sets a debugger breakpoint for the end of the broadcast of this event. Equivalent to selecting the End of broadcast check box in the Event properties dialog box.

E

Debug.
Breakpoints.
StartBroadcast

Boolean

RW

If true, sets a debugger breakpoint for the start of the broadcast of this event. Equivalent to selecting the Start of broadcast check box in the Event properties dialog box.

E

Debug.
Breakpoints.
OnDuring

Boolean

RW

If true, sets the during breakpoint for this object. Equivalent to selecting the State During check box in the properties dialog box for this state or atomic subchart, or selecting the Function Call check box in the properties dialog box for this graphical function or truth table.

F S AS TT

Debug.
Breakpoints.
OnEntry

Boolean

RW

If true, sets the entry breakpoint for this object. Equivalent to selecting the Chart Entry check box in the properties dialog box for this chart, or selecting the State Entry check box in the properties dialog box for this state or atomic subchart.

C S AS

Debug.
Breakpoints.
OnExit

Boolean

RW

If true, sets the exit breakpoint for this object. Equivalent to selecting the State Exit check box in the properties dialog box for this state or atomic subchart.

S AS

Debug.
Breakpoints.
WhenTested

Boolean

RW

If true, sets a debugging breakpoint to occur when this transition is tested to see if it is a valid transition. Equivalent to selecting the When Tested check box in the properties dialog box of this transition.

T

Debug.
Breakpoints.
WhenValid

Boolean

RW

If true, sets a debugging breakpoint to occur when this transition has tested as valid. Equivalent to selecting the When Valid check box in the properties dialog box of this transition.

T

Debug.
DisableAll
Breakpoints

Boolean

RW

If true, disables the use of all breakpoints in this machine. Equivalent to selecting the Disable all check box in the Debugger window.

M

Debug.
State
RunTimeCheck.
Inconsistencies

Boolean

RW

If true, checks for state inconsistencies during a debug session. Equivalent to selecting the State Inconsistency check box in the Debugger window.

M

Debug.
RunTimeCheck.
TransitionConflicts

Boolean

RW

If true, checks for transition conflicts during a debug session. Equivalent to selecting the Transition Conflict check box in the Debugger window.

M

Debug.
RunTimeCheck.
CycleDetection

Boolean

RW

If true, checks for cyclical behavior errors during a debug session. Equivalent to selecting the Detect Cycles check box in the Debugger window.

M

Debug.
RunTimeCheck.
DataRangeChecks

Boolean

RW

If true, checks for data range violations during a debug session. Equivalent to selecting the Data Range check box in the Debugger window.

M

Debug.
Watch

Boolean

RW

If true, causes the Debugger window to halt execution if this data is modified. Equivalent to selecting the Watch column entry for this data in the Model Explorer or selecting the Watch in debugger check box in the Data properties dialog box.

D

TestPoint

Boolean

RW

If true (default = false), sets this data, state, or atomic subchart as a Stateflow test point. You can monitor Stateflow test points with a floating scope during simulation. You can also log test point values into MATLAB workspace objects. See Monitoring Test Points in Stateflow Charts in the Stateflow documentation.

D S AS

Display Control

Display Methods

The following methods control the current display.

Method

Description

Objects

dialog

Display the properties dialog box of this object.

M C S AS B F N T J D E X TT EM

fitToView

Zoom in on this object and highlight it in the editor.

C S AS B F N T J TT EM SLF

highlight

Highlight this graphical object in the editor.

S AS B F T J TT EM SLF

view

Make this object visible for editing.

C S AS B F N T J D E X TT EM SLF

zoomIn and zoomOut

Causes the editor to zoom in or zoom out on this chart.

ED

Display Properties

The following properties affect the display of the current Stateflow chart.

Property

Type

Access

Description

Objects

Visible

Boolean

RO

If true, indicates that this object is currently visible in the chart.

C

Subviewer

Chart or State

RO

Chart or state in which you can view this object graphically.

S AS B F N T J TT EM SLF

ZoomFactor

Double

RW

View magnification level (zoom factor) of this chart in the editor.

ED

Graphical Appearance

Color Properties

The following properties set colors for the graphical objects in Stateflow charts.

Property

Type

Access

Description

Objects

ChartColor

[R,G,B]

RW

Background color of this chart in a 1-by-3 RGB array with each value normalized on a scale of 0 to 1.

C

ErrorColor

[R,G,B]

RW

Set the RGB color for errors in the chart using a 1-by-3 RGB array with each value normalized on a scale of 0 to 1.

C

JunctionColor

[R,G,B]

RW

Set the RGB color for junctions in the chart using a 1-by-3 RGB array with each value normalized on a scale of 0 to 1.

C

SelectionColor

[R,G,B]

RW

Color of selected items for this chart in a 1-by-3 RGB array with each value normalized on a scale of 0 to 1.

C

StateColor

[R,G,B]

RW

Color of the state box in a 1-by-3 RGB array with each value normalized on a scale of 0 to 1.

C

StateLabelColor

[R,G,B]

RW

Color of the state labels for this chart in a 1-by-3 RGB array with each value normalized on a scale of 0 to 1.

C

TransitionColor

[R,G,B]

RW

Set the RGB color for transitions in the chart using a 1-by-3 RGB array with each value normalized on a scale of 0 to 1.

C

Transition

LabelColor

[R,G,B]

RW

Color of the transition labels for this chart in a 1-by-3 RGB array with each value normalized on a scale of 0 to 1.

C

Drawing Properties

The following properties control how Stateflow objects are drawn in their charts.

Property

Type

Access

Description

Objects

ArrowSize

Double

RW

Size of transition arrows coming into this object. Equivalent to selecting Arrowhead Size from the context menu for this object.

S AS B F T J TT EM SLF

DrawStyle

String

RW

Drawing style for this transition. Set to 'SMART' (default) for smart transitions or 'STATIC' for static transitions. Equivalent to selecting Smart from the context menu for this transition to toggle between settings.

    Note   Transition must be connected to effect a change in the DrawStyle property. Otherwise, an error occurs.

T

Editor

Editor

RO

Editor object for this chart.

C

Font Properties

The following properties change the font used for text in a Stateflow chart.

Property

Type

Access

Description

Objects

Font.
Angle

Enum

RW

Style of the font for the text in this note. Can be 'ITALIC' or 'NORMAL'. This property overrides the default style for this note, which is set by the StateFont.Angle property of the Chart object containing this note.

N

Font.
Name

String

RO

Name of the font for the text in this note. This property is read-only (RO) and set by the StateFont.Name property of the Chart object containing this note.

N

Font.
Size

Double

RW

Size of the font for the label text for this note. This property overrides the default size for this note, which is set by the StateFont.Size property of the Chart object containing this note. Equivalent to selecting Font Size > <font size> in the context menu for this note.

N

Font.
Weight

Enum

RW

Weight of the font for the label text for this note. Can be 'BOLD' or 'NORMAL'. This property overrides the default weight for the text in this note, which is set by the StateFont.Weight property of the Chart object containing this note.

N

FontSize

Double

RW

Size of the font for the label text for this object. This property overrides the default size for this object, which is set by the StateFont.Size property (TransitionFont.Size for transitions) of the Chart object containing this object. Equivalent to selecting Font Size > <font size> in the context menu for this object.

S AS B F T TT EM SLF

StateFont.
Angle

Enum

RW

Font angle for the labels of State, Box, Function, and Note objects. Can be 'ITALIC' or 'NORMAL'. Use with property StateFont.Weight to achieve Bold Italic style.

You can individually override this property with the Font.Angle property for Note objects.

C

StateFont.
Name

String

RW

Font style used for the labels of State, Box, Function, and Note objects. Enter a string for the font name -- no selectable values. Font remains set to previous font for unrecognized font strings.

C

StateFont.
Size

Integer

RW

Font size for the labels of State, Box, Function, and Note objects.

You can individually override this property with the FontSize property for State, Box, and Function objects and with the Font.Size property for Note objects.

C

StateFont.
Weight

Enum

RW

Font weight for state labels. Can be 'BOLD' or 'NORMAL'. Use with the property StateFont.Angle to achieve Bold Italic style.

You can individually override this property with the Font.Weight property for Note objects.

C

TransitionFont.
Angle

Enum

RW

Font angle for state labels. Can be 'ITALIC' or 'NORMAL'. Use with property StateFont.Weight to achieve Bold Italic style.

C

TransitionFont.
Name

String

RW

Font used for transition labels. Enter string for font name (no selectable values). Font remains set to previous font for unrecognized font strings.

C

TransitionFont.
Size

Integer

RW

Default font size for transition labels. Truncated to closest whole number less than or equal to entered value.

C

TransitionFont.
Weight

Enum

RW

Font weight for transition labels. Can be 'BOLD' or 'NORMAL'. Use with property StateFont.Angle to achieve Bold Italic style.

C

Position Properties

The following properties control the position of Stateflow objects in a Stateflow chart.

Property

Type

Access

Description

Objects

BadIntersection

Boolean

RO

If true, this object graphically intersects another state, box, or function in an invalid way.

S AS B F TT EM SLF

Destination

State, Box, or Junction

RW

Destination state, box, or junction of this transition.

You can also use the property Destination to detach the destination endpoint of a transition, with the command t.Destination = [], where t is the Transition object.

T

DestinationEndPoint

Double

RW

Provides [x y] coordinates for the transition endpoint at its destination. The coordinates are relative to the upper left corner of the chart, which is [0 0].

If you enter non-integer values, only the integer part of the value is used.

If you enter negative values for the coordinates, [0 0] is used instead.

T

DestinationOClock

Double

RW

Location of transition destination connection on state. Varies from 0 to 12 for full clock cycle location. Value taken as modulus 12 of entered value.

T

LabelPosition

Rect

RW

Position and size of this transition label in the chart, given in the form of a 1-by-4 array that includes:

  • (x,y) coordinates for the label's upper left corner relative to the upper left corner of the chart, which is [0 0]

  • Width and height of the label

T

MidPoint

Rect

RW

Provides [x y] coordinates of the transition midpoint relative to the upper left corner of the chart, which is [0 0].

T

Position

Rect

RW

Position and size of box-like objects in the chart, given in the form of a 1-by-4 array that includes:

  • (x,y) coordinates for the object's upper left vertex relative to the upper left vertex of the chart

  • Width and height of the object

S AS B F TT EM SLF N

Position.
Center

Rect

RW

(x,y) position of junction relative to the upper left vertex of the parent chart or state.

J

Position.
Radius

Double

RW

Radius of this junction.

J

Source

State, Box, or Junction

RW

Source state, box, or junction of this transition.

You can also use the property Source to detach the source endpoint of a transition, with the command t.Source = [], where t is the Transition object.

T

SourceEndPoint

Double

RW

Provides [x y] coordinates for the transition endpoint at its source. The coordinates are relative to the upper left corner of the chart, which is [0 0].

If you enter non-integer values, only the integer part of the value is used.

If you enter negative values for the coordinates, [0 0] is used instead.

T

SourceOClock

Double

RW

Location of transition source connection on state. Varies from 0 to 12 for full clock cycle location. Value taken as modulus 12 of entered value.

T

WindowPosition

Rect

RW

Position and size of this chart given in the form of a 1-by-4 array consisting of the following:

  • (x,y) coordinates for the window's left bottom vertex relative to the lower left corner of the screen

  • Width and height of the box

ED

Text Properties

The following properties control the text and text appearance apart from font and color in Stateflow charts.

Property

Type

Access

Description

Objects

Alignment

Enum

RW

Alignment of text in note box. Can be 'LEFT', 'CENTER', or 'RIGHT'.

N

Interpretation

Enum

RW

How the text in this note is interpreted for text processing. Can be 'NORMAL' or 'TEX'.

N

LabelString

String

RW

Label for this object. Equivalent to typing the label for this object in its label text field in the chart.

S AS B F T TT EM SLF

Text

String

RW

Label for this note. The text content for this note that you enter directly into the note in the chart or in the Label field of the Note properties dialog box.

N

Identifiers

The following properties identify objects for the version of Stateflow software.

Property

Type

Access

Description

Objects

Description

String

RW

Description of this object. Equivalent to entering a description in the Description field of the properties dialog box for this object (except for Simulink functions).

M C S AS B F N T J D E X TT EM SLF

Document

String

RW

Document link for this object. Equivalent to entering a link in the Document link field of the properties dialog box for this object (except for Simulink functions).

M C S AS B F N T J D E X TT EM SLF

Id

Integer

RO

Unique identifier assigned to this object to distinguish it from other objects loaded in memory.

M C S AS B F N T J D E X TT EM SLF

Name

String

RW

Name of this object.

This property is RW except for the name of a Machine object, which is RO.

M C S AS B F D E X TT EM SLF

SfVersion

Double

RO

Full version number for current Stateflow software. For example, the string '41112101' appears for Stateflow software version 4.1.1 and MATLAB software version 12.1. The remaining '01' is for internal use.

M

Tag

Any Type

RW

A field you can use to hold data of any type for this object.

M C S AS B F T J D E X TT EM SLF

Type

Enum

RO

Type of this state or junction.

For states, can be one of the following:

  • 'OR' (inclusive)

  • 'AND' (parallel)

The type of a state is determined by the parent's Decomposition property.

For junctions, can be one of the following:

  • 'CONNECTIVE'

  • 'HISTORY'

S J

Interface to Simulink Model

The following properties (and methods) control how data and events are input from and output to the Simulink model for a Stateflow chart.

Property (Method)

Type

Access

Description

Objects

ChartUpdate

Enum

RW

Activation method of this chart. Can be one of the following:

  • 'INHERITED' (Inherited)

  • 'DISCRETE' (Discrete)

  • 'CONTINUOUS' (Continuous)

These preceding entries are equivalent to the parenthetical entries for the Update method field in the Chart properties dialog box.

C

ExecuteAtInitialization

Boolean

RW

If set to true, initialize this chart's state configuration at time zero instead of at first input event. Equivalent to selecting the Execute (enter) Chart At Initialization check box in the Chart properties dialog box.

C

ExportChartFunctions

Boolean

RW

If set to true (default = false), graphical functions at chart level are made global. Equivalent to selecting the Export Chart Level Graphical Functions (Make Global) check box in the Chart properties dialog box.

C

InitializeOutputBooleanRWApplies the initial value of outputs every time a chart wakes up, not only at time 0. See Setting Properties for a Single Chart.

C

(outputData)

No Return

NA

Output the activity status of this state to the Simulink base workspace via a data output port on the Chart block of this state.

S

Port

Integer

RW

Port index number for this input or output data or event (default = 1).

D E

SampleTime

String

RW

Sample time for activating this chart. Applies only when the ChartUpdate property for this chart is set to 'DISCRETE'

( = Discrete in the Update method field in the Chart properties dialog box).

C

SaveToWorkspace

Boolean

RW

If set to true, this data is saved to the MATLAB workspace. Equivalent to selecting the SaveToWorkspace column entry for this data in the Model Explorer or selecting the Save final value to base workspace field in the Data properties dialog box.

D

Scope

Enum

RW

Scope of this data. Allowed values vary with the object containing this data, which are as follows:

  • 'Local'

  • 'Constant'

  • 'Imported' (machine objects only)

  • 'Exported' (machine objects only)

  • 'Input' (chart objects only)

  • 'Output' (chart objects only)

  • 'Temporary' (function objects only)

  • 'Function input' (function objects only)

  • 'Function output' (function objects only)

Above values correspond to entries in the Scope field of the Data or Event properties dialog box.

D E

StrongDataTyping
WithSimulink

Boolean

RW

If set to true, set strong data typing with Simulink I/O. Equivalent to selecting the Use Strong Data Typing with Simulink I/O check box in the Chart properties dialog box.

C

Trigger

Enum

RW

Type of signal that triggers this chart input event. Also the type of trigger associated with this chart output event.

The following triggers apply to both chart input and output events:

  • 'Either' (Either Edge)

  • 'Function call' (Function Call)

The following triggers apply only to chart input events:

  • 'Rising' (Rising Edge)

  • 'Falling' (Falling Edge)

The preceding entries are equivalent to the entries in parentheses for the Trigger field in the Event properties dialog box.

E

Logging Properties

The following properties allow you to manage logging for local data and state activity.

Property

Type

Access

Description

Objects

LoggingInfo.
DataLogging

Boolean

RW

Signal logging mode:

  • 1 = log signal

  • 0 = do not log signal (default)

S D

LoggingInfo.
DecimateData

Boolean

RW

Limit the amount of data logged by skipping samples. Uses the interval specified by LoggingInfo.
Decimation
.

  • 1 = decimate logged data

  • 0 = do not decimate logged data (default)

S D

LoggingInfo.
Decimation

Integer

RW

Decimation interval. Default value is 2, which means the chart logs every other sample.

S D

LoggingInfo.
LimitDataPoints

Boolean

RW

Limit number of data points to log. Uses the value specified by LoggingInfo.
MaxPoints
.

  • 1 = limit number of points

  • 0 = do not limit number of points (default)

S D

LoggingInfo.
MaxPoints

Integer

RW

Maximum number of data points to log. Default value is 5000, which means the chart logs the last 5000 data points generated by the simulation.

S D

LoggingInfo.
NameMode

String

RW

Source of signal logging name:

  • ‘SignalName' = same as signal name (default)

  • ‘Custom' = name specified by user as LoggingInfo.
    UserSpecifiedLogName
    .

S D

LooggingInfo.
UserSpecifiedLogName

String

RW

User-specified (custom) signal logging name.

S D

Machine (Model) Identifier Properties

The following properties identify parts of the Simulink model containing a Stateflow chart.

Property

Type

Access

Description

Objects

Created

String

RO

Date of creation of this machine.

M

Creator

String

RW

Creator of this machine.

M

Dirty

Boolean

RW

If true, this object has changed since it was opened or saved.

M C

FullFileName

String

RO

Full path name of file under which this machine (model) is stored.

M

Iced

Boolean

RO

Equivalent to property Locked except that this property is used internally to lock this object from being changed during activities such as simulation.

M C

IsLibrary

Boolean

RO

If true, specifies that the current model builds a library and not an application.

M

Locked

Boolean

RW

If set to true, prevents user from changing any Stateflow chart in this machine or chart.

M C

Modified

String

RW

Comment area for entering date and name of modification to this machine (model).

M

Version

String

RW

Comment string for recording version of this model.

M

Truth Table Construction Properties

The following properties control the definition of a truth table.

Property

Type

Access

Description

Objects

ActionTable

Cell Array

RW

A cell array of strings containing the contents of the Action Table for this truth table.

TT

ConditionTable

Cell Array

RW

A cell array of strings containing the contents of the Action Table for this truth table.

TT

OverSpec Diagnostic

String

RW

Interprets the error diagnosis of this truth table as overspecified according to the possible values 'Error', 'Warning', or 'None'. In the Truth Table Editor, the value of this property is assigned by selecting Overspecified from the Settings menu item and then selecting one of the three values.

TT

UnderSpec Diagnostic

String

RW

Interprets the error diagnosis of this truth table as underspecified according to the possible values 'Error', 'Warning', or 'None'. In the Truth Table Editor, the value of this property is assigned by selecting Underspecified from the Settings menu item and then selecting one of the three values.

TT

  


Free Stateflow Interactive Kit

Learn how engineers use Stateflow to model state machines in their Simulink models.


Get free kit

Trials Available

Try the latest version of Stateflow.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS