Documentation

Message Receive

Extract data from received messages

Library

Other

Description

The Message Receive block extracts data from received messages and writes them to the output signal port. If there are no new messages when the block executes, the block uses the Value source when queue is empty value:

  • Hold last value

    Hold data read from the last message.

  • Use initial value

    Writes default data.

Data Type Support

The Message Receive block accepts inputs of any type that Simulink® supports, including enumerated types. For more information, see Data Types Supported by Simulink (Simulink).

Parameters

Queue length

Specify message queue length.

Queue type

Specify message queue type. Selecting Queue type > Priority enables the Priority order parameter.

Choose from:

  • FIFO

  • LIFO

  • Priority

Priority order

Specify message queue priority.

Choose from:

  • Ascending

  • Descending

Show queue status

Select to show queue status.

Initial value

Enter an initial value.

Value source when queue is empty

Specify the value to receive when received message queue is empty.

Choose from:

  • Hold last value

    Holds data read from the last message.

  • Use initial value

    Writes default data.

Sample time (-1 for inherited)

Specify the time interval between samples.

To inherit the sample time, set this parameter to -1.

See Specify Sample Time (Simulink) for more information.

Introduced in R2016a

Was this topic helpful?