CAN Receive
R2026bLibraries:
Embedded Coder Support Package for Real-Time Linux /
SocketCAN
Description
Add-On Required: This feature requires the Embedded Coder Support Package For Real-Time Linux add-on.
The CAN Receive block receives messages from the CAN network. This block uses SocketCAN which is a device-independent driver for implementing the CAN interface supporting all CAN shields.
The CAN Receive block supports Raw data and
CAN Msg as output types. To use the bus mode, create a
CAN_MESSAGE_BUS type in the base workspace. See canMessageBusType (Vehicle Network Toolbox) function. To use a CANdb (CAN database) file or to
specify signals manually, use CAN Msg output type and the
CAN Unpack (Simulink Real-Time) block.
You can use CAN Receive block to interact with a real or virtual CAN interface. For more information on how to set up a virtual CAN interface, see Transmit and Receive CAN Raw Data and Messages on Virtual Linux Target Device.
Note
To generate code C/C++ code for this block, you must have an Embedded Coder® license.
Examples
Ports
Output
Parameters
Extended Capabilities
Version History
Introduced in R2026b
See Also
CAN Transmit | CAN Pack (Simulink Real-Time) | CAN Unpack (Simulink Real-Time)



