Main Content

List of Stateflow API Properties

The following reference tables for Stateflow® API properties have these columns:

  • Property — The name of the property. To access or set a property value, 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 Modify Properties and Call Functions of Stateflow Objects.

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

  • Objects — The types of objects that have this property. 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 (MF), MATLAB Function Block (MFB), Message (MS), Entry or Exit Port (P), State (S), Simulink® Based State (SBS), Simulink Function (SF), State Transition Table (STT), Transition (T), Truth Table Block (TTB), and Truth Table Function (TTF).

Active State Output

PropertyAccessDescriptionObjects
DoNotAutogenerateEnumRW

Whether to define the enumerated data type for the active state data output manually, specified as a numeric or logical 1 (true) or 0 (false). This property applies only when the OutputMonitoringMode property is 'ChildActivity' or 'LeafStateActivity'. For more information, see Define State Activity Enumeration Type.

C S STT

EnumTypeNameRW

Name of the enumerated data type for the active state data object, specified as a character vector. This property applies only when the OutputMonitoringMode property is 'ChildActivity' or 'LeafStateActivity'. For more information, see Enum Name.

C S STT

HasOutputDataRW

Whether to create an active state data output port for the object, specified as a numeric or logical 1 (true) or 0 (false). For more information, see Monitor State Activity Through Active State Data.

AS C SBS S STT

OutputDataRO

Active state data object, specified as a Stateflow.Data object. This property applies only when the HasOutputData property is true.

AS C SBS S STT

OutputMonitoringModeRW

Monitoring mode for the active state output data, specified as 'SelfActivity', 'ChildActivity', or 'LeafStateActivity'.

For charts, the options are 'ChildActivity' or 'LeafStateActivity'.

For atomic subcharts and Simulink based states, the only option is 'SelfActivity'.

AS C SBS S STT

OutputPortNameRW

Name of the active state data object, specified as a character vector. This property applies only when the HasOutputData property is true.

AS C SBS S STT

OutputStateRO

State or chart monitored by the data object, specified as an empty array or a Stateflow.AtomicSubchart, Stateflow.Chart, Stateflow.SimulinkBasedState, Stateflow.State, or Stateflow.StateTransitionTableChart object. For more information, see Monitor State Activity Through Active State Data.

D

C Action Language

PropertyAccessDescriptionObjects
EnableBitOpsRW

Whether to use bit operations in state and transition actions, specified as a numeric or logical 1 (true) or 0 (false). This property applies only to charts and state transition tables that use C as the action language. For more information, see Enable C-bit operations.

C STT

StrongDataTypingWithSimulinkRWWhether to use strong data typing when the chart or state transition table interfaces with Simulink input and output signals, specified as a numeric or logical 1 (true) or 0 (false). This property applies only to charts and state transition tables that use C as the action language. For more information, see Use strong data typing with Simulink I/O.

C STT

UserSpecifiedStateTransitionExecutionOrderRW

Whether to use explicit ordering of parallel states and transitions, specified as a numeric or logical 1 (true) or 0 (false). This property applies only to charts that use C as the action language. For more information, see User-specified state/transition execution order.

C

Callbacks

PropertyAccessDescriptionObjects
ClickFcnRW

Callback on click, specified as a character vector. This callback contains MATLAB code to execute when to execute when you click the annotation.

A

DeleteFcnRW

Callback at delete, specified as a character vector. This callback contains MATLAB code to execute before you delete the annotation.

A

LoadFcnRW

Callback at model load, specified as a character vector. This callback contains MATLAB code to execute when you load the model that contains the annotation.

A

UseDisplayTextAsClickCallbackRW

Whether to use the annotation text as a callback, specified as a numeric or logical 1 (true) or 0 (false). When this property is enabled, the contents of the Text property is used as the callback when you click the annotation.

A

Chart Initialization

PropertyAccessDescriptionObjects
ExecuteAtInitializationRW

Whether to initialize the state configuration of the chart or state transition table at time zero instead of at the first input event, specified as a numeric or logical 1 (true) or 0 (false). For more information, see Execution of a Chart at Initialization.

C STT

InitializeOutputRW

Whether to initialize the output data every time the chart or state transition table wakes up, specified as a numeric or logical 1 (true) or 0 (false). For more information, see Initialize outputs every time chart wakes up.

C STT

StatesWhenEnablingRW

Behavior of the states when a function-call input event reenables the chart or state transition table, specified as one of these values:

  • '' — The chart or state transition table does not contain function-call input events.

  • 'held' — The chart or state transition table maintains the most recent values of the states.

  • 'reset' — The chart or state transition table reverts to the initial conditions of the states.

For more information, see Control States in Charts Enabled by Function-Call Input Events.

C STT

Code Generation

PropertyAccessDescriptionObjects
GeneratePreprocessorConditionalsRW

Whether the generated code includes a preprocessor conditional statement for the variant conditions in the chart, specified as a numeric or logical 1 (true) or 0 (false). This property applies only when generating code with Embedded Coder®. For more information, see Code Generation Using Variant Transitions.

C

InlineOptionRW

Appearance of the state functions, graphical function, MATLAB function, or truth table function in generated code, specified as one of these values:

  • 'Auto' — An internal calculation determines the appearance of the functions in generated code.

  • 'Function' — The functions are implemented as a separate C functions.

  • 'Inline' — Calls to the functions are replaced by code.

For more information, see Inline State Functions in Generated Code (Simulink Coder).

GF MF S TTF

IsVariantRW

Whether the transition is a variant transition, specified as a numeric or logical 1 (true) or 0 (false). For more information, see Code Generation Using Variant Transitions.

T

Content

PropertyAccessDescriptionObjects
ActionLanguageRW

Action language used to program the chart or state transition table, specified as 'MATLAB' or 'C'. For more information, see Differences Between MATLAB and C as Action Language Syntax.

C STT

ActionTableRW

Action table for the truth table, specified as a cell array of character vectors.

TTB TTF

AlignmentRW

Alignment of the annotation text, specified as 'LEFT', 'CENTER', or 'RIGHT'.

A

AllowDirectFeedthroughRW

Whether the MATLAB Function block supports direct feedthrough semantics, specified as a numeric or logical 1 (true) or 0 (false). For more information, see Allow direct feedthrough (Simulink).

MFB

CommentTextRW

Comment text added to the graphical object, specified as a character vector. This property applies only when the IsExplicitlyCommented property is true. In the Stateflow Editor, when you point to the comment badge on the graphical object, the text appears as a tooltip. When you set the IsExplicitlyCommented property to false, the value of CommentText reverts to ''.

AB AS B GF J MF P SBS SF S T TTF

ConditionRO

Transition condition, specified as a character vector. The value of this property depends on the LabelString property for the transition. For more information, see Specify Labels in States and Transitions Programmatically.

T

ConditionActionRO

Transition condition action, specified as a character vector. The value of this property depends on the LabelString property for the transition. For more information, see Specify Labels in States and Transitions Programmatically.

T

ConditionTableRW

Condition table for the truth table, specified as a cell array of character vectors.

TTB TTF

DuringActionRO

State during action, specified as a character vector. The value of this property depends on the LabelString property for the state. For more information, see Specify Labels in States and Transitions Programmatically. This property is not supported in Moore charts.

S

EntryActionRO

State entry action, specified as a character vector. The value of this property depends on the LabelString property for the state. For more information, see Specify Labels in States and Transitions Programmatically. This property is not supported in Moore charts.

S

ExecutionOrderRW

Execution order for the transition when its source is active, specified as an integer scalar. This property applies only when the UserSpecifiedStateTransitionExecutionOrder property of the chart that contains the transition is true. For more information, see Transition Evaluation Order.

T

ExitActionRO

State exit action, specified as a character vector. The value of this property depends on the LabelString property for the state. For more information, see Specify Labels in States and Transitions Programmatically. This property is not supported in Moore charts.

S

FullFileNameRO

Full file path of the Simulink model for the machine, specified as a character vector.

M

InterpretationRW

Format of the annotation text, specified as 'OFF', 'RICH', or 'TEX'.

A

IsExplicitlyCommentedRW

Whether to comment out the graphical object, specified as a numeric or logical 1 (true) or 0 (false). Setting this property to true is equivalent to right-clicking the graphical object and selecting Comment Out. For more information, see Commenting Stateflow Objects in a Chart.

AB AS B GF J MF P SBS SF S T TTF

IsImageRO

Whether the annotation contains an image, specified as a numeric or logical 1 (true) or 0 (false).

A

IsImplicitlyCommentedRO

Whether the graphical object is implicitly commented out, specified as a numeric or logical 1 (true) or 0 (false). The graphical object is implicitly commented out when you comment out a state, box, or function that contains it. Additionally, transitions are implicitly commented out when you comment out their source or destination.

AB AS B GF J MF P SBS SF S T TTF

IsLibraryRO

Whether the Simulink model for the machine builds a library and not an application, specified as a numeric or logical 1 (true) or 0 (false).

M

IsLinkRO

Whether the atomic box or subchart is a library link, specified as a numeric or logical 1 (true) or 0 (false).

AB AS

LabelStringRW

Label for the graphical object, specified as a character vector. For more information, see Specify Labels in States and Transitions Programmatically.

AB AS B GF MF P SF S T TTF

LanguageRW

Action language used to program the truth table, specified as 'MATLAB' or 'C'. The option 'C' is supported only in truth tables in charts that use C as the action language. For more information, see Differences Between MATLAB and C as Action Language Syntax.

TTF

MooreActionRO

State action in a Moore chart, specified as a character vector. The value of this property depends on the LabelString property for the state. For more information, see Specify Labels in States and Transitions Programmatically. This property is supported only in Moore charts. For more information, see Design Rules for Moore Charts.

S

Name

RO for all Stateflow.Machine objects.

RW for all other objects.

Name of the object, specified as a character vector.

AB AS B C GF M MF SBS SF S STT TTB TTF MFB

OnActionRO

State on actions, specified as a cell array of character vectors in the form

{'trigger1','action1',...,'triggerN','actionN'}

The value of this property depends on the LabelString property for the state. For more information, see Specify Labels in States and Transitions Programmatically. This property is not supported in Moore charts.

S

PlainTextRO

Annotation text without formatting, specified as a character vector.

A

PortTypeRO

Type of junction, specified as 'EntryJunction', 'EntryPort', 'ExitJunction'or 'ExitPort'.

P

ScriptRW

Code for the MATLAB function or MATLAB Function block, specified as a character vector. To enter multiple lines of code, you can:

  • Call the MATLAB function sprintf and use the escape sequence \n to insert newline characters:

    str = sprintf('function y=f(x)\ny=x+1;\nend');
    mfb.Script = str;
  • Enter a concatenated text expression that uses the integer 10 as the ASCII equivalent of a newline character:

    str = ['function y=f(x)',10, ...
        'y=x+1;',10, ...
        'end'];
    mfb.Script = str;

MF MFB

StateMachineTypeRW

