Main Content

Summary of Stateflow API Objects and Properties

Stateflow® API objects have properties that correspond to the values you set in the Stateflow Editor. For example, to use the editor to change the position of a state, you click and drag the state. With the Stateflow API, you change the position of a state by modifying the Position property of the corresponding Stateflow.State object:

st.Position = [10 20 100 80];
For more information, see Modify Properties and Call Functions of Stateflow Objects.

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

  • Property Name — The name of the property. To access or set a property value, use its name in dot notation along with a Stateflow object.

  • Access — An access type for the property.

    • RW (read/write): You can access or set the value of these properties by using the Stateflow API.

    • RO (read-only): These properties are set by the Stateflow software.

  • Description — A description of the property.

Stateflow.Annotation

Use Stateflow.Annotation objects to include descriptive comments in your chart. Annotations can contain any combination of:

  • Text

  • Images

  • Equations using TeX commands

  • Hyperlinks that open a website or perform MATLAB® functions

For more information, see Add Descriptive Comments in a Chart.

Property NameAccessDescription
AlignmentRW

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

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.

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.

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.

ChartRO

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

ClickFcnRW

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

DeleteFcnRW

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

DescriptionRW

Description for the annotation, specified as a string scalar or character vector.

DocumentRW

Document link for the annotation, specified as a string scalar or character vector.

DropShadowRW

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

FixedHeightRW

Whether to fix the 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.

FixedWidthRW

Whether to fix the width 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.

FontRW

Font for the annotation text, specified as a Stateflow.NoteFont object with these properties:

  • Name — Font name, specified as a character vector. This property is read-only. The StateFont.Name property of the chart that contains the annotation sets the value of this property.

  • Angle — Font angle, specified as "NORMAL" or "ITALIC".

  • Weight — Font weight, specified as "NORMAL" or "BOLD".

  • Size — Font size, specified as a scalar.

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.

IdRO

Unique identifier, specified as an integer scalar. Use this property to distinguish the annotation 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.

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

InterpretationRW

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

IsImageRO

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

LoadFcnRW

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

MachineRO

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

PathRO

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

PlainTextRO

Annotation text without formatting, specified as a character vector.

PositionRW

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

SubviewerRO

Subviewer for the annotation, 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 annotation.

TagRW

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

TextRW

Text for the annotation, specified as a string scalar or character vector.

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.

Stateflow.AtomicBox

Use Stateflow.AtomicBox objects to encapsulate graphical, truth table, MATLAB, and Simulink® functions in a separate namespace. Atomic boxes allow for:

  • Faster simulation after making small changes to a function in a chart with many states or levels of hierarchy

  • Reuse of the same functions across multiple charts and models

  • Ease of team development for people working on different parts of the same chart

  • Manual inspection of generated code for a specific function in a chart

For more information, see Reuse Functions by Using Atomic Boxes.

Property NameAccessDescription
BadIntersectionRO

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

ChartRO

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

CommentTextRW

Comment text for the atomic box, specified as a string scalar or 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 atomic box, the text appears as a tooltip. When you set the IsExplicitlyCommented property to false, the value of CommentText reverts to "".

ContentPreviewEnabledRW

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

DescriptionRW

Description for the atomic box, specified as a string scalar or character vector.

DocumentRW

Document link for the atomic box, specified as a string scalar or character vector.

FontSizeRW

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

IdRO

Unique identifier, specified as an integer scalar. Unlike SSIdNumber, the value of this property is reassigned every time you start a new MATLAB session and may be recycled after an object is deleted.

IsExplicitlyCommentedRW

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

IsImplicitlyCommentedRO

Whether the atomic box is implicitly commented out, specified as a numeric or logical 1 (true) or 0 (false). The atomic box is implicitly commented out when you comment out a state, box, or function that contains it.

IsLinkRO

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

LabelStringRW

Label for the atomic box, specified as a string scalar or character vector.

MachineRO

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

NameRW

Name of the atomic box, specified as a string scalar or character vector.

PathRO

Location of the parent of the atomic box in the model hierarchy, specified as a character vector.

PositionRW

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

SSIdNumberRO

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

SubchartRO

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

SubviewerRO

Subviewer for the atomic box, 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 atomic box.

TagRW

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

Stateflow.AtomicSubchart

Use Stateflow.AtomicSubchart objects to create independent subcomponents in a Stateflow chart. Atomic subcharts allow for:

  • Reuse of the same state or subchart across multiple charts and models

  • Faster simulation after making small changes to a chart with many states or levels of hierarchy

  • Ease of team development when multiple people are working on different parts of the same chart

  • Manual inspection of generated code for a specific state or subchart in a chart

For more information, see Create Reusable Subcomponents by Using Atomic Subcharts.

Property NameAccessDescription
ArrowSizeRW

Size of incoming transition arrows, specified as a scalar.

BadIntersectionRO

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

ChartRO

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

CommentTextRW

Comment text for the atomic subchart, specified as a string scalar or 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 atomic subchart, the text appears as a tooltip. When you set the IsExplicitlyCommented property to false, the value of CommentText reverts to "".

ContentPreviewEnabledRW

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

DebugRW

Debugger properties for the state, atomic subchart, or Simulink based state, specified as a Stateflow.StateDebug object with these properties:

  • OnEntry — Whether to set the On State Entry breakpoint, specified as a numeric or logical 1 (true) or 0 (false).

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

  • OnExit — Whether to set the On State Exit breakpoint, specified as a numeric or logical 1 (true) or 0 (false).

For more information, see Set Breakpoints to Debug Charts.

DescriptionRW

Description for the atomic subchart, specified as a string scalar or character vector.

DocumentRW

Document link for the atomic subchart, specified as a string scalar or character vector.

ExecutionOrderRW

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

  • The Type property of the atomic subchart is "AND".

  • The UserSpecifiedStateTransitionExecutionOrder property of the chart that contains the atomic subchart is true.

FontSizeRW

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

HasOutputDataRW

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

IdRO

Unique identifier, specified as an integer scalar. Unlike SSIdNumber, the value of this property is reassigned every time you start a new MATLAB session and may be recycled after an object is deleted.

IsExplicitlyCommentedRW

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

IsImplicitlyCommentedRO

Whether the atomic subchart is implicitly commented out, specified as a numeric or logical 1 (true) or 0 (false). The atomic subchart is implicitly commented out when you comment out a state or box that contains it.

IsLinkRO

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

LabelStringRW

Label for the atomic subchart, specified as a string scalar or character vector.

LoggingInfoRW

Signal logging properties for the atomic subchart, specified as a Stateflow.SigLoggingInfo object with these properties:

  • DataLogging — Whether to enable signal logging, specified as a numeric or logical 1 (true) or 0 (false).

  • DecimateData — Whether to limit the amount of logged data, specified as a numeric or logical 1 (true) or 0 (false).

  • Decimation — Decimation interval, specified as an integer scalar. This property applies only when the DecimateData property is true.

  • LimitDataPoints — Whether to limit the number of data points to log, specified as a numeric or logical 1 (true) or 0 (false).

  • MaxPoints — Maximum number of data points to log, specified as an integer scalar. This property applies only when the LimitDataPoints property is true.

  • NameMode — Source of the signal name, specified as "SignalName" or "Custom".

  • LoggingName — Custom signal name, specified as a string scalar or character vector. This property applies only when the NameMode property is "Custom".

Signal logging saves the self activity of the atomic subchart to the MATLAB workspace during simulation. For more information, see Log Simulation Output for States and Data.

MachineRO

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

NameRW

Name of the atomic subchart, specified as a string scalar or character vector.

OutputDataRO

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

OutputMonitoringModeRW

Monitoring mode for the active state output data, specified as a string scalar or character vector. For atomic subcharts, the only option is "SelfActivity".

OutputPortNameRW

Name of the active state data object for the atomic subchart, specified as a string scalar or character vector. This property applies only when the HasOutputData property for the atomic subchart is true.

PathRO

Location of the parent of the atomic subchart in the model hierarchy, specified as a character vector.

