Messages

Send messages to pass data between charts

Send, receive, and forward messages that carry data to communicate between Stateflow® charts. Messages are queued until the receiving chart can process them. View the lifeline of messages in the Sequence Viewer block.

Blocks

QueueEnqueue messages and entities
Sequence ViewerDisplay messages, events, states, transitions, and functions between blocks during simulation

Stateflow Syntax

expand all

discardDiscard message
forwardForward message
isvalidDetermine if message is valid
lengthDetermine length of message queue
receiveExtract message from queue
sendBroadcast message or event

Topics

Communicate with Stateflow Charts by Sending Messages

Synchronize model components and share data by sending messages between Stateflow charts.

Set Properties for a Message

Specify message properties by using the Property Inspector or the Model Explorer.

Control Message Activity in Stateflow Charts

Send, receive, discard, or forward a Stateflow message.

Send Messages with String Data

Communicate between charts by using messages with string payloads.

Resolve Undefined Symbols in Your Chart

Detect and add undefined data, events, and messages.

Use the Sequence Viewer Block to Visualize Messages, Events, and Entities

View the interchange of messages, events, and functions through the Sequence Viewer block.

Related Information

Featured Examples