State machine semantics implemented by the chart or state transition table, specified as 'Classic', 'Mealy', or 'Moore'. For more information, see Overview of Mealy and Moore Machines.

C STT

SupportVariableSizingRW

Whether the chart, state transition table, truth table, or MATLAB Function block supports variable-size data, specified as a numeric or logical 1 (true) or 0 (false). Only variable-size data can change dimension during simulation. For more information, see Declare Variable-Size Inputs and Outputs (Simulink).

C STT TTB MFB

TextRW

Text for the annotation, specified as a character vector.

A

TransitionActionRO

Transition action, specified as a character vector. The value of this property depends on the LabelString property for the transition. For more information, see Specify Labels in States and Transitions Programmatically.

T

TriggerRO

Transition trigger, specified as a character vector. The value of this property depends on the LabelString property for the transition. For more information, see Specify Labels in States and Transitions Programmatically.

T

TypeRW

Type of junction, specified as one of these values:

  • 'CONNECTIVE' — Connective junction that represents a decision point in a transition path

  • 'HISTORY' — History junction that records the activity of substates inside a superstate

J

Data Specification

PropertyAccessDescriptionObjects
CompiledSizeRO

Data size as determined by the compiler, specified as a character vector.

D MS

CompiledTypeRO

Data type as determined by the compiler, specified as a character vector.

D MS

DataTypeRW

Type of the data object or message data, specified as a character vector that depends on the Props.Type.Method property:

  • If the Props.Type.Method property is 'Inherit', the value of this property is 'Inherit: From definition in chart' for local data and 'Inherit: Same as Simulink' for input data, output data, parameter data, and messages.

  • If the Props.Type.Method property is 'Built-in', you can specify this property with one of these options:

    • 'double'

    • 'single'

    • 'int8'

    • 'int16'

    • 'int32'

    • 'int64'

    • 'uint8'

    • 'uint16'

    • 'uint32'

    • 'uint64'

    • 'boolean'

    • 'ml' (Supported only in charts that use C as the action language)

    • 'string' (Supported only in charts that use C as the action language)

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

For more information, see the section Add Data in Create Charts by Using the Stateflow API.

D MS

Props.Array.FirstIndexRW

Index for the first element of the array data object, specified as a character vector. This property applies only to array data in charts that use C as the action language. For more information, see Save Final Value to Base Workspace.

D

Props.Array.IsDynamicRW

Whether the data object has variable size, specified as a numeric or logical 1 (true) or 0 (false). This property applies only to input, output, and local data and is equivalent to the Variable Size check box in the Data properties dialog box. Use the Size property to specify the maximum size for the data. For more information, see Declare Variable-Size Data in Stateflow Charts.

D

Props.Array.SizeRW

Size of the data object or message data, specified as a character vector. For more information, see Specify Size of Stateflow Data.

D MS

Props.ComplexityRW

Whether the data object or message accepts complex values, specified as 'On' or 'Off'. For more information, see Complex Data in Stateflow Charts.

D MS

Props.InitialValueRW

Initial value, specified as a character vector.

D MS

Props.Range.MaximumRW

Maximum value for the data object, specified as a character vector. For more information, see Limit Range.

D

Props.Range.MinimumRW

Minimum value for the data object, specified as a character vector. For more information, see Limit Range.

D

Props.ResolveToSignalObjectRW

Whether the data object resolves to a Simulink.Signal object that you define in the model or base workspace, specified as a numeric or logical 1 (true) or 0 (false). For more information, see Resolve Data Properties from Simulink Signal Objects.

D

Props.Type.BusObjectRW

Name of the Simulink.Bus object that defines the data object or message data, specified as a character vector. This property applies only when the Props.Type.Method property is 'Bus Object'. For more information, see Access Bus Signals Through Stateflow Structures.

D MS

Props.Type.EnumTypeRW

Name of the enumerated type that defines the data object or message data, specified as a character vector. This property applies only when the Props.Type.Method property is 'Enumerated'. For more information, see Reference Values by Name by Using Enumerated Data.

D MS

Props.Type.ExpressionRW

Expression that evaluates to the data type of the data object or message data, specified as a character vector. This property applies only when the Props.Type.Method property is 'Expression'. For more information, see Specify Data Properties by Using MATLAB Expressions.

D MS

Props.Type.Fixpt.BiasRW

Bias, specified as a character vector. This property applies only when the Props.Type.Method property is 'Fixed point' and the Props.Type.Fixpt.ScalingMode property is 'Slope and bias'. For more information, see Fixed-Point Data in Stateflow Charts.

D MS

Props.Type.Fixpt.FractionLengthRW

Fraction length, in bits, specified as a character vector. This property applies only when the Props.Type.Method property is 'Fixed point' and the Props.Type.Fixpt.ScalingMode property is 'Binary point'. For more information, see Fixed-Point Data in Stateflow Charts.

D MS

Props.Type.Fixpt.LockRW

Whether to prevent replacement of the fixed-point type with an autoscaled type chosen by the Fixed-Point Tool (Fixed-Point Designer), specified as a numeric or logical 1 (true) or 0 (false). For more information, see Iterative Fixed-Point Conversion Using the Fixed-Point Tool (Fixed-Point Designer).

D MS

Props.Type.Fixpt.ScalingModeRW

Method for scaling the fixed-point data object or message data, specified as 'Binary point', 'Slope and bias', or 'None'. This property applies only when the Props.Type.Method property is 'Fixed point'. For more information, see Fixed-Point Data in Stateflow Charts.

D MS

Props.Type.Fixpt.SlopeRW