PositionRW

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

SSIdNumberRO

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

SubchartRO

Contents of the atomic subchart, specified as a Stateflow.Chart object. Use this object to add children, such as states and transitions, to the atomic subchart. For more information, see Add Exit Port and Junction to Atomic Subchart.

SubviewerRO

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

TagRW

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

TestPointRW

Whether to set the atomic subchart as a test point, specified as a numeric or logical 1 (true) or 0 (false). You can monitor testpoints with a floating scope during simulation. You can also log test point values to the MATLAB workspace. For more information, see Monitor Test Points in Stateflow Charts.

TypeRO

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

Stateflow.Box

Use Stateflow.Box objects to organize objects such as functions and states in your chart. You can also use a box to encapsulate states and functions in a separate namespace. For more information, see Group Chart Objects by Using Boxes.

Property NameAccessDescription
BadIntersectionRO

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

ChartRO

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

CommentTextRW

Comment text for the box, specified as a string scalar or 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 box, the text appears as a tooltip. When you set the IsExplicitlyCommented property to false, the value of CommentText reverts to "".

ContentPreviewEnabledRW

Whether to display a preview of the box contents, specified as a numeric or logical 1 (true) or 0 (false). This property applies only when the IsSubchart property is true.

DescriptionRW

Description for the box, specified as a string scalar or character vector.

DocumentRW

Document link for the box, specified as a string scalar or character vector.

ExecutionOrderRW

Execution order for the substates of the box in parallel (AND) decomposition, specified as an integer scalar. This property applies only when both of these conditions are satisfied:

  • The Decomposition property of the parent state or chart is "PARALLEL_AND".

  • The UserSpecifiedStateTransitionExecutionOrder property of the chart that contains the box is true.

FontSizeRW

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

IdRO

Unique identifier, specified as an integer scalar. Use this property to distinguish the box 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.

IsExplicitlyCommentedRW

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

IsGroupedRW

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

IsImplicitlyCommentedRO

Whether the box is implicitly commented out, specified as a numeric or logical 1 (true) or 0 (false). The box is implicitly commented out when you comment out a state, box, or function that contains it.

IsSubchartRW

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

LabelStringRW

Label for the box, specified as a string scalar or character vector.

MachineRO

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

NameRW

Name of the box, specified as a string scalar or character vector.

PathRO

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

PositionRW

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

SubviewerRO

Subviewer for the box, 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 box.

TagRW

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

Stateflow.Chart

Use a Stateflow.Chart object to create a graphical representation of a finite state machine based on a state transition diagram. In a Chart block, states and transitions form the basic building blocks of a sequential logic system. States correspond to operating modes and transitions represent pathways between states. For more information, see Model Finite State Machines by Using Stateflow Charts and Create Charts by Using the Stateflow API.

Property NameAccessDescription
ActionLanguageRW

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

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.

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.

ChartUpdateRW

Activation method for the chart, specified as "CONTINUOUS", "DISCRETE", or "INHERITED". For more information, see Update Method.

DebugRW

Debugger properties for the chart, specified as a Stateflow.ChartDebug object with this property:

  • Breakpoints.OnEntry — Whether to set the On Chart Entry breakpoint, specified as a numeric or logical 1 (true) or 0 (false).

For more information, see Set Breakpoints to Debug Charts.

DecompositionRW

Decomposition of substates at the top level of containment in the chart, specified as "EXCLUSIVE_OR" or "PARALLEL_AND". For more information, see Define Exclusive and Parallel Modes by Using State Decomposition.

DescriptionRW

Description for the chart, specified as a string scalar or character vector.

DirtyRW

Whether the chart has changed after being opened or saved, specified as a numeric or logical 1 (true) or 0 (false).

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). For more information, see Define State Activity Enumeration Type.

DocumentRW

Document link for the chart, specified as a string scalar or character vector.

EditorRO

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

EmlDefaultFimathRW

Default fimath properties for the chart, 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.

This property applies only when the ActionLanguage property of the chart is "MATLAB".

EnableBitOpsRW

Whether to use bit operations in state and transition actions in the chart, 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 Enable C-bit operations.

EnableNonTerminalStatesRW

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

EnableZeroCrossingsRW

Whether to enable zero-crossing detection on state transitions in the chart, 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.

EnumTypeNameRW

Name of the enumerated data type for the active state data object for the chart, specified as a string scalar or character vector. For more information, see Enum Name.

ExecuteAtInitializationRW

Whether to initialize the state configuration of the chart 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.

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.

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 Create Variant Configurations in Stateflow Charts.

HasOutputDataRW

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

IcedRO

Whether the chart 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 during simulation.

IdRO

Unique identifier, specified as an integer scalar. Use this property to distinguish the chart 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.

InitializeOutputRW

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

InputFimathRW

Default fimath object, specified as a string scalar or character vector. When the EmlDefaultFimath property for the chart 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.

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

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.

LockedRW

Whether the chart is locked, specified as a numeric or logical 1 (true) or 0 (false). Enable this property to prevent changes in the chart.

MachineRO

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

NameRW

Name of the chart, specified as a string scalar or character vector.

NonTerminalMaxCountsRW

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

NonTerminalUnstableBehaviorRW

Behavior if a super step for the chart 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 goes to sleep with the last active state configuration.

  • "Throw Error" — The chart generates an error.

This property applies only when the EnableNonTerminalStates property for the chart is true.

OutputDataRO

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

OutputMonitoringModeRW

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

OutputPortNameRW

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

PathRO

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

SampleTimeRW

Sample time for activating the chart, specified as a string scalar or character vector. This property applies only when the ChartUpdate property for the chart is "DISCRETE".

SaturateOnIntegerOverflowRW

Whether the data in the chart saturates on integer overflow, specified as a numeric or logical 1 (true) or 0 (false). When this property is disabled, the data in the chart wraps on integer overflow. For more information, see Handle Integer Overflow for Chart Data.

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.

StateFontRW

Font for the box, function, and state labels in the chart, specified as a Stateflow.StateFont object with these properties:

  • Name — Font name, specified as a string scalar or character vector. This property also determines the font for annotations in the chart.

  • Angle — Font angle, specified as "NORMAL" or "ITALIC".

  • Weight — Font weight, specified as "NORMAL" or "BOLD".

  • Size — Default font size for new boxes, functions, and states, specified as a scalar. This property also determines the default font size for new annotations in the chart.

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.

StateMachineTypeRW

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

StatesWhenEnablingRW

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

  • "" — The chart does not contain function-call input events.

  • "held" — The chart maintains the most recent values of the states.

  • "reset" — The chart reverts to the initial conditions of the states.

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

SupportVariableSizingRW

Whether the chart supports variable-size data, specified as a numeric or logical 1 (true) or 0 (false). For more information, see Declare Variable-Size Data in Stateflow Charts.

TagRW

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

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.

TransitionFontRW

Font for the transition labels in the chart, specified as a Stateflow.TransFont object with these properties:

  • Name — Font name, specified as a string scalar or character vector.

  • Angle — Font angle, specified as "NORMAL" or "ITALIC".

  • Weight — Font weight, specified as "NORMAL" or "BOLD".

  • Size — Default font size for new transitions, specified as a scalar.

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.

TreatAsFiRW

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

  • "Fixed-point" — The chart treats all fixed-point inputs as fi objects.

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

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

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.

VisibleRW

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

Stateflow.Clipboard

Use the Stateflow.Clipboard object to copy and paste graphical and nongraphical objects within the same chart, between charts in the same Simulink model, or between charts in different models.

Stateflow.Clipboard objects do not have any properties.

Stateflow.Data

Use Stateflow.Data objects to store values that are visible at a specific level of the Stateflow hierarchy. For more information, see Add Stateflow Data and Set Data Properties.

Property NameAccessDescription
CompiledSizeRO

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

CompiledTypeRO

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

DataTypeRW

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

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

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

    • "double"

    • "single"

    • "int8"

    • "int16"

    • "int32"

    • "int64"

    • "uint8"

    • "uint16"

    • "uint32"

    • "uint64"

    • "boolean"

    • "string"

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

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

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

