Messages are used to model communication between Simulink components for the purpose of system integration. You can use messages to establish communication in a composition model whose components perform a defined set of functionalities with I/O boundaries.
Message-based communication between software components is necessary in control system architectures where centralized architectures are replaced by distributed architectures due to system complexity. A message is a useful modeling artifact that combines events with related data. Use message blocks to manage the production, consumption, and storage of messages.
To learn more about Simulink messages, see Simulink Messages Overview.
Send and Receive Messages
Execute Subsystem Based on Message Availability
Simulate and Visualize Messages
|Sequence Viewer||Display messages, events, states, transitions, and functions between blocks during simulation|
Review Simulation Results
Understanding Simulink Messages
- Simulink Messages Overview
Overview of the message-based communication for distributed architectures, code generation, and middleware modeling.
Model Message Send and Receive Interfaces
- Animate and Understand Sending and Receiving Messages
Send, receive, visualize, and animate messages and display message data.
- Establish Message Send and Receive Interfaces Between Software Components
Create message send and receive interfaces, and prepare components for C++ code generation.
- Specify Queue Properties for Message Interface
Specify queue properties for individual model components and compositions.
- Merge Message Lines Using a Message Merge Block
Route messages using a Message Merge block.
- Use Virtual Buses with Message Elements for Component Communication
Send and receive virtual buses with message elements carrying nonvirtual bus as data.
- Send and Receive Messages Carrying Bus Data
Send and receive messages with nonvirtual bus data.
Model Event-Driven Receive Interfaces
- Using Message Polling and Message Triggered Subsystems
Demonstrate and compare Message Triggered Subsystems and Message Polling Subsystems.
- Connect Message Receive Interface with Simulink Functions
This example shows how to synchronize execution with data availability in message-based systems.
- Temperature Control System Communicating with Messages
Distributed control of room temperatures by processing messages from room thermostats and communicating control commands using messages to different receivers.
- Asynchronous Message Handling in Adaptive Cruise Control
An event-based Adaptive Cruise Control (ACC) using messages and message-triggered subsystems.
- Process Message Payload Using MATLAB System Block
This example shows how to send, receive, and process messages using the MATLAB System block.
- Generate C++ Message Interfaces for Lane Following Controls and Sensor Fusion (Automated Driving Toolbox)
Generate code for message-based communication between components of a highway lane following system.
- Wireless Tire Pressure Monitoring System with Fault Logging
Model a wireless tire pressure monitoring system with fault logging using message communication.
Simulate Middleware Effects on a Distributed Architecture
- Use a Queue Block to Manage Messages
Use FIFO queue, LIFO queue, and priority queue to sort and store messages and define queue policies.
- Modeling Message Communication Patterns with SimEvents
Merge, broadcast, distribute, multicast, and delay messages using SimEvents®.