Slope, specified as a character vector. This property applies only when the Props.Type.Method property is 'Fixed point' and the Props.Type.Fixpt.ScalingMode property is 'Slope and bias'. For more information, see Fixed-Point Data in Stateflow Charts.

D MS

Props.Type.MethodRW

Method for setting the type of the data object or message data, specified as a character vector.

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

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

  • For data store memory data, use 'Inherited'.

  • For messages, use 'Inherited', 'Built-in', 'Bus Object', 'Enumerated', 'Expression', or 'Fixed point'.

This property is equivalent to the Mode field of the Data Type Assistant in the Model Explorer, the Data properties dialog box, or the Message properties dialog box. For more information, see Specify Type of Stateflow Data.

D MS

Props.Type.SignedRW

Signedness, specified as a numeric or logical 1 (true) or 0 (false). This property applies only when the Props.Type.Method property is 'Fixed point'. For more information, see Fixed-Point Data in Stateflow Charts.

D MS

Props.Type.WordLengthRW

Word length, in bits, specified as a character vector. This property applies only when the Props.Type.Method property is 'Fixed point'. For more information, see Fixed-Point Data in Stateflow Charts.

D MS

Props.Unit.NameRW

Name of unit of measurement for the data object, specified as a character vector. This property applies only to input and ouput data. For more information, see Specify Units for Stateflow Data.

D

Debugging

PropertyAccessDescriptionObjects
Debug.Animation.DelayRW

Delay that the chart animation uses for highlighting each transition segment in the machine, specified as a scalar. These values correspond to the settings of the Animation Speed drop-down list in the Debug tab:

Delay ValueAnimation Speed
0.5Slow
0.2Medium
0Fast
-1Lightning Fast

This property applies only when the Debug.Animation.Enable property of the machine is true.

M

Debug.Animation.EnabledRW

Whether to animate the charts in the machine during simulation, specified as a numeric or logical 1 (true) or 0 (false). Disabling this property is equivalent to selecting None in the Animation Speed drop-down list in the Debug tab.

M

Debug.Animation.MaintainHighlightingRW

Whether to maintain the highlighting of active states in the machine after the simulation ends, specified as a numeric or logical 1 (true) or 0 (false).

M

Debug.Breakpoints.EndBroadcastRW

Whether to set the End of Broadcast breakpoint for the event, specified as a numeric or logical 1 (true) or 0 (false). For more information, see Set Breakpoints to Debug Charts.

E

Debug.Breakpoints.OnDuringRW

Whether to set the During State or During Function Call breakpoint, specified as a numeric or logical 1 (true) or 0 (false).

For truth tables, this property applies only when both the Language property of the truth table and the ActionLanguage of the chart that contains the truth table are 'C' .

For more information, see Set Breakpoints to Debug Charts.

AS GF SBS S TTF

Debug.Breakpoints.OnEntryRW

Whether to set the On Chart Entry or On State Entry breakpoint, specified as a numeric or logical 1 (true) or 0 (false). For more information, see Set Breakpoints to Debug Charts.

AS C SBS S STT

Debug.Breakpoints.OnExitRW

Whether to set the On State Exit or On State Exitbreakpoint, specified as a numeric or logical 1 (true) or 0 (false). For more information, see Set Breakpoints to Debug Charts.

AS SBS S

Debug.Breakpoints.StartBroadcastRW

Whether to set the Start of Broadcast breakpoint for the event, specified as a numeric or logical 1 (true) or 0 (false). For more information, see Set Breakpoints to Debug Charts.

E

Debug.Breakpoints.WhenTestedRW

Whether to set the When Transition is Tested breakpoint for the transition, specified as a numeric or logical 1 (true) or 0 (false). For more information, see Set Breakpoints to Debug Charts.

T

Debug.Breakpoints.WhenValidRW

Whether to set the When Transition is Valid breakpoint for the transition, specified as a numeric or logical 1 (true) or 0 (false). For more information, see Set Breakpoints to Debug Charts.

T

Debug.WatchRW

Whether to track the value of the data object in the Breakpoints and Watch window, specified as a numeric or logical 1 (true) or 0 (false). For more information, see View Data in the Breakpoints and Watch Window.

D

OverSpecDiagnosticRW

Level of diagnostic action when the truth table is overspecified, specified as 'Error', 'Warning', or 'None'. For more information, see Correct Overspecified and Underspecified Truth Tables.

TTB TTF

TestPointRW

Whether to set the atomic subchart, state, Simulink based state, or data object as a test point, specified as a numeric or logical 1 (true) or 0 (false). For more information, see Monitor Test Points in Stateflow Charts.

AS D SBS S

UnderSpecDiagnosticRW

Level of diagnostic action when the truth table is underspecified, specified as 'Error', 'Warning', or 'None'. For more information, see Correct Overspecified and Underspecified Truth Tables.

TTB TTF

Discrete and Continuous-Time Semantics

PropertyAccessDescriptionObjects
ChartUpdateRW

Activation method for the chart, state transition table, truth table, or MATLAB Function block, specified as 'CONTINUOUS', 'DISCRETE', or 'INHERITED'. For more information, see Update Method.

C STT TTB MFB

EnableZeroCrossingsRW

Whether to enable zero-crossing detection on state transitions in the chart or state transition table, specified as a numeric or logical 1 (true) or 0 (false). This property applies only when the ChartUpdate property for the chart is set to 'CONTINUOUS'. For more information, see Disable Zero-Crossing Detection.

C STT

SampleTimeRW