DebugRW

Debugger properties for the data object, specified as a Stateflow.DataDebug object with this property:

DescriptionRW

Description for the data object, specified as a string scalar or character vector.

DocumentRW

Document link for the data object, specified as a string scalar or character vector.

IdRO

Unique identifier, specified as an integer scalar. Unlike SSIdNumber, the value of this property is reassigned every time you start a new MATLAB session and may be recycled after an object is deleted.

InitializeMethodRW

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

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

  • For constant data, use "Expression".

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

To specify the initial value of the data object, use the Props.InitialValue property.

This property is equivalent to the Initial Value drop-down list in the Model Explorer and the Data properties dialog box. For more information, see Initial value.

LoggingInfoRW

Signal logging properties for the data object, specified as a Stateflow.SigLoggingInfo object with these properties:

  • DataLogging — Whether to enable signal logging, specified as a numeric or logical 1 (true) or 0 (false).

  • DecimateData — Whether to limit the amount of logged data, specified as a numeric or logical 1 (true) or 0 (false).

  • Decimation — Decimation interval, specified as an integer scalar. This property applies only when the DecimateData property is true.

  • LimitDataPoints — Whether to limit the number of data points to log, specified as a numeric or logical 1 (true) or 0 (false).

  • MaxPoints — Maximum number of data points to log, specified as an integer scalar. This property applies only when the LimitDataPoints property is true.

  • NameMode — Source of the signal name, specified as "SignalName" or "Custom".

  • LoggingName — Custom signal name, specified as a string scalar or character vector. This property applies only when the NameMode property is "Custom".

Signal logging saves the values of the data object to the MATLAB workspace during simulation. For more information, see Log Simulation Output for States and Data.

MachineRO

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

NameRW

Name of the data object, specified as a string scalar or character vector.

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.

PathRO

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

PortRW

Port index for the data object, specified as an integer scalar. This property applies only to input and output data. For more information, see Port.

PropsRW

Data specification properties, specified as a Stateflow.DataProps object with these properties:

  • Type.Method — Method for setting the type of the data object, specified as a string scalar or 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".

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

  • Type.BusObject — Name of the Simulink.Bus object that defines the data object, specified as a string scalar or character vector. This property applies only when the Type.Method property of the data object is "Bus Object". For more information, see Access Bus Signals Through Stateflow Structures.

  • Type.EnumType — Name of the enumerated type that defines the data object, specified as a string scalar or character vector. This property applies only when the Type.Method property of the data object is "Enumerated". For more information, see Reference Values by Name by Using Enumerated Data.

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

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

  • Type.WordLength — Word length, in bits, specified as a string scalar or character vector. This property applies only when the Type.Method property of the data object is "Fixed point". For more information, see Fixed-Point Data in Stateflow Charts.

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

  • Type.Fixpt.FractionLength — Fraction length, in bits, specified as a string scalar or character vector. This property applies only when the Type.Method property is "Fixed point" and the Type.Fixpt.ScalingMode property is "Binary point".

  • Type.Fixpt.Slope — Slope, specified as a string scalar or character vector. This property applies only when the Type.Method property is "Fixed point" and the Type.Fixpt.ScalingMode property is "Slope and bias".

  • Type.Fixpt.Bias — Bias, specified as a string scalar or character vector. This property applies only when the Type.Method property is "Fixed point" and the Type.Fixpt.ScalingMode property is "Slope and bias".

  • Type.Fixpt.Lock — 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). This property applies only when the Type.Method property of the data object is "Fixed point".

  • Array.Size — Size of the data object, specified as a string scalar or character vector. For more information, see Specify Size of Stateflow Data.

  • Array.IsDynamic — Whether the data object has variable size, specified as a numeric or logical 1 (true) or 0 (false). This property is equivalent to the Variable Size check box in the Property Inspector, the Model Explorer, or the Data properties dialog box. For more information, see Declare Variable-Size Data in Stateflow Charts.

  • Array.FirstIndex — Index for the first element of the array data object, specified as a string scalar or 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.

  • Complexity — Whether the data object accepts complex values, specified as "On" or "Off". For more information, see Complex Data in Stateflow Charts.

  • InitialValue — Initial value, specified as a string scalar or character vector. For more information, see Initial value.

  • Range.Minimum — Minimum value, specified as a string scalar or character vector. For more information, see Limit range.

  • Range.Maximum — Maximum value, specified as a string scalar or character vector. For more information, see Limit range.

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

  • Unit.Name — Unit of measurement, specified as a string scalar or character vector. This property applies only to input and output data. For more information, see Specify Units for Stateflow Data.

SSIdNumberRO

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

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.

ScopeRW

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

  • "Local"

  • "Input"

  • "Output"

  • "Constant"

  • "Parameter"

  • "Data Store Memory"

  • "Temporary"

  • "Imported"

  • "Exported"

For more information, see Scope.

TagRW

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

TestPointRW

Whether to set the data object as a test point, specified as a numeric or logical 1 (true) or 0 (false). You can monitor testpoints with a floating scope during simulation. You can also log test point values to the MATLAB workspace. For more information, see Monitor Test Points in Stateflow Charts.

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.

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.

Stateflow.EMChart

Use Stateflow.EMChart objects to configure MATLAB Function (Simulink) blocks through the Stateflow programmatic interface.

MATLAB Function blocks define custom functionality in Simulink models. Use these blocks when:

  • You have an existing MATLAB function that models custom functionality, or it is easy for you to create such a function.

  • Your model requires custom functionality that is not or cannot be captured in the Simulink graphical language.

  • You find it easier to model custom functionality by using a MATLAB function than by using a Simulink block diagram.

  • The custom functionality that you want to model does not include continuous or discrete dynamic states. To model dynamic states, use S-functions. See Create and Configure MATLAB S-Functions (Simulink).

For more information, see Implement MATLAB Functions in Simulink with MATLAB Function Blocks (Simulink).

Tip

You can also configure the properties of a MATLAB Function block programmatically by using a MATLABFunctionConfiguration (Simulink) object. This object provides a direct interface to the properties of a MATLAB Function block. For more information, see Configure MATLAB Function Blocks Programmatically (Simulink).

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

ChartUpdateRW

Activation method for the MATLAB Function block, specified as "CONTINUOUS", "DISCRETE", or "INHERITED". For more information, see Update method (Simulink).

DescriptionRW

Description for the MATLAB Function block, specified as a string scalar or character vector.

DirtyRW

Whether the MATLAB Function block has changed after being opened or saved, specified as a numeric or logical 1 (true) or 0 (false).

DocumentRW

Document link for the MATLAB Function block, specified as a string scalar or character vector.

EmlDefaultFimathRW

Default fimath properties for the MATLAB Function block, 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.

IcedRO

Whether the MATLAB Function block 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 MATLAB Function block during simulation.

IdRO

Unique identifier, specified as an integer scalar. Use this property to distinguish the MATLAB Function block 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.

InputFimathRW

Default fimath object, specified as a string scalar or character vector. When the EmlDefaultFimath property for the MATLAB Function block 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.

InputsRO

Input arguments of the MATLAB Function block, specified as an array of Stateflow.Data objects. The value of this property depends on the inputs defined in the Script property for the block.

LockedRW

Whether the MATLAB Function block is locked, specified as a numeric or logical 1 (true) or 0 (false). Enable this property to prevent changes in the MATLAB Function block.

MachineRO

Machine that contains the MATLAB Function block, specified as a Stateflow.Machine object.

NameRW

Name of the MATLAB Function block, specified as a string scalar or character vector.

OutputsRO

Output arguments of the MATLAB Function block, specified as an array of Stateflow.Data objects. The value of this property depends on the outputs defined in the Script property for the block.

PathRO

Location of the MATLAB Function block in the model hierarchy, specified as a character vector.

SampleTimeRW

