Main Content

Messages

Establish message-based communication between Simulink® model components

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.

Blocks

expand all

SendCreate and send message
ReceiveReceive messages
Hit Crossing ProbeDetect crossing point
Queue, Entity QueueEnqueue messages and entities
Message MergeCombine message paths
Sequence ViewerDisplay messages, events, states, transitions, and functions between blocks during simulation

Tools

expand all

Sequence ViewerVisualize messages, events, states, transitions, and functions

Topics

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 a Message Receive Interface that Runs on Message Availability

This example shows how to synchronize execution with data availability in message-based systems.

Message-Based Computation

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.

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.

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®.