Receive message from CAN network
Simulink Support Package for Arduino Hardware / Common
The CAN Receive block receives messages from a Controller Area Network (CAN) network by using the CAN shield connected to the hardware. The CAN shield is connected to the Serial Peripheral Interface (SPI) pins on the hardware.
Click View pin map to open the Arduino Pin Mapping table .
To know how to assign pins for the block, see Arduino Pin Mapping for Timer Independent Blocks.
Specify the message type and its properties using the block parameters dialog box. Specify the CAN properties of the model in the Configuration Parameters dialog box.
This block supports only MCP2515-based CAN shields.
If you simulate a model that contains the CAN Receive block without connecting the hardware, the block outputs zeros. For more information, see Block Produces Zeros or Does Nothing in Simulation.