Sample time for activating the MATLAB Function block, specified as a string scalar or character vector. This property applies only when the ChartUpdate property for the MATLAB function is "DISCRETE".

SaturateOnIntegerOverflowRW

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

ScriptRW

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

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

    str = sprintf("function y=f(x)\ny=x+1;\nend");
    block.Script = str;
  • Enter a concatenated text expression that uses the function newline to create newline characters:

    str = "function y=f(x)" + newline + ...
        "y=x+1;" + newline + ...
        "end";
    block.Script = str;

SupportVariableSizingRW

Whether the MATLAB Function block supports variable-size data, specified as a numeric or logical 1 (true) or 0 (false). For more information, see Declare Variable-Size MATLAB Function Block Variables (Simulink).

TagRW

User-defined tag for the MATLAB Function block, specified as data of any type.

TreatAsFiRW

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

  • "Fixed-point" — The MATLAB Function block treats all fixed-point inputs as fi objects.

  • "Fixed-point & Integer" — The MATLAB Function block treats all fixed-point and integer inputs as fi objects.

VectorOutputs1DRW

Whether the MATLAB Function block outputs column vectors as one-dimensional data, specified as a numeric or logical 0 (false) or 1 (true). For more information, see Interpret output column vectors as one-dimensional data (Simulink).

Stateflow.EMFunction

Use Stateflow.EMFunction objects to create MATLAB functions for coding algorithms that are more easily expressed by using MATLAB code instead of the graphical Stateflow constructs. Typical applications include:

  • Matrix-oriented calculations

  • Data analysis and visualization

You can call a MATLAB function in the actions of states and transitions. For more information, see Reuse MATLAB Code by Defining MATLAB Functions.

Property NameAccessDescription
BadIntersectionRO

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

ChartRO

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

CommentTextRW

Comment text for the MATLAB function, specified as a string scalar or 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 MATLAB function, the text appears as a tooltip. When you set the IsExplicitlyCommented property to false, the value of CommentText reverts to "".

DescriptionRW

Description for the MATLAB function, specified as a string scalar or character vector.

DocumentRW

Document link for the MATLAB function, specified as a string scalar or character vector.

EmlDefaultFimathRW

Default fimath properties for the 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.

This property applies only when the ActionLanguage of the chart that contains the function is "C". Otherwise, the behavior of data depends on the value of the EmlDefaultFimath property for the chart.

FontSizeRW

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

IdRO

Unique identifier, specified as an integer scalar. Unlike SSIdNumber, the value of this property is reassigned every time you start a new MATLAB session and may be recycled after an object is deleted.

InlineOptionRW

Appearance of the MATLAB function in generated code, specified as one of these values:

  • "Auto" — An internal calculation determines the appearance of the function in generated code.

  • "Function" — The function is implemented as a separate C function.

  • "Inline" — Calls to the function are replaced by code as long as the function is not part of a recursion.

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

InputFimathRW

Default fimath object, specified as a string scalar or character vector. When the EmlDefaultFimath property for the 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.

This property applies only when the ActionLanguage of the chart that contains the function is "C". Otherwise, the behavior of data depends on the value of the InputFimath property for the chart.

IsExplicitlyCommentedRW

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

IsImplicitlyCommentedRO

Whether the MATLAB function is implicitly commented out, specified as a numeric or logical 1 (true) or 0 (false). The MATLAB function is implicitly commented out when you comment out a state, box, or function that contains it.

LabelStringRW

Label for the MATLAB function, specified as a string scalar or character vector.

MachineRO

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

NameRW

Name of the MATLAB function, specified as a string scalar or character vector.

PathRO

Location of the parent of the MATLAB function in the model hierarchy, specified as a character vector.

PositionRW

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

SSIdNumberRO

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

SaturateOnIntegerOverflowRW

Whether the data in the MATLAB function saturates on integer overflow, specified as a numeric or logical 1 (true) or 0 (false). When this property is disabled, the data in the function wraps on integer overflow. For more information, see Handle Integer Overflow for Chart Data.

This property applies only when the ActionLanguage of the chart that contains the function is "C". Otherwise, the behavior of data depends on the value of the SaturateOnIntegerOverflow property for the chart.

ScriptRW

Code for the MATLAB function, specified as a string scalar or 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");
    function.Script = str;
  • Enter a concatenated text expression that uses the function newline to create newline characters:

    str = "function y=f(x)" + newline + ...
        "y=x+1;" + newline + ...
        "end";
    function.Script = str;

SubviewerRO

Subviewer for the MATLAB function, 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 MATLAB function.

TagRW

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

Stateflow.Editor

Use the Stateflow.Editor object to access the graphical aspects of a Stateflow chart or state transition table. You can use the Stateflow.Editor object to control the position, size, and magnification level of the Stateflow Editor window.

Property NameAccessDescription
WindowPositionRW

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

ZoomFactorRW

Magnification level of the chart or state transition table in the editor, specified as a scalar value between 0.5 and 10. A value of 1 corresponds to a magnification of 100%.

Stateflow.Event

Use Stateflow.Event objects to trigger actions in one of these objects:

  • A parallel state in a Stateflow chart

  • Another Stateflow chart

  • A Simulink triggered or function-call subsystem

For more information, see Synchronize Model Components by Broadcasting Events.

Property NameAccessDescription
DebugRW

Debugger properties for the event, specified as a Stateflow.EventDebug object with these properties:

  • Breakpoints.StartBroadcast — Whether to set the Start of Broadcast breakpoint, specified as a numeric or logical 1 (true) or 0 (false).

  • Breakpoints.EndBroadcast — Whether to set the End of Broadcast breakpoint, specified as a numeric or logical 1 (true) or 0 (false).

For more information, see Set Breakpoints to Debug Charts.

DescriptionRW

Description for the event, specified as a string scalar or character vector.

DocumentRW

Document link for the event, specified as a string scalar or character vector.

IdRO

Unique identifier, specified as an integer scalar. Use this property to distinguish the event 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.

MachineRO

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

NameRW

Name of the event, specified as a string scalar or character vector.

PathRO

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

PortRW

Port index for the event, specified as an integer scalar. This property applies only to input and output events. For more information, see Port.

ScopeRW

Scope of the event, specified as "Local", "Input", or "Output". For more information, see Scope.

TagRW

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

TriggerRW

Type of trigger associated with the event, specified as a string scalar or 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.

Stateflow.Function

Use Stateflow.Function objects to create graphical functions that contain control-flow logic and iterative loops. You create graphical functions with flow charts that use connective junctions and transitions. You can call a graphical function in the actions of states and transitions. For more information, see Reuse Logic Patterns by Defining Graphical Functions.

Property NameAccessDescription
BadIntersectionRO

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

ChartRO

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

CommentTextRW

Comment text for the graphical function, specified as a string scalar or 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 function, the text appears as a tooltip. When you set the IsExplicitlyCommented property to false, the value of CommentText reverts to "".

ContentPreviewEnabledRW

Whether to display a preview of the graphical function contents, specified as a numeric or logical 1 (true) or 0 (false). This property applies only when the IsSubchart property is true.

DebugRW

Debugger properties for the graphical function, specified as a Stateflow.FunctionDebug object with this property:

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

For more information, see Set Breakpoints to Debug Charts.

DescriptionRW

Description for the graphical function, specified as a string scalar or character vector.

DocumentRW

Document link for the graphical function, specified as a string scalar or character vector.

FontSizeRW

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

IdRO

Unique identifier, specified as an integer scalar. Unlike SSIdNumber, the value of this property is reassigned every time you start a new MATLAB session and may be recycled after an object is deleted.

InlineOptionRW

Appearance of the graphical function in generated code, specified as one of these values:

  • "Auto" — An internal calculation determines the appearance of the function in generated code.

  • "Function" — The function is implemented as a separate C function.

  • "Inline" — Calls to the function are replaced by code as long as the function is not part of a recursion.

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

IsExplicitlyCommentedRW

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

IsGroupedRW

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

IsImplicitlyCommentedRO

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

IsSubchartRW

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

LabelStringRW