Sample time for activating the chart, state transition table, truth table, or MATLAB Function block, specified as a character vector. This property applies only when the ChartUpdate property for the chart is 'DISCRETE'.

C STT TTB MFB

Exported Functions

PropertyAccessDescriptionObjects
AllowGlobalAccessToExportedFunctionsRW

Whether exported functions from the chart are globally visible in the Simulink model, specified as a numeric or logical 1 (true) or 0 (false). When this property is enabled, blocks throughout the model can call functions exported from the chart without using qualified notation. This property applies only when the ExportChartFunctions property for the chart is true.

C

ExportChartFunctionsRW

Whether to export chart-level functions to other blocks in the Simulink model, specified as a numeric or logical 1 (true) or 0 (false). For more information, see Export Stateflow Functions for Reuse.

C

Graphical Appearance

PropertyAccessDescriptionObjects
ArrowSizeRW

For states, subcharts, ports, and junctions, size of incoming transition arrows, specified as a scalar.

For transitions, size of the transition arrow at the destination. When you change the destination of the transition, this property resets to the value of the ArrowSize property of the new destination.

AS J P SBS S T

AutoBackgroundColorRW

Whether to use the default background color, specified as a numeric or logical 1 (true) or 0 (false).

  • true — Use the default color specified by the ChartColor property of the chart that contains the annotation.

  • false — Use the color specified by the BackgroundColor property of the annotation.

A

AutoForegroundColorRW

Whether to use the default foreground color, specified as a numeric or logical 1 (true) or 0 (false).

  • true — Use the default color specified by the StateLabelColor property of the chart that contains the annotation.

  • false — Use the color specified by the ForegroundColor property of the annotation.

A

BackgroundColorRW

Background color for the annotation, specified as a three-element numeric vector of the form [red green blue] that specifies the red, green, and blue values. Each element must be in the range between 0 and 1. This property applies only when the AutoBackgroundColor property is false.

A

BadIntersectionRO

Whether a box, state, or function graphically intersects another box, state, or function, specified as a numeric or logical 1 (true) or 0 (false).

AB AS B GF MF SBS SF S TTF

ChartColorRW

Background color for the chart, specified as a three-element numeric vector of the form [red green blue] that specifies the red, green, and blue values. Each element must be in the range between 0 and 1.

For state transition tables, this property controls the appearance of the chart that is automatically generated for the state transition table.

C STT

ContentPreviewEnabledRW

Whether to display a preview of the contents of the object, specified as a numeric or logical 1 (true) or 0 (false).

For boxes, states, or graphical functions, this property applies only when the IsSubchart property is true.

AB AS B GF SBS SF S

DestinationRW

Destination of the transition, specified as an empty array or a Stateflow API object of one of these types:

T

DestinationEndPointRW

Position of the transition endpoint at its destination, specified as a two-element numeric vector [x y] of coordinates relative to the upper left corner of the chart.

T

DestinationOClockRW

Location of the transition endpoint at its destination, specified as a scalar between 0 and 12 that describes a clock position.

T

DropShadowRW

Whether to display a drop shadow around the annotation box, specified as a numeric or logical 1 (true) or 0 (false).

A

EditorRO

Editor for the chart or state transition table, specified as a Stateflow.Editor object. You can use this object to control the position, size, and magnification level of the Stateflow Editor window.

C STT

FixedHeightRW

Whether to fix height of the annotation box, specified as a numeric or logical 1 (true) or 0 (false).

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

A

FixedWidthRW

Whether to fix height of the annotation box, specified as a numeric or logical 1 (true) or 0 (false).

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

A

Font.AngleRW

Font angle for the annotation text, specified as 'NORMAL' or 'ITALIC'.

A

Font.NameRO

Font name for the annotation text, specified as a character vector. The StateFont.Name property of the chart that contains the annotation sets the value of this property.

A

Font.SizeRW

Font size for the annotation text, specified as a scalar. The StateFont.Size property of the chart that contains the annotation sets the initial value of this property.

A

Font.WeightRW

Font weight for the annotation text, specified as 'NORMAL' or 'BOLD'.

A

FontSizeRW

Font size for the label of a box, state, function, or transition, specified as a scalar. The StateFont.Size property of the chart that contains the graphical function sets the initial value of this property.

AB AS B GF MF SBS SF S T TTF

ForegroundColorRW

Foreground color for the annotation, specified as a three-element numeric vector of the form [red green blue] that specifies the red, green, and blue values. Each element must be in the range between 0 and 1. This property applies only when the AutoForegroundColor property is false.

A

InternalMarginsRW

Space between the text and the border of the annotation box, specified as a four-element numeric vector of the form [left top right bottom].

A

IsGroupedRW

Whether the box, function, or state is grouped, specified as a numeric or logical 1 (true) or 0 (false). When you copy and paste a grouped object, you copy not only the object but all of its contents. For more information, see Copy and Paste by Grouping.

B GF S

IsSubchartRW

Whether the box, function, or state is a subchart, specified as a numeric or logical 1 (true) or 0 (false).

B GF S

JunctionColorRW

Color for junctions in the chart, specified as a three-element numeric vector of the form [red green blue] that specifies the red, green, and blue values. Each element must be in the range between 0 and 1.

For state transition tables, this property controls the appearance of the chart that is automatically generated for the state transition table.

C STT

LabelPositionRW

Position and size of the transition, port, or junction label, specified as a four-element numeric vector of the form [left top width height].

T P

MidPointRW

Position of the midpoint of the transition, specified as a two-element numeric vector [x y] of coordinates relative to the upper left corner of the chart.

