CAN Communication

From OpenMBD
Jump to: navigation, search



Description

This example model shows how to use the CAN receive, CAN send, CAN config and XCP on CAN config blocks. The model sends two CAN messages, one message with a standard identifier of 0x12 sending four uint16's and sending the Most Significant Byte first, the other message sends the same data but with an extended identifier of 0x000012 and the Least Significant Byte first. Also two CAN messages are received, one with standard and one with extended identifier. The data that is being received in these messages is of type uint8. The 'CAN config' block is used to enable the CAN peripheral of the micro controller and the 'XCP on CAN config' block is used to enable communication with HANtune over the CANbus.

Model

CANcommunicationModel.png

CAN config

CANcommunicationConfigMaskSettings.png

CAN Receive

CANcommunicationMaskSettingsCANreceive.pngCANcommunicationMaskSettingsCANreceiveExt.png

CAN send

CANcommunicationMaskSettingsCANsend.pngCANcommunicationMaskSettingsCANsendExt.png

PCAN view

CANcommunicationPCANview.png

HANtune configuration

CANcommunicationXCPonCANmaskSettings.png