Label for the graphical function, specified as a string scalar or character vector.

MachineRO

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

NameRW

Name of the graphical function, specified as a string scalar or character vector.

PathRO

Location of the parent of the graphical function in the model hierarchy, specified as a character vector.

PositionRW

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

SSIdNumberRO

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

SubviewerRO

Subviewer for the graphical function, 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 graphical function.

TagRW

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

Stateflow.Junction

Use Stateflow.Junction objects to create junctions that:

  • Represent decision points in a transition path

  • Record the activity of substates inside a superstate

For more information, see Combine Transitions and Junctions to Create Branching Paths and Resume Prior Substate Activity by Using History Junctions.

Property NameAccessDescription
ArrowSizeRW

Size of incoming transition arrows, specified as a scalar.

ChartRO

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

CommentTextRW

Comment text added to the junction, specified as a string scalar or 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 junction, the text appears as a tooltip. When you set the IsExplicitlyCommented property to false, the value of CommentText reverts to "".

DescriptionRW

Description for the junction, specified as a string scalar or character vector.

DocumentRW

Document link for the junction, specified as a string scalar or character vector.

IdRO

Unique identifier, specified as an integer scalar. Unlike SSIdNumber, the value of this property is reassigned every time you start a new MATLAB session and may be recycled after an object is deleted.

IsExplicitlyCommentedRW

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

IsImplicitlyCommentedRO

Whether the junction is implicitly commented out, specified as a numeric or logical 1 (true) or 0 (false). The junction is implicitly commented out when you comment out a state, box, or function that contains it.

MachineRO

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

PathRO

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

PositionRW

Position and size of the junction, specified as a Stateflow.JunctionPosition object with these properties:

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

  • Radius — Radius of the junction, specified as a scalar.

SSIdNumberRO

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

SubviewerRO

Subviewer for the junction, 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 junction.

TagRW

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

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

Stateflow.Machine

From a Stateflow perspective, Stateflow.Machine objects are equivalent to Simulink models. A Stateflow.Machine object contains Stateflow.Chart, Stateflow.StateTransitionTableChart, Stateflow.TruthTableChart, and Stateflow.EMChart objects that represent the Stateflow charts, State Transition Table blocks, Truth Table blocks, and MATLAB Function blocks in a Simulink model. For more information, see Overview of the Stateflow API.

Property NameAccessDescription
CreatedRO

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

CreatorRW

Creator of the machine, specified as a string scalar or character vector.

DebugRW

Debugger properties for charts in the machine, specified as a Stateflow.MachineDebug object with these properties:

  • Animation.Enabled — 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.

  • Animation.Delay — 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

  • Animation.MaintainHighlighting — 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).

DescriptionRW

Description for the machine, specified as a string scalar or character vector.

DirtyRW

Whether the Simulink model for the machine has changed after being opened or saved, specified as a numeric or logical 1 (true) or 0 (false).

DocumentRW

Document link for the machine, specified as a string scalar or character vector.

FullFileNameRO

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

IcedRO

Whether the 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 machine during simulation.

IdRO

Unique identifier, specified as an integer scalar. Use this property to distinguish the machine 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.

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

LockedRW

Whether the machine is locked, specified as a numeric or logical 1 (true) or 0 (false). Enable this property to prevent changes in the Stateflow charts, state transition tables, and truth table blocks in this machine.

ModifiedRW

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

NameRO

Name of the Simulink model for the machine, specified as a character vector.

PathRO

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

TagRW

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

VersionRW

Version of the machine, specified as a string scalar or character vector.

Stateflow.Message

Use Stateflow.Message objects to communicate data locally or between Stateflow charts in Simulink models. For more information, see Communicate with Stateflow Charts by Sending Messages.

Property NameAccessDescription
CompiledSizeRO

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

CompiledTypeRO

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

DataTypeRW

Data type of the message, specified as a string scalar or character vector that depends on the Props.Type.Method property of the message:

  • If the Props.Type.Method property of the message is "Inherit", the value of this property is "Inherit: Same as Simulink".

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

    • "double"

    • "single"

    • "int8"

    • "int16"

    • "int32"

    • "int64"

    • "uint8"

    • "uint16"

    • "uint32"

    • "uint64"

    • "boolean"

    • "string"

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

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

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

DescriptionRW

Description for the message, specified as a string scalar or character vector.

DocumentRW

Document link for the message, specified as a string scalar or character vector.

IdRO

Unique identifier, specified as an integer scalar. Unlike SSIdNumber, the value of this property is reassigned every time you start a new MATLAB session and may be recycled after an object is deleted.

InitializeMethodRW

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

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

  • For input messages, use "Not Needed".

To specify the initial value of the message data, use the Props.InitialValue property.

For more information, see Initial Value.

MachineRO

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

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.

NameRW

Name of the message, specified as a string scalar or character vector.

PathRO

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

PortRW

Port index for the message, specified as an integer scalar. This property applies only to input and output messages. For more information, see Port.

PriorityRW

Priority for the message, specified as a string scalar or 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).

PropsRW

Data specification properties, specified as a Stateflow.DataProps object with these properties:

  • Type.Method — Method for setting the data type of the message, specified as "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 and the Data properties dialog box. For more information, see Specify Type of Stateflow Data.

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

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

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

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

  • Type.WordLength — Word length, in bits, specified as a string scalar or character vector. This property applies only when the Type.Method property of the data object is "Fixed point". For more information, see Fixed-Point Data in Stateflow Charts.

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

  • Type.Fixpt.FractionLength — Fraction length, in bits, specified as a string scalar or character vector. This property applies only when the Type.Method property is "Fixed point" and the Type.Fixpt.ScalingMode property is "Binary point".

  • Type.Fixpt.Slope — Slope, specified as a string scalar or character vector. This property applies only when the Type.Method property is "Fixed point" and the Type.Fixpt.ScalingMode property is "Slope and bias".

  • Type.Fixpt.Bias — Bias, specified as a string scalar or character vector. This property applies only to when the Type.Method property is "Fixed point" and the Type.Fixpt.ScalingMode property is "Slope and bias".

  • Type.Fixpt.Lock — 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). This property applies only when the Type.Method property of the data object is "Fixed point".

  • Array.Size — Size of the message data, specified as a string scalar or character vector. For more information, see Specify Size of Stateflow Data.

  • Complexity — Whether the message accepts complex values, specified as "On" or "Off". For more information, see Complex Data in Stateflow Charts.

  • InitialValue — Initial value, specified as a string scalar or character vector.

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.

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.

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.

SSIdNumberRO

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

ScopeRW

Scope of the message, specified as "Local", "Input", or "Output". For more information, see Scope.

TagRW

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

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.

Stateflow.Port

Use Stateflow.Port objects to create ports and junctions that provide entry and exit connections across boundaries in the Stateflow hierarchy. Entry and exit ports improve componentization by isolating the transition logic for entering and exiting states. Unlike supertransitions, they can be used in atomic subcharts. For more information, see Create Entry and Exit Connections Across State Boundaries.

Entry and exit ports are located on the boundary of a state or atomic subchart. Each port has a matching junction that marks the entry or exit point inside the state or atomic subchart. The port and junction are represented by separate Stateflow.Port objects.

Property NameAccessDescription
ArrowSizeRW

Size of incoming transition arrows, specified as a scalar.

ChartRO

Chart that contains the port or junction, specified as a Stateflow.Chart object.

CommentTextRW

Comment text added to the entry or exit junction, specified as a string scalar or character vector. This property applies only to entry and exit junctions when the IsExplicitlyCommented property is true. In the Stateflow Editor, when you point to the comment badge on the junction, the text appears as a tooltip. When you set the IsExplicitlyCommented property to false, the value of CommentText reverts to "".

DescriptionRW

Description for the port or junction, specified as a string scalar or character vector.

DocumentRW

Document link for the port or junction, specified as a string scalar or character vector.

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.

IdRO

Unique identifier, specified as an integer scalar. Unlike SSIdNumber, the value of this property is reassigned every time you start a new MATLAB session and may be recycled after an object is deleted.

