This workflow represents the most common CAN Transmit model. Adjust your model as needed. For more workflow examples, see Build CAN Communication Simulink Models and the “Simulink Tutorials” in the Vehicle Network Toolbox examples.
Set up filters to process only relevant messages. This ensures optimal simulation performance.
Do not set up filters if you need to parse all bus communications.
Set up your CAN Unpack block:
In a function-call triggered subsystem if you want to unpack every message received by your CAN Receive block.
Without a function-call triggered subsystem if you want to unpack only
the most recent message received by your CAN Receive block.
Set up this system if your receive block is filtering for a single message.
For any downstream processing using received messages, include blocks:
Within the function-call subsystem if your downstream process must respond to all messages received in a single timestep in this model.
Outside the function-call subsystem if your downstream process
responds only to the most recent message received in a given timestep in
In this case, the CAN Unpack block will not respond to any other messages received, irrespective of the messages ID.