CAN Transmit
Add-On Required: This feature requires the MATLAB Coder Support Package for NVIDIA Jetson and NVIDIA DRIVE Platforms add-on.
Libraries:
NVIDIA Jetson and NVIDIA DRIVE /
Communication
Description
The CAN Transmit block transmits messages on the CAN bus through the time triggered CAN (TTCAN) controller available on NVIDIA® embedded boards. This block uses the SocketCAN interface to communicate with the CAN controller hardware on NVIDIA boards.
You can also use this block to interact with a virtual CAN interface. A virtual CAN interface allows transmission and reception of CAN frames without a native CAN interface associated with real hardware. For more information on how to set up a virtual CAN interface, see Setup Virtual CAN Interface.
The CAN Transmit block supports Raw data
and
CAN Msg
as input types. To use CANdb (CAN database) file or to
specify signals manually, use CAN Msg
input type and CAN
Pack block. The CAN Pack block is available from the Vehicle Network Toolbox™.
Examples
Ports
Input
Output
Parameters
Tips
If a Simulink® model contains CAN Transmit and CAN Receive block, and the Set up CAN interface is set only on the CAN Transmit block, then a CAN receive socket might not be set up because of the order of execution of the blocks. In such cases, manually set up the CAN interfaces before executing the models or enable Set up CAN interface on all blocks.
Version History
Introduced in R2021b