IsExplicitlyCommentedRW

Whether to comment out the junction and port pair, specified as a numeric or logical 1 (true) or 0 (false). Setting this property to true is equivalent to right-clicking the entry or exit junction and selecting Comment Out. This property applies only to entry and exit junctions. Attempting to set this property on an entry or exit port results in an error. For more information, see Comment Out Objects in a Stateflow Chart.

IsImplicitlyCommentedRO

Whether the port or junction is implicitly commented out, specified as a numeric or logical 1 (true) or 0 (false). The port or junction is implicitly commented out when you comment out a state, box, or function that contains it. Additionally, entry and exit ports are implicitly commented out when you comment out their matching entry or exit junction.

LabelPositionRW

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

LabelStringRW

Label for the port or junction, specified as a string scalar or character vector. Changing this property automatically sets the LabelString property for the matching Stateflow.Port object to the same value.

LinkedRO

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

MachineRO

Machine that contains the port or junction, specified as a Stateflow.Machine object.

PathRO

Location of the parent of the port or junction in the model hierarchy, specified as a character vector.

PortTypeRO

Type of port or junction, specified as one of these values:

  • 'EntryJunction' — Entry junction inside a state or atomic subchart

  • 'EntryPort' — Entry port on the boundary of a state or atomic subchart

  • 'ExitJunction' — Exit junction inside a state or atomic subchart

  • 'ExitPort' — Exit port on the boundary of a state or atomic subchart

PositionRW

Position and size of the port or junction, specified as a Stateflow.PortPosition object with these properties:

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

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

SSIdNumberRO

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

SubviewerRO

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

TagRW

User-defined tag for the port or junction, specified as data of any type.

Use Stateflow.SLFunction objects to create Simulink functions that enable you to call Simulink subsystems in the actions of states and transitions. Typical applications include:

  • Defining a function that requires Simulink blocks

  • Scheduling execution of multiple controllers

For more information, see Reuse Simulink Functions in Stateflow Charts.

Property NameAccessDescription
BadIntersectionRO

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

ChartRO

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

CommentTextRW

Comment text added to the Simulink function, specified as a string scalar or 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 Simulink function, the text appears as a tooltip. When you set the IsExplicitlyCommented property to false, the value of CommentText reverts to "".

ContentPreviewEnabledRW

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

DescriptionRW

Description for the Simulink function, specified as a string scalar or character vector.

DocumentRW

Document link for the Simulink function, specified as a string scalar or character vector.

FontSizeRW

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

IdRO

Unique identifier, specified as an integer scalar. Unlike SSIdNumber, the value of this property is reassigned every time you start a new MATLAB session and may be recycled after an object is deleted.

IsExplicitlyCommentedRW

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

IsImplicitlyCommentedRO

Whether the Simulink function is implicitly commented out, specified as a numeric or logical 1 (true) or 0 (false). The Simulink function is implicitly commented out when you comment out a state, box, or function that contains it.

LabelStringRW

Label for the Simulink function, specified as a string scalar or character vector.

MachineRO

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

NameRW

Name of the Simulink function, specified as a string scalar or character vector.

PathRO

Location of the parent of the Simulink function in the model hierarchy, specified as a character vector.

PositionRW

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

SSIdNumberRO

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

SubviewerRO

Subviewer for the Simulink function, 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 Simulink function.

TagRW

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

Use Stateflow.SimulinkBasedState objects to create Simulink subsystems within a Stateflow state. With Simulink based states, you can model hybrid dynamic systems or systems that switch between periodic and continuous time dynamics. For more information, see Simulink Subsystems as States.

Property NameAccessDescription
ArrowSizeRW

Size of incoming transition arrows, specified as a scalar.

BadIntersectionRO

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

ChartRO

Chart that contains the Simulink based state, specified as a Stateflow.Chart object.

CommentTextRW

Comment text added to the Simulink based state, specified as a string scalar or 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 Simulink based state, the text appears as a tooltip. When you set the IsExplicitlyCommented property to false, the value of CommentText reverts to "".

ContentPreviewEnabledRW

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

DebugRW

Debugger properties for the Simulink based state, specified as a Stateflow.StateDebug object with these properties:

  • OnEntry — Whether to set the On State Entry breakpoint, specified as a numeric or logical 1 (true) or 0 (false).

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

  • OnExit — Whether to set the On State Exit breakpoint, specified as a numeric or logical 1 (true) or 0 (false).

For more information, see Set Breakpoints to Debug Charts.

DescriptionRW

Description for the Simulink based state, specified as a string scalar or character vector.

DocumentRW

Document link for the Simulink based state, specified as a string scalar or character vector.

ExecutionOrderRW

Execution order for the 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 of the Simulink based state is "AND".

  • The UserSpecifiedStateTransitionExecutionOrder property of the chart that contains the Simulink based state is true.

FontSizeRW

Font size for the Simulink based state label, specified as a scalar. The StateFont.Size property of the chart that contains the Simulink based state sets the initial value of this property.

HasOutputDataRW

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

IdRO

Unique identifier, specified as an integer scalar. Unlike SSIdNumber, the value of this property is reassigned every time you start a new MATLAB session and may be recycled after an object is deleted.

IsExplicitlyCommentedRW

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

IsImplicitlyCommentedRO

Whether the Simulink based state is implicitly commented out, specified as a numeric or logical 1 (true) or 0 (false). The Simulink based state is implicitly commented out when you comment out a state or box that contains it.

LoggingInfoRW

Signal logging properties for the Simulink based state, specified as a Stateflow.SigLoggingInfo object with these properties:

  • DataLogging — Whether to enable signal logging, specified as a numeric or logical 1 (true) or 0 (false).

  • DecimateData — Whether to limit the amount of logged data, specified as a numeric or logical 1 (true) or 0 (false).

  • Decimation — Decimation interval, specified as an integer scalar. This property applies only when the DecimateData property is true.

  • LimitDataPoints — Whether to limit the number of data points to log, specified as a numeric or logical 1 (true) or 0 (false).

  • MaxPoints — Maximum number of data points to log, specified as an integer scalar. This property applies only when the LimitDataPoints property is true.

  • NameMode — Source of the signal name, specified as "SignalName" or "Custom".

  • LoggingName — Custom signal name, specified as a string scalar or character vector. This property applies only when the NameMode property is "Custom".

Signal logging saves the self activity of the Simulink based state to the MATLAB workspace during simulation. For more information, see Log Simulation Output for States and Data.

MachineRO

Machine that contains the Simulink based state, specified as a Stateflow.Machine object.

NameRW

Name of the Simulink based state, specified as a string scalar or character vector.

OutputDataRO

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

OutputMonitoringModeRW

Monitoring mode for the active state output data, specified as a string scalar or character vector. For Simulink based states, the only option is "SelfActivity".

OutputPortNameRW

Name of the active state data object for the Simulink based state, specified as a string scalar or character vector. This property applies only when the HasOutputData property for the Simulink based state is true.

PathRO

Location of the parent of the Simulink based state in the model hierarchy, specified as a character vector.

PositionRW

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

SSIdNumberRO

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

SubviewerRO

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

TagRW

User-defined tag for the Simulink based state, specified as data of any type.

TestPointRW

Whether to set the Simulink based state as a test point, specified as a numeric or logical 1 (true) or 0 (false). You can monitor testpoints with a floating scope during simulation. You can also log test point values to the MATLAB workspace. For more information, see Monitor Test Points in Stateflow Charts.

TypeRO

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

Stateflow.State

Use Stateflow.State objects to describe an operating mode of a reactive system. For more information, see Represent Operating Modes by Using States.

Property NameAccessDescription
ArrowSizeRW

Size of incoming transition arrows, specified as a scalar.

BadIntersectionRO

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

ChartRO

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

CommentTextRW

Comment text added to the state, specified as a string scalar or 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 state, the text appears as a tooltip. When you set the IsExplicitlyCommented property to false, the value of CommentText reverts to "".

