CAN Receive
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 Receive block receives messages from 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 Receive block supports Raw data
and
CAN Msg
as output types. To use CANdb (CAN database) file or to
specify signals manually, use CAN Msg
output type and CAN
Unpack block. The CAN Unpack block is available from the Vehicle Network Toolbox™.
Examples
Ports
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