CAN Transmit
Transmit message to CAN network
Add-On Required: This feature requires the Simulink Support Package for Raspberry Pi Hardware add-on.
Libraries:
Simulink Support Package for Raspberry Pi Hardware /
Communication
Description
The CAN Transmit block transmits messages to the CAN network. This block uses SocketCAN which is a device-independent driver for implementing the CAN interface supporting all CAN shields.
The CAN Transmit block supports Raw data
and
CAN Msg
as input types. To use a CANdb (CAN database)
file or to specify signals manually, use CAN Msg
input type
and the CAN Pack block. The CAN Pack block is available
from Vehicle Network Toolbox™. For more information on the CAN Pack block, see CAN
Pack (Vehicle Network Toolbox).
For more information on how to enable the SPI interface and configure the MCP2515 CAN controller for CAN communication, see Enable and Configure Raspberry Pi for SPI and CAN Communication Using MCP2515 CAN Controller.
You can use CAN Transmit block to interact with a real or virtual CAN interface. To bring up the CAN interface with Raspberry Pi®, refer to the user guide of your CAN shield. For more information on how to set up a virtual CAN interface, see Setup Virtual CAN Interface.
Ports
Input
Output
Parameters
Version History
Introduced in R2019b
See Also
Enable and Configure Raspberry Pi for SPI and CAN Communication Using MCP2515 CAN Controller | CAN Receive | Setup Virtual CAN Interface | CAN properties