This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

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

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
overflowedDetermine when message queue overflows
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