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
Modbus RTU. In conversion, convert them in turn in the data field of the CANFD message
frame (starting from the second data byte, the first data byte is used by the segmentation
protocol). The length of the Modbus RTU frame varies according to the function code.
Because the first byte is used for segment identification, only seven pieces of data can be
transmitted in one frame of CAN message. A CANFD message can only transmit 63 bytes
of data in one frame. The converter will segment the longer Modbus RTU frame into
CAN(CANFD) messages and send them using the above-mentioned CAN(CANFD)
segment protocol. When you receive them on the CAN (CANFD) node, you can
reassemble the data according to the segmentation protocol, extract the function code,
and process the data field.
For the Modbus protocol data of CAN (CANFD) bus, there is no need to perform
cyclic redundancy check (CRC16), and the converter receives data by using the
segmented protocol. After receiving a frame, it will automatically add a cyclic redundancy
check (CRC16), convert data into a Modbus RTU frame and send it to the serial bus. If the
received data does not conform to the segmentation protocol, the group of data is
discarded without conversion.
4.4.3

Conversion Examples

When the CAN mode is configured and the frame type is set to extended frame, as
shown in Table 4.30, if the Modbus RTU frame is converted into a CAN message, the
address field 0x08 is directly filled into the frame ID0, and other frame IDs are filled with
0x00; that is, the CAN ID is 0x08. Keep this frame ID unchanged during the conversion of
this Modbus frame.
If the data in the function code + data field is less than 7 bytes, a single message can
be sent, as shown in Table 4.31. When one frame of CAN message cannot process one
frame of Modbus message, the CAN message adopts segmentation protocol.
The "data 1" of each CAN message is used to fill the segment information (0x81,
0xC2), which is not converted into the ModbusRTU frame, and is only used as the frame
format to confirm the frame information. The value of the function code and data field is
filled in the data 2-8 of the CAN message in turn.
The CANFD mode is similar to CAN, except that the segmented protocol is used to
divide the message when the data exceeds 63 bytes.
Table 4.30 Example of the mutual conversion format for the CAN extended frame communication frame
Modbus RTU
frame
Addres
0x08
s field
Functio
0x11
n Code
0x00
Data
0x01
field
0x00
(Modbus mode segmented message)
CAN
message
Frame
information
Frame ID3
Frame ID 2
Frame ID1
Frame ID0
©2021 Guangzhou ZLG Microelectronics Technology Corp.,Ltd.
36
CAN message
CAN
1
message 2
0x88
0x84
0x00
0x00
0x00
0x00
0x00
0x00
0x08
0x08
User Manual

Advertisement

Table of Contents
loading

Table of Contents