A message is a Stateflow® object that communicates data locally or between charts in a Simulink® model. For more information, see Communicate with Stateflow Charts by Sending Messages.
You can specify message properties in either the Property Inspector or the Model Explorer.
Open the Symbols window by selecting View > Symbols.
Open the Property Inspector by selecting View > Property Inspector.
In the Symbols window, select the message.
In the Property Inspector window, edit the message properties.
Open the Model Explorer by selecting View > Model Explorer.
In the Contents pane, double-click the message.
In the Message pane, edit the message properties.
For more information, see Communicate with Stateflow Charts by Sending Messages.
Name of the message. For more information, see Rules for Naming Stateflow Objects.
Scope of the message. The scope specifies where the message occurs relative to the parent object.
|Message that is received from another Stateflow chart. Each input message has a receiving queue.|
|Message that is sent through an output port to another Stateflow chart.|
|Message that is local to the Stateflow chart. A local message has a receiving queue with the same properties as an input message queue. When you send a local message, a transition or action in the same chart can evaluate the local message. You cannot send a local message outside the chart.|
Index of the port associated with the message. This property applies only to input and output messages.
Size of the message data field. For more information, see Specify Size of Stateflow Data.
Specifies whether the message data field accepts complex values.
|Data field does not accept complex values.|
|Data field accepts complex values.|
|Data field inherits the complexity setting from a Simulink block.|
The default value is
Off. For more information,
see Complex Data in Stateflow Charts.
Type of the message data field. To specify the data type:
From the Type drop-down list, select a built-in type.
In the Type field, enter an expression that evaluates to a data type.
In the Model Explorer, use the Data Type Assistant to specify a data Mode, and then specify the data type based on that mode. To display the Data Type Assistant, click the Show data type assistant button . The Data Type Assistant is available only in the Model Explorer.
Messages do not support fixed-point data.
Enables watching the message queue and data field in the Stateflow Breakpoints and Watch window. For more information, see Watch Stateflow Data Values.
For input and local messages, specifies the maximum number of messages held in the queue. If a chart sends a message when the receiving queue is full, a message overflow occurs. To avoid dropped messages, set the queue capacity high enough so incoming messages do not cause the queue to overflow. The maximum queue length is 216–1.
Specifies the diagnostic action when the number of incoming messages exceeds the queue
capacity. The default option is
|When the queue overflows, simulation stops with an error.|
|When the queue overflows, it drops the last message and simulation continues with a warning.|
|When the queue overflows, it drops the last message and simulation continues without issuing a warning.|
Specifies the order in which messages are removed from the queue. The default option
|Queue Type Setting||Description|
|First In, First Out|
|Last In, First Out|
Remove messages according to value in the data field. Choose Priority order from these options: