Conversion Examples - ZLG CANFDNET-400U Product User Manual

Rs232/485/422-can fd-bus intelligent protocol converter
Hide thumbs Also See for CANFDNET-400U:
Table of Contents

Advertisement

CANFDNET-400U
High-performance Four-channel CANFD Bus-to-Ethernet Converter User Manual
4.2.3

Conversion Examples

1. Serial frames to CAN messages
Assuming that the starting address of the CAN logo in the serial frame is 2, the length
is 3 (in the case of an extended frame), the data sent by the serial frame is 0x00-0x0E, the
results of the serial frame conversion into CAN messages are shown in Table 4.14.
Among them, two frames of CAN messages are converted with the same ID.
Table 4.14 Example of converting serial frames into CAN messages (transparent conversion with flags)
Serial frame
Address 0
Address 1
Address 2
Address 3
Address 4
Data 5
Data 6
Address 7
Address 8
Address 9
Address 10
Address 11
Address 12
Address 13
Address 14
As shown in Table 4.14, because the pre-configured CAN message is an extended
frame, the frame ID in the serial frame-to-CAN message is 4 bytes. Because the starting
address in the configuration serial frame is 2 and the length is 3, three bytes are taken
continuously from the address 2 in the serial frame, which are 0x02, 0x03, 0x04 in this
example. During conversion, these three bytes are filled into frame ID2, frame ID1, frame
ID0 of CAN message in turn, but frame ID3 is filled with 0x00. The rest of the data in the
serial frame will be converted into the data field of the CAN message without any
modification.
2. Converting serial frames to CANFD messages
Assuming that the starting address of the CANFD flag in the serial frame is 2 and the
length is 3 (in the case of extended frame), the data sent by the serial frame are
0x00-0x45 respectively, a total of 70 data. Table 4.15 lists the serial frames converted to
CAN messages. Among them, two frames of CAN messages are converted with the same
ID.
0x00
0x01
0x02
0x03
0x04
0x05
0x06
0x07
0x08
0x09
0x0A
0x0B
0x0C
0x0D
0x0E
©2021 Guangzhou ZLG Microelectronics Technology Corp.,Ltd.
27
CAN
message 1
Frame
0x88
information
Frame ID 3
0x00
Frame ID 2
0x02
Frame ID1
0x03
Frame ID0
0x04
0x00
0x01
0x05
0x06
Data field
0x07
0x08
0x09
0x0A
User Manual
CAN
message 2
0x84
0x00
0x02
0x03
0x04
0x0B
0x0C
0x0D
0x0E

Advertisement

Table of Contents
loading

Table of Contents