Specify Chart Properties

About Chart Properties

Chart properties allow you to specify how your chart interfaces with the Simulink® model. You can specify properties for a single chart or all charts in a model.

Set Properties for a Single Chart

To specify properties for a single chart:

  1. Double-click a chart to open it.

  2. Right-click an open area of the chart and select Properties.

    All charts provide general and documentation properties. Charts that use MATLAB as the action language provide an additional tab for specifying fixed-point properties.

    C charts provide an additional option for enabling C-bit operations.

  3. Specify properties for the chart.




    Stateflow® chart name (read-only). Click this hypertext link to bring the chart to the foreground.


    Simulink subsystem name (read-only). Click this hypertext link to bring the Machine properties dialog box to the foreground.

    Action Language

    Action language for programming the chart. Choices are C or MATLAB. For more information, see Modify the Action Language for a Chart.

    State Machine Type

    Type of state machine to create. Choices are:

    • Classic: Default state machine. Provides full set of semantics for MATLAB charts and C charts.

    • Mealy: State machine in which output is a function of inputs and state.

    • Moore: State machine in which output is a function only of state.

    Mealy and Moore charts use a subset of Stateflow chart semantics.

    Update method

    Method by which a simulation updates (wakes up) a chart in a Simulink model (see Set the Stateflow Block Update Method). You can select Inherited, Discrete, or Continuous. For more information about continuous updating, see Model Hybrid Systems with Model Logic.

    Sample Time

    If Update method is Discrete, enter a sample time.

    Enable zero-crossing detection

    If Update method is Continuous, zero-crossing detection is enabled by default. See When to Enable Zero-Crossing Detection.

    Enable C-bit operations

    For C charts only. Select this check box to interpret the following operators ( ~, &, |, and ^) as C bitwise operators, not logical operators, in action statements (default).

    If you clear this check box, the following occurs:

    • & , | and ~ are interpreted as logical operators.

    • ^ is interpreted as the power operator (for example, 2^3 = 8).

    Other bit operations such as >> and << will be interpreted as bit operations regardless of this setting.

    User specified state/transition execution order

    Select this check box to use explicit ordering of parallel states and transitions (default). In this mode, you have complete control of the order in which parallel states are executed and transitions originating from a source are tested for execution. For more information, see Execution Order for Parallel States and Transition Testing Order in Multilevel State Hierarchy.

    Export Chart Level Functions

    Select this check box to export functions defined at the root level of the chart. See Export Stateflow Functions for Reuse for more information.

    Use Strong Data Typing with Simulink I/O

    If selected, the chart accepts input signals of any data type supported by Simulink software, provided that the type of the input signal matches the type of the corresponding chart input data item. If the types do not match, an error occurs.

    If cleared, the chart accepts and outputs only signals of type double. In this case, Stateflow software converts Simulink input signals to the data types of the corresponding chart input data items. Similarly, Stateflow software converts chart output data to type double.

    For fixed-point data, the Use Strong Data Typing with Simulink I/O option is always on. If an input or output of fixed-point type in a chart does not match its counterpart in a model, an error occurs.

    See Share Output Data with Simulink.

    Execute (enter) Chart At Initialization

    Select this check box if you want a chart's state configuration to be initialized at time 0 instead of at the first occurrence of an input event (see Execution of a Chart at Initialization).

    Initialize Outputs Every Time Chart Wakes Up

    Interprets the initial value of outputs every time a chart wakes up, not only at time 0. When you set an initial value for an output data object, the output will be reset to that value.

    Outputs are reset whenever a chart is triggered, whether by function call, edge trigger, or clock tick.

    Enable this option to:

    • Ensure all outputs are defined in every chart execution

    • Prevent latching of outputs (carrying over values of outputs computed in previous executions)

    • Give all chart outputs a meaningful initial value

    Enable Super Step Semantics

    Select to enable charts to take multiple transitions in each time step until it reaches a stable state. For more information, see Execution of a Chart with Super Step Semantics.

    Maximum Iterations in Each Super Step

    If you enable super step semantics, specify the maximum number of transitions the chart should take in each time step. The chart always takes one transition during a super step, so the value N that you specify represents the maximum number of additional transitions (for a total of N+1). For more information, see What Is Maximum Number of Iterations? Try to choose a number that allows the chart to reach a stable state within the time step, based on the mode logic of your chart.

    Behavior after too many iterations

    If you enable super step semantics, specify how the chart behaves after reaching the maximum number of transitions before taking all valid transitions. Options include:

    • Proceed — Chart execution continues to the next time step

    • Throw Error — Simulation stops and an error message appears

      Note:   The Throw Error option is valid only for simulation. In generated code, chart execution always proceeds.

    Support variable-size arrays

    Select to support chart input and output data that vary in dimension during simulation. For more information, see Declare Variable-Size Inputs and Outputs.

    Saturate on integer overflow

    Select to specify that integer overflows saturate in the generated code. For more information, see Handle Integer Overflow for Chart Data.

    Create data for monitoring:

    Select to create data to monitor state activity. Choose:

    • Child activity

    • Leaf state activity

    See About Active State Data.

    States When Enabling

    If your chart uses function-call input events, specify how states behave when the event reenables the chart. Options include:

    • Held — Maintain most recent values of the states.

    • Reset — Revert to the initial conditions of the states.

    • Inherit — Inherit this setting from the parent subsystem.

    For more information, see Control States When Function-Call Inputs Reenable Charts.

    Lock Editor

    Select to mark the chart as read-only and prevent any write operations.

    Treat these inherited Simulink signal types as fi objects

    For MATLAB charts only. Determines whether to treat inherited fixed-point and integer signals as Fixed-Point Designer™ fi objects.

    • If set to Fixed-point (default), the MATLAB chart treats all fixed-point inputs as fi objects.

    • If set to Fixed-point & Integer, the MATLAB chart treats all fixed-point and integer inputs as fi objects.

    MATLAB Chart fimath

    For MATLAB charts only. Default fimath properties for the MATLAB chart. . Otherwise, specify the default fimath properties by constructing the fimath object in the MATLAB or model workspace and setting the property equal to the variable name.

    • If set to Same as MATLAB Default, the chart uses the same fimath properties as the current default fimath

    • If set to Specify Other, you can specify your own default fimath object. Either construct the fimath object inside the edit box, or create it in the MATLAB or model workspace, and enter its variable name in the edit box.


    Textual description/comment.

    Document link

    Enter a Web URL address or a general MATLAB® command. Examples are, mailto:email_address, and edit/spec/data/speed.txt.

  4. Click one of these buttons:

    • Apply to save the changes

    • Cancel to cancel any changes since the last apply

    • OK to save the changes and close the dialog box

    • Help to display the online help in an HTML browser window