T

PositionRW

Position and size of the graphical object, specified as a four-element numeric vector of the form [left top width height].

A AB AS B GF MF SBS SF S TTF

Position.CenterRW

Position of the center of the port or junction, specified as a two-element numeric vector [x y] of coordinates relative to the upper left corner of the chart.

J P

Position.RadiusRW

Radius of the port or junction, specified as a scalar.

J P

SourceRW

Source of the transition, specified as an empty array or a Stateflow API object of one of these types:

T

SourceEndPointRW

Position of the transition endpoint at its source, specified as a two-element numeric vector [x y] of coordinates relative to the upper left corner of the chart.

T

SourceOClockRW

Location of the transition endpoint at its source, specified as a scalar between 0 and 12 that describes a clock position.

T

StateColorRW

Color for the boxes, functions, and states in the chart, specified as a three-element numeric vector of the form [red green blue] that specifies the red, green, and blue values. Each element must be in the range between 0 and 1.

For state transition tables, this property controls the appearance of the chart that is automatically generated for the state transition table.

C STT

StateFont.AngleRW

Font angle for the box, function, and state labels in the chart, specified as 'NORMAL' or 'ITALIC'.

For state transition tables, this property controls the appearance of the chart that is automatically generated for the state transition table.

C STT

StateFont.NameRW

Font name for the annotation, box, function, and state labels in the chart, specified as a character vector.

For state transition tables, this property controls the appearance of the chart that is automatically generated for the state transition table.

C STT

StateFont.SizeRW

Initial font size for the annotation, box, function, and state labels in the chart, specified as a scalar.

For state transition tables, this property controls the appearance of the chart that is automatically generated for the state transition table.

C STT

StateFont.WeightRW

Font weight for the box, function, and state labels in the chart, specified as 'NORMAL' or 'BOLD'.

For state transition tables, this property controls the appearance of the chart that is automatically generated for the state transition table.

C STT

StateLabelColorRW

Color for the box, function, and state labels in the chart, specified as a three-element numeric vector of the form [red green blue] that specifies the red, green, and blue values. Each element must be in the range between 0 and 1.

For state transition tables, this property controls the appearance of the chart that is automatically generated for the state transition table.

C STT

TransitionColorRW

Color for transitions in the chart, specified as a three-element numeric vector of the form [red green blue] that specifies the red, green, and blue values. Each element must be in the range between 0 and 1.

For state transition tables, this property controls the appearance of the chart that is automatically generated for the state transition table.

C STT

TransitionFont.AngleRW

Font angle for the transition labels in the chart, specified as 'NORMAL' or 'ITALIC'.

For state transition tables, this property controls the appearance of the chart that is automatically generated for the state transition table.

C STT

TransitionFont.NameRW

Font name for the transition labels in the chart, specified as a character vector.

For state transition tables, this property controls the appearance of the chart that is automatically generated for the state transition table.

C STT

TransitionFont.SizeRW

Initial font size for the transition labels in the chart, specified as a scalar.

For state transition tables, this property controls the appearance of the chart that is automatically generated for the state transition table.

C STT

TransitionFont.WeightRW

Font weight for the transition labels in the chart, specified as 'NORMAL' or 'BOLD'.

For state transition tables, this property controls the appearance of the chart that is automatically generated for the state transition table.

C STT

TransitionLabelColorRW

Color for the transition labels in the chart, specified as a three-element numeric vector of the form [red green blue] that specifies the red, green, and blue values. Each element must be in the range between 0 and 1.

For state transition tables, this property controls the appearance of the chart that is automatically generated for the state transition table.

C STT

VisibleRW

Whether the Stateflow Editor window is displaying the chart or state transition table, specified as a numeric or logical 1 (true) or 0 (false).

C STT

Hierarchy

PropertyAccessDescriptionObjects
ChartRO

Chart that contains the object, specified as a Stateflow.Chart object.

A AB AS B GF J MF P SBS SF S T TTF

DirtyRW

Whether the chart, state transition table, truth table, MATLAB Function block, or the Simulink model for the Stateflow machine has changed after being opened or saved, specified as a numeric or logical 1 (true) or 0 (false).

C M STT TTB MFB

HomeRO

Home state or subchart, specified as a Stateflow.State or Stateflow.AtomicSubchart object. The home of an entry or exit port is the state or subchart whose boundary contains the port. This property applies only to entry and exit ports.

P
IcedRO

Whether the chart, state transition table, truth table, MATLAB Function block, or the Simulink model for the Stateflow machine is locked, specified as a numeric or logical 1 (true) or 0 (false). This property is equivalent to the property Locked, but is used internally to prevent changes in the chart, block, or model during simulation.

C M STT TTB MFB

LinkedROWhether the port or junction has a matching junction or port, specified as a numeric or logical 1 (true) or 0 (false). This property is used to detect internal inconsistencies in the chart.P
LockedRW

Whether the chart, state transition table, truth table, MATLAB Function block, or the Simulink model for the Stateflow machine is locked, specified as a numeric or logical 1 (true) or 0 (false). Enable this property to prevent changes in the chart, block, or model.

C M STT TTB MFB

MachineRO

Machine that contains the object, specified as a Stateflow.Machine object.

A AB AS B C D E GF J MF MS P SBS SF S STT T TTB TTF MFB

PathRO

Location of the object in the model hierarchy, specified as a character vector.

A AB AS B C D E GF J M MF MS P SBS SF S STT T TTB TTF MFB

SubchartRO

Contents of the atomic box or subchart, specified as a Stateflow.Chart object. Use this object to add children, such as states and transitions, to an atomic subchart.

