Embedded Target for Motorola MPC555 | ![]() ![]() |
Map Simulink signals to CAN messages
Library
Description
The CAN Message Packing block builds a CAN message. The CAN message type can be either Extended or Standard. You can set the message identifier statically or dynamically. The input port is dynamically typed and will accept any standard Simulink data types as input, as long as the total size does not exceed 8 bytes (64 bits).
int8
or uint8
: signals of width 1 - 8
int16
or uint16
: signals of width 1 - 4
int32
or uint32
: signals of width 1 - 2
single
: signals of width 1 - 2
double
: signals of width 1
The output data type is either CAN_MESSAGE_STANDARD
or CAN_MESSAGE_EXTENDED
.
In this block diagram, a CAN Message Packing block accepts a uint16
signal of width 2 (4 bytes). The lower input is a dynamic message ID (see CAN message identifier below).
Dialog Box
Standard (11 bit identifier)
or Extended (29 bit identifier)
.Little Endian
or Big Endian
.![]() | CAN Message Filter | CAN Message Packing (CANdb) | ![]() |