CAN | CAN Interface 11.1.7.3 CAN FD Message data structures | CAN FD Message data structures The following new data structures have been introduced for CAN FD support at the CAN interface. TYPE CANFDTSRXQUEUE : STRUCT dataLenght : BYTE; EDL : BIT; BSR : BIT; ESI : BIT; cobId : UDINT; rxData : CANFDMESSAGE; timeStamp : ULINT; END_STRUCT END_TYPE TYPE CANFDTXQUEUE : STRUCT transactionNumber : UINT; dataLenght : BYTE; EDL : BIT; BSR : BIT; ESI : BIT; cobId : UDINT; txData : CANFDMESSAGE; END_STRUCT END_TYPE TYPE CANFDMESSAGE : ARRAY [0..63] OF USINT; END_TYPE These structures are available for the IOs in the System Manager as well as in the PLC.
11.1.7.3.1 Data length | Data length For the data length values up to 64 bytes are possible for Can FD frames. Since these values are transmitted in the classic CAN arbitration header, the following values are possible: 0 ... 8, 12, 16, 20, 24, 36, 48 and 64 If the lengths do not correspond to these values during transmission, they are adjusted to the next higher value by the device. For a CAN FD frame the values 0 to 15 are valid for the DLC field. The value of the DLC field determines the number of bytes in the data field and is interpreted in the following way: DLC value vs. Data field size The CAN interface does this conversion automatically, i.e.
in the CAN interface you only specify the actual number of bytes (values from 0..64 bytes are allowed). The conversion to the DLC values is then performed by the CAN interface in the background with the next larger DLC value. Example: if you enter the data length 32 in the CAN interface, 36 bytes are sent with the DLC value 13. I/O 40 Version: 2.3.0