AB AS

SubviewerRO

Subviewer for the graphical object, specified as a Stateflow.Chart, Stateflow.State, Stateflow.Box, or Stateflow.Function object. The subviewer is the chart or subchart where you can graphically view the object.

A AB AS B GF J MF P SBS SF S T TTF

Identification

PropertyAccessDescriptionObjects
CreatedRO

Date of the creation of the machine, specified as a character vector.

M

CreatorRW

Creator of the machine, specified as a character vector.

M

DescriptionRW

Description for the object, specified as a character vector.

A AB AS B C D E GF J M MF MS P SBS SF S STT T TTB TTF MFB

DocumentRW

Document link for the object, specified as a character vector.

A AB AS B C D E GF J M MF MS P SBS SF S STT T TTB TTF MFB

IdRO

Unique identifier, specified as an integer scalar. Use this property to distinguish the object from other objects in the model. The value of this property is reassigned every time you start a new MATLAB session and may be recycled after an object is deleted.

A AB AS B C D E GF J M MF MS P SBS SF S STT T TTB TTF MFB

ModifiedRW

Record of modifications to the machine, specified as a character vector.

M

SSIdNumberRO

Session-independent identifier, specified as an integer scalar. Use this property to distinguish the object from other objects in the model.

AB AS D GF J MF MS P SBS SF S T TTF

TagRW

User-defined tag for the object, specified as data of any type.

A AB AS B C D E GF J M MF MS P SBS SF S STT T TTB TTF MFB

VersionRW

Version of the machine, specified as a character vector.

M

Integer and Fixed-Point Data

PropertyAccessDescriptionObjects
EmlDefaultFimathRW

Default fimath properties for the chart, state transition table, truth table, or MATLAB function, specified as one of these values:

  • 'Same as MATLAB Default' — Use the same fimath properties as the current default fimath object.

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

For charts and state transition tables, this property applies only when the ActionLanguage property is 'MATLAB'.

For MATLAB functions, this property applies only when the ActionLanguage of the chart that contains the function is 'C'.

For truth table functions, this property applies only when the Language property of the truth table is 'MATLAB' and the ActionLanguage of the chart that contains the truth table is 'C'.

C MF STT TTB TTF MFB

InputFimathRW

Default fimath object, specified as a character vector. When the EmlDefaultFimath property of the chart, state transition table, truth table, or MATLAB function is 'Other:UserSpecified', you can use this property to:

  • Enter an expression that constructs a fimath object.

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

For charts and state transition tables, this property applies only when the ActionLanguage property is 'MATLAB'.

For MATLAB functions, this property applies only when the ActionLanguage of the chart that contains the function is 'C'.

For truth table functions, this property applies only when the Language property of the truth table is 'MATLAB' and the ActionLanguage of the chart that contains the truth table is 'C'.

C MF STT TTB TTF MFB

SaturateOnIntegerOverflowRW

Whether the data in the chart, state transition table, truth table, or MATLAB function saturates on integer overflow, specified as a numeric or logical 1 (true) or 0 (false). When this property is disabled, the data wraps on integer overflow. For more information, see Saturate on integer overflow (Simulink).

For MATLAB functions, this property applies only when the ActionLanguage of the chart that contains the function is 'C'.

For truth table functions, this property applies only when the Language property of the truth table is 'MATLAB' and the ActionLanguage of the chart that contains the truth table is 'C'.

C MF STT TTB TTF MFB

TreatAsFiRW

Inherited Simulink signals to treat as Fixed-Point Designer™ fi objects, specified as one of these values:

  • 'Fixed-point' — The chart, state transition table, truth table, or MATLAB Function block treats all fixed-point inputs as fi objects.

  • 'Fixed-point & Integer' — The chart, state transition table, truth table, or MATLAB Function block treats all fixed-point and integer inputs as fi objects.

For charts and state transition tables, this property applies only when the ActionLanguage property is 'MATLAB'.

C STT TTB MFB

Interface

PropertyAccessDescriptionObjects
InitializeMethodRW

Method for initializing the value of the data object or message data, specified as a character vector that depends on the scope of the data or message:

  • For local and output data and messages, use 'Expression' or 'Parameter'.

  • For constant data, use 'Expression'.

  • For input data and messages, parameters, and data store memory, use 'Not Needed'.

To specify the initial value, use the Props.InitialValue property.

D MS

InputsRO

Input arguments of the MATLAB Function block, specified as an array of Stateflow.Data objects.

MFB

NameRW

Name of the data object, event, or message, specified as a character vector.

D E MS

OutputsRO

Output arguments of the MATLAB Function block, specified as an array of Stateflow.Data objects.

MFB

PortRW

Port index for the data object, event, or message specified as an integer scalar. This property applies only to input and output data, events, and messages.

D E MS

PriorityRW

Priority for the message, specified as a character vector. If two distinct messages occur at the same time, this property determines which message is processed first. A smaller numeric value indicates a higher priority. This property applies only to local and output messages in discrete-event charts. For more information, see Create Custom Queuing Systems Using Discrete-Event Stateflow Charts (SimEvents).

MS

SaveToWorkspaceRW

Whether to save the value of the data object to a variable of the same name in the MATLAB base workspace at the end of the simulation, specified as a numeric or logical 1 (true) or 0 (false). This property applies only to data in charts that use C as the action language. For more information, see Save Final Value to Base Workspace.

D

ScopeRW