ContentPreviewEnabledRW

Whether to display a preview of the state contents, specified as a numeric or logical 1 (true) or 0 (false). This property applies only when the IsSubchart property is true.

DebugRW

Debugger properties for the state, specified as a Stateflow.StateDebug object with these properties:

  • OnEntry — Whether to set the On State Entry breakpoint, specified as a numeric or logical 1 (true) or 0 (false).

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

  • OnExit — Whether to set the On State Exit breakpoint, specified as a numeric or logical 1 (true) or 0 (false).

For more information, see Set Breakpoints to Debug Charts.

DecompositionRW

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

DescriptionRW

Description for the state, specified as a string scalar or character vector.

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 for the state is "ChildActivity" or "LeafStateActivity". For more information, see Define State Activity Enumeration Type.

DocumentRW

Document link for the state, specified as a string scalar or character vector.

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.

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.

EnumTypeNameRW

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

ExecutionOrderRW

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

  • The Type property of the state is "AND".

  • The UserSpecifiedStateTransitionExecutionOrder property of the chart that contains the state is true.

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.

FontSizeRW

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

HasOutputDataRW

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

IdRO

Unique identifier, specified as an integer scalar. Unlike SSIdNumber, the value of this property is reassigned every time you start a new MATLAB session and may be recycled after an object is deleted.

InlineOptionRW

Appearance of the state functions in generated code, specified as one of these values:

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

  • "Function" — State functions are implemented as separate static functions.

  • "Inline" — Calls to state functions are replaced by code as long as the function is not part of a recursion.

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

IsExplicitlyCommentedRW

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

IsGroupedRW

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

IsImplicitlyCommentedRO

Whether the state is implicitly commented out, specified as a numeric or logical 1 (true) or 0 (false). The state is implicitly commented out when you comment out a state or box that contains it.

IsSubchartRW

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

LabelStringRW

Label for the state, specified as a string scalar or character vector. For more information, see Specify Labels in States and Transitions Programmatically.

LoggingInfoRW

Signal logging properties for the state, specified as a Stateflow.SigLoggingInfo object with these properties:

  • DataLogging — Whether to enable signal logging, specified as a numeric or logical 1 (true) or 0 (false).

  • DecimateData — Whether to limit the amount of logged data, specified as a numeric or logical 1 (true) or 0 (false).

  • Decimation — Decimation interval, specified as an integer scalar. This property applies only when the DecimateData property is true.

  • LimitDataPoints — Whether to limit the number of data points to log, specified as a numeric or logical 1 (true) or 0 (false).

  • MaxPoints — Maximum number of data points to log, specified as an integer scalar. This property applies only when the LimitDataPoints property is true.

  • NameMode — Source of the signal name, specified as "SignalName" or "Custom".

  • LoggingName — Custom signal name, specified as a string scalar or character vector. This property applies only when the NameMode property is "Custom".

Signal logging saves the self activity of the state to the MATLAB workspace during simulation. For more information, see Log Simulation Output for States and Data.

MachineRO

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

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 Guidelines for Moore Charts.

NameRW

Name of the state, specified as a string scalar or character vector.

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.

OutputDataRO

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

OutputMonitoringModeRW

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

OutputPortNameRW

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

PathRO

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

PositionRW

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

SSIdNumberRO

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

SubviewerRO

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

TagRW

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

TestPointRW

Whether to set the state as a test point, specified as a numeric or logical 1 (true) or 0 (false). You can monitor testpoints with a floating scope during simulation. You can also log test point values to the MATLAB workspace. For more information, see Monitor Test Points in Stateflow Charts.

TypeRO

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

Stateflow.StateTransitionTableChart

Use a Stateflow.StateTransitionTableChart object to represent a finite state machine for sequential modal logic in tabular format. Instead of drawing states and transitions in a Stateflow chart, you can use a State Transition Table block to model a state machine in a concise, compact format that requires minimal maintenance of graphical objects. For more information, see State Transition Tables in Stateflow.

Property NameAccessDescription
ActionLanguageRW

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

ChartColorRW

Background color for the chart that is automatically generated for the state transition table, 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.

ChartUpdateRW

Activation method for the state transition table, specified as "CONTINUOUS", "DISCRETE", or "INHERITED". For more information, see Update Method.

DebugRW

Debugger properties for the state transition table, specified as a Stateflow.ChartDebug object with this property:

  • Breakpoints.OnEntry — Whether to set the On Chart Entry breakpoint, specified as a numeric or logical 1 (true) or 0 (false).

For more information, see Set Breakpoints to Debug Charts.

DescriptionRW

Description for the state transition table, specified as a string scalar or character vector.

DirtyRW

Whether the state transition table has changed after being opened or saved, specified as a numeric or logical 1 (true) or 0 (false).

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). For more information, see Define State Activity Enumeration Type.

DocumentRW

Document link for the state transition table, specified as a string scalar or character vector.

EditorRO

Editor for the 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.

EmlDefaultFimathRW

Default fimath properties for the state transition table, 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.

This property applies only when the ActionLanguage property of the state transition table is "MATLAB".

EnableBitOpsRW

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

EnableNonTerminalStatesRW

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

EnableZeroCrossingsRW

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

EnumTypeNameRW

Name of the enumerated data type for the active state data object for the state transition table, specified as a string scalar or character vector. For more information, see Enum Name.

ExecuteAtInitializationRW

Whether to initialize the state configuration of the 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.

HasOutputDataRW

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

IcedRO

Whether the state transition table 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 state transition table during simulation.

IdRO

Unique identifier, specified as an integer scalar. Use this property to distinguish the state transition table 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.

InitializeOutputRW

Whether to initialize the output data every time the 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.

InputFimathRW

Default fimath object, specified as a string scalar or character vector. When the EmlDefaultFimath property for the state transition table 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.

This property applies only when the ActionLanguage property of the state transition table is "MATLAB".

JunctionColorRW

Color for junctions in the chart that is automatically generated for the state transition table, 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.

LockedRW

Whether the state transition table is locked, specified as a numeric or logical 1 (true) or 0 (false). Enable this property to prevent changes in the state transition table.

MachineRO

Machine that contains the state transition table, specified as a Stateflow.Machine object.

NameRW

Name of the state transition table, specified as a string scalar or character vector.

NonTerminalMaxCountsRW

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

NonTerminalUnstableBehaviorRW

Behavior if a super step for the 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 state transition table goes to sleep with the last active state configuration.

  • "Throw Error" — The state transition table generates an error.

This property applies only when the EnableNonTerminalStates property for the state transition table is true.

OutputDataRO

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

OutputMonitoringModeRW

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

OutputPortNameRW

Name of the active state data object for the state transition table, specified as a string scalar or character vector. This property applies only when the HasOutputData property for the state transition table is true.

PathRO

Location of the state transition table in the model hierarchy, specified as a character vector.

SampleTimeRW

Sample time for activating the state transition table, specified as a string scalar or character vector. This property applies only when the ChartUpdate property for the state transition table is "DISCRETE".

SaturateOnIntegerOverflowRW

Whether the data in the state transition table saturates on integer overflow, specified as a numeric or logical 1 (true) or 0 (false). When this property is disabled, the data in the state transition table wraps on integer overflow. For more information, see Handle Integer Overflow for Chart Data.

StateColorRW

Color for the states in the chart that is automatically generated for the state transition table, 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.

StateFontRW

Font for the state labels in the chart that is automatically generated for the state transition table, specified as a Stateflow.STTStateFont object with these properties:

  • Name — Font name, specified as a string scalar or character vector.

  • Angle — Font angle, specified as "NORMAL" or "ITALIC".

  • Weight — Font weight, specified as "NORMAL" or "BOLD".

  • Size — Default font size for new states, specified as a scalar.

StateLabelColorRW

Color for the state labels in the chart that is automatically generated for the state transition table, 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.

StateMachineTypeRW

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

StatesWhenEnablingRW

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

  • "" — The state transition table does not contain function-call input events.

  • "held" — The state transition table maintains the most recent values of the states.

  • "reset" — The 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.

