Contenido principal

Controller Area Network

Communicate with Raspberry Pi® hardware using Controller Area Network (CAN) protocol

Leverage the capabilities of Controller Area Network (CAN) to efficiently design and implement robust and reliable CAN-based communication systems.

Blocks

CAN TransmitTransmit message to CAN network
CAN Receive Receive message from CAN network

Objects

canChannelConnection to CAN channel through specified device (Since R2021b)

Functions

enableCANEnable CAN interface (Since R2021b)
disableCANDisable CAN interface (Since R2021b)
readRead messages from CAN channel (Since R2021b)
writeWrite messages to CAN channel (Since R2021b)

Model Settings

expand all

Configure CAN interfaceConfigure the CAN interface number, type, bus speed, and transmit queue buffer size for the CAN interface (Since R2025a)
Number of CAN interfacesNumber of interfaces that are available in a CAN network (Since R2025a)
CAN interfaceName of CAN interface on network (Since R2025a)
CAN interface typeSelect CAN interface type
CAN Bus Speed (kBit/s) CAN bus speed in kilo bits per second
Transmit queue buffer sizeEnter the transmit buffer queue size for a CAN interface (Since R2025a)
Allow All MessagesAllow all messages to pass through the acceptance filter
ID Type 1Type of CAN message frame format for filter 1
Acceptance Mask 1Acceptance mask value for filter 1
Acceptance Filter 1Specify acceptance value for filter 1
Inverse FilterInverse the criterion that allows messages to pass through filter (Since R2021b)

Topics

Featured Examples