Scope of the data object, event, or message, specified as one of these values:

  • 'Local'

  • 'Input'

  • 'Output'

  • 'Constant'

  • 'Parameter'

  • 'Data Store Memory'

  • 'Temporary'

  • 'Imported'

  • 'Exported'

D E MS

TriggerRW

Type of trigger associated with the event, specified as a character vector that depends on the scope of the data:

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

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

This property does not apply to local events. For more information, see Trigger.

E

TunableRW

Whether the data object is a tunable parameter, specified as a numeric or logical 1 (true) or 0 (false). Only tunable parameters can be modified during simulation. This property applies only to parameter data.

D

UpdateMethodRW

Method for updating data object, specified as 'Discrete' or 'Continuous'. This property applies only when the ChartUpdate property of the chart that contains the data is 'CONTINUOUS'. For more information, see Continuous-Time Modeling in Stateflow.

D

Queue

PropertyAccessDescriptionObjects
MessagePriorityOrderRW

Type of priority queue for the message, specified as one of these values:

  • 'Ascending' — Messages are received in ascending order of the message data value.

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

This property applies only when the QueueType property of the message is 'Priority'. For more information, see Queue Type.

MS

QueueCapacityRW

Length of the internal queue for the message, specified as an integer scalar. This property applies only to local messages and to input messages that have UseInternalQueue set to true. For more information, see Queue Capacity.

MS

QueueOverflowDiagnosticRW

Level of diagnostic action when the number of incoming messages exceeds the queue capacity for the message, specified as 'Error', 'Warning', or 'None'. This property applies only to local messages and to input messages that have UseInternalQueue set to true. For more information, see Queue Overflow Diagnostic.

MS

QueueTypeRW

Order in which messages are removed from the receiving queue, specified as one of these values:

  • 'FIFO' — First in, first out.

  • '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 local messages and to input messages that have UseInternalQueue set to true. For more information, see Queue Type.

MS

UseInternalQueueRW

Whether the Stateflow chart maintains an internal receiving queue for the input message, specified as a numeric or logical 1 (true) or 0 (false). This property applies only to input messages. For more information, see Use Internal Queue.

MS

Signal Logging

PropertyAccessDescriptionObjects
LoggingInfo.DataLoggingRW

Whether to enable signal logging for the atomic subchart, state, Simulink based state, or data object, specified as a numeric or logical 1 (true) or 0 (false). For more information, see Log Simulation Output for States and Data.

AS D SBS S

LoggingInfo.DecimateDataRW

Whether to limit the amount of logged data, specified as a numeric or logical 1 (true) or 0 (false). When this property is true, signal logging skips samples by using the interval size specified by the LoggingInfo.Decimation property.

AS D SBS S

LoggingInfo.DecimationRW

Decimation interval, specified as an integer scalar. This property applies only when the LoggingInfo.DecimateData property is true. The default value of 2 means that the chart logs every other sample.

AS D SBS S

LoggingInfo.LimitDataPointsRW

Whether to limit the number of data points to log, specified as a numeric or logical 1 (true) or 0 (false). When this property is true, signal logging limits the number of data points by using the value specified by the LoggingInfo.MaxPoints property.

AS D SBS S

LoggingInfo.LoggingNameRW

Custom signal name for the atomic subchart, state, Simulink based state, or data object, specified as a character vector. This property applies only when the LoggingInfo.NameMode property is 'Custom'.

AS D SBS S

LoggingInfo.MaxPointsRW

Maximum number of data points to log, specified as an integer scalar. This property applies only when the LoggingInfo.LimitDataPoints property is true. The default value of 5000 means the chart logs the last 5000 data points generated by the simulation.

AS D SBS S

LoggingInfo.NameModeRW

Source of the signal name used to log the atomic subchart, state, Simulink based state, or data object, specified as one of these values:

  • 'SignalName' — Use the name of the atomic subchart, state, Simulink based state, or data object.

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

AS D SBS S

State Decomposition

PropertyAccessDescriptionObjects
DecompositionRW

Decomposition of substates at the top level of containment in the chart or state, specified as 'EXCLUSIVE_OR' or 'PARALLEL_AND'. For more information, see Specify Substate Decomposition.

C S

ExecutionOrderRW

Execution order for the atomic subchart, state, or Simulink based state in parallel (AND) decomposition, specified as an integer scalar. This property applies only when both of these conditions are satisfied:

  • The Type property is 'AND'.

  • The UserSpecifiedStateTransitionExecutionOrder property of the chart that contains the atomic subchart, state, or Simulink based state is true.

AS SBS S

TypeRO

Decomposition of sibling states, specified as 'OR' or 'AND'. The atomic subchart, state, or Simulink based state inherits this property from the Decomposition property of its parent state or chart.

AS SBS S

Super Step Semantics

PropertyAccessDescriptionObjects
EnableNonTerminalStatesRW

Whether to enable super step semantics for the chart or state transition table, specified as a numeric or logical 1 (true) or 0 (false). For more information, see Super Step Semantics.

C STT

NonTerminalMaxCountsRW

Maximum number of transitions the chart or state transition table can take in one super step, specified as an integer scalar. This property applies only when the EnableNonTerminalStates property is true.

C STT

NonTerminalUnstableBehaviorRW

Behavior if a super step for the chart or state transition table exceeds the maximum number of transitions specified in the NonTerminalMaxCounts property before reaching a stable state, specified as one of these values:

  • 'Proceed' — The chart or state transition table goes to sleep with the last active state configuration.

  • 'Throw Error' — The chart or state transition table generates an error.

This property applies only when the EnableNonTerminalStates property is true.

C STT

See Also

| |

Related Topics