SupportVariableSizingRW

Whether the state transition table supports variable-size data, specified as a numeric or logical 1 (true) or 0 (false). For more information, see Declare Variable-Size Data in Stateflow Charts.

TagRW

User-defined tag for the state transition table, specified as data of any type.

TransitionColorRW

Color for transitions in the chart that is automatically generated for the state transition table, 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.

TransitionFontRW

Font for the transition labels in the chart that is automatically generated for the state transition table, specified as a Stateflow.STTTransFont object with these properties:

  • Name — Font name, specified as a string scalar or character vector.

  • Angle — Font angle, specified as "NORMAL" or "ITALIC".

  • Weight — Font weight, specified as "NORMAL" or "BOLD".

  • Size — Default font size for new transitions, specified as a scalar.

TransitionLabelColorRW

Color for the transition labels in the chart that is automatically generated for the state transition table, 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.

TreatAsFiRW

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

  • "Fixed-point" — The state transition table treats all fixed-point inputs as fi objects.

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

This property applies only when the ActionLanguage property of the state transition table is "MATLAB".

VisibleRW

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

Stateflow.Transition

Use Stateflow.Transition objects to create transitions from one operating mode to another. For more information, see Transition Between Operating Modes.

Property NameAccessDescription
ArrowSizeRW

Size of the transition arrow at the destination, specified as a scalar. When you change the destination of the transition, this property resets to the value of the ArrowSize property of the new destination.

ChartRO

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

CommentTextRW

Comment text added to the transition, specified as a string scalar or 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 transition, the text appears as a tooltip. When you set the IsExplicitlyCommented property to false, the value of CommentText reverts to "".

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.

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.

DebugRW

Debugger properties for the transition, specified as a Stateflow.TransDebug object with these properties:

  • Breakpoints.WhenTested — Whether to set the When Transition is Tested breakpoint, specified as a numeric or logical 1 (true) or 0 (false).

  • Breakpoints.WhenValid — Whether to set the When Transition is Valid breakpoint, specified as a numeric or logical 1 (true) or 0 (false).

For more information, see Set Breakpoints to Debug Charts.

DescriptionRW

Description for the transition, specified as a string scalar or character vector.

DestinationRW

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

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.

DestinationOClockRW

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

DocumentRW

Document link for the transition, specified as a string scalar or character vector.

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.

FontSizeRW

Font size for the transition label, specified as a scalar. The TransitionFont.Size property of the chart that contains the transition sets the initial value of this property.

IdRO

Unique identifier, specified as an integer scalar. Unlike SSIdNumber, the value of this property is reassigned every time you start a new MATLAB session and may be recycled after an object is deleted.

IsExplicitlyCommentedRW

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

IsImplicitlyCommentedRO

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

IsVariantRW

Whether the transition is a variant transition, specified as a numeric or logical 1 (true) or 0 (false). For more information, see Create Variant Configurations in Stateflow Charts.

LabelPositionRW

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

LabelStringRW

Label for the transition, specified as a string scalar or character vector. For more information, see Specify Labels in States and Transitions Programmatically.

MachineRO

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

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.

PathRO

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

SSIdNumberRO

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

SourceRW

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

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.

SourceOClockRW

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

SubviewerRO

Subviewer for the transition, 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 transition.

TagRW

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

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.

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.

Stateflow.TruthTable

Use Stateflow.TruthTable objects to create truth table functions that implement combinatorial logic design in a tabular format. You can use truth table functions to model decision making for fault detection and management and mode switching. For more information, see Use Truth Tables to Model Combinatorial Logic.

Property NameAccessDescription
ActionTableRW

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

BadIntersectionRO

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

ChartRO

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

CommentTextRW

Comment text added to the truth table, specified as a string scalar or 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 truth table, the text appears as a tooltip. When you set the IsExplicitlyCommented property to false, the value of CommentText reverts to "".

ConditionTableRW

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

DebugRW

Debugger properties for the truth table, specified as a Stateflow.FunctionDebug object with this property:

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

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.

DescriptionRW

Description for the truth table, specified as a string scalar or character vector.

DocumentRW

Document link for the truth table, specified as a string scalar or character vector.

EmlDefaultFimathRW

Default fimath properties for the truth table, 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.

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

FontSizeRW

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

IdRO

Unique identifier, specified as an integer scalar. Unlike SSIdNumber, the value of this property is reassigned every time you start a new MATLAB session and may be recycled after an object is deleted.

InlineOptionRW

Appearance of the truth table in generated code, specified as one of these values:

  • "Auto" — An internal calculation determines the appearance of the truth table in generated code.

  • "Function" — The truth table is implemented as a separate C function.

  • "Inline" — Calls to the truth table are replaced by code as long as the truth table is not part of a recursion.

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

InputFimathRW

Default fimath object, specified as a string scalar or character vector. When the EmlDefaultFimath property for the truth table 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.

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

IsExplicitlyCommentedRW

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

IsImplicitlyCommentedRO

Whether the truth table is implicitly commented out, specified as a numeric or logical 1 (true) or 0 (false). The truth table is implicitly commented out when you comment out a state, box, or function that contains it.

LabelStringRW

Label for the truth table, specified as a string scalar or character vector.

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.

MachineRO

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

NameRW

Name of the truth table, specified as a string scalar or character vector.

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.

PathRO

Location of the parent of the truth table in the model hierarchy, specified as a character vector.

PositionRW

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

SSIdNumberRO

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

SaturateOnIntegerOverflowRW

Whether the data in the truth table saturates on integer overflow, specified as a numeric or logical 1 (true) or 0 (false). When this property is disabled, the data in the truth table wraps on integer overflow. 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". For more information, see Handle Integer Overflow for Chart Data.

SubviewerRO

Subviewer for the truth table, 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 truth table.

TagRW

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

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.

Stateflow.TruthTableChart

Use Stateflow.TruthTableChart objects to implement combinatorial logic design in a tabular format. You can use Truth Table blocks to model decision making for fault detection and management and mode switching. For more information, see Use Truth Tables to Model Combinatorial Logic.

Property NameAccessDescription
ActionTableRW

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

ChartUpdateRW

Activation method for the truth table, specified as "CONTINUOUS", "DISCRETE", or "INHERITED". For more information, see Update Method.

ConditionTableRW

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

DescriptionRW

Description for the truth table, specified as a string scalar or character vector.

DirtyRW

Whether the truth table has changed after being opened or saved, specified as a numeric or logical 1 (true) or 0 (false).

DocumentRW

Document link for the truth table, specified as a string scalar or character vector.

EmlDefaultFimathRW

Default fimath properties for the truth table, 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.

IcedRO

Whether the truth table 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 truth table during simulation.

IdRO

Unique identifier, specified as an integer scalar. Use this property to distinguish the truth table 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.

InputFimathRW

Default fimath object, specified as a string scalar or character vector. When the EmlDefaultFimath property for the truth table 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.

LockedRW

Whether the truth table is locked, specified as a numeric or logical 1 (true) or 0 (false). Enable this property to prevent changes in the truth table.

MachineRO

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

NameRW

Name of the truth table, specified as a string scalar or character vector.

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.

PathRO

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

SampleTimeRW

Sample time for activating the truth table, specified as a string scalar or character vector. This property applies only when the ChartUpdate property for the truth table is "DISCRETE".

SaturateOnIntegerOverflowRW

Whether the data in the truth table saturates on integer overflow, specified as a numeric or logical 1 (true) or 0 (false). When this property is disabled, the data in the truth table wraps on integer overflow. For more information, see Handle Integer Overflow for Chart Data.

SupportVariableSizingRW

Whether the truth table supports variable-size data, specified as a numeric or logical 1 (true) or 0 (false). For more information, see Declare Variable-Size Data in Stateflow Charts.

TagRW

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

TreatAsFiRW

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

  • "Fixed-point" — The truth table treats all fixed-point inputs as fi objects.

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

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.

See Also

| |

Related Topics