Set Properties for All Charts in the Model

You can set some properties for all charts in the model by setting properties for the Stateflow machine, which represents all of the Stateflow blocks in a model.

To set properties for the Stateflow machine:

  1. In the Chart properties dialog box for a particular chart, select the Machine link at the top of the dialog box.

    The Machine properties dialog box appears.

  2. Enter information in the fields that appear.



    Simulink Model

    Name of the Simulink model that defines this Stateflow machine (read-only). You change the model name in the Simulink window when you save the model under a chosen file name.

    Creation Date

    Date on which this machine was created, which is read-only.


    Name of the person who created this Stateflow machine.


    Time of the most recent modification of this Stateflow machine.


    Version number of this Stateflow machine.

    Use C-like bit operations in new charts

    For C charts only. Select this check box for all new C charts to interpret the following operators ( ~, &, |, and ^) as C bitwise operators, not logical operators, in action statements.

    You can enable or disable this option for individual C charts in the individual chart's property dialog box. See Set Properties for a Single Chart for a detailed explanation of this property.


    Brief description of this Stateflow machine, which is stored with the model that defines it.

    Document link

    MATLAB expression that, when evaluated, displays documentation for this Stateflow machine.

  3. Click one of these buttons:

    • Apply saves the changes.

    • Cancel closes the dialog box without making any changes.

    • OK saves the changes and closes the dialog box.

    • Help displays the online help in an HTML browser window.

Was this topic helpful?