CAN2B_MESSAGE_TYPE¶
The library contains one general data type CAN2B_MESSAGE_TYPE to describe a CAN 2.0 B telegram with a 29 bit identifier. This data type is declared as follows:
TYPE CAN2B_MESSAGE_TYPE:
STRUCT
ID: DWORD;
RTR: BOOL;
DLC: BYTE;
DATA: ARRAY [1..8] OF BYTE;
END_STRUCT
END_TYPE
ID DWORD \ (identifier)
ID contains the general 29 bit identifier, its value range reaches from 0 to 536870911 (16#0 to 16# 1FFFFFFF).
RTR BOOL \ (remote \ transmission \ request)
RTR contains the RTR bit in the telegram header.
DLC BYTE \ (data \ length \ code)
DLC contains the data length code in the telegram header and specifies the valid length in bytes for the user data following in DATA. Valid values for DLC are 0 to 8.
DATA ARRAY[1..8] \ OF BYTE
DATA contains the telegram data (if available). A CAN telegram can contain 0 to 8 bytes of data. The actual data length of a telegram is described by the data length code (DLC) contained in the telegram header. In DATA, only the first bytes are valid as specified by the DLC.