Modbus Mode - Ebyte ECAN-401S User Manual

Table of Contents

Advertisement

Chengdu Ebyte Electronic Technology Co.,Ltd.

4.1.4 Modbus mode

Modbus protocol is a standard application layer protocol, which is widely used in various industrial control occasions.
The protocol is open, with strong real-time performance, and good communication verification mechanism. It is very
suitable for occasions with high communication reliability requirements. The module uses the standard Modbus RTU
protocol format on the serial port side, so the module not only supports the user to use the Modbus RTU protocol, but
also the module. It can directly interface with other devices that support Modbus RTU protocol. On the CAN side, a
simple and easy-to-use segmented communication format is developed to realize Modbus communication. A method for
segmenting and reorganizing information with a length greater than the maximum data length of a CAN message. "Data
1" is used to segment identification data. , The transmitted Modbus protocol content can start from the "data 2" byte, if
the protocol content is greater than 7 bytes, then the remaining protocol content will continue to be converted according
to this segmented format until the conversion is completed. When there is no other data on the CAN bus, the frame filter
may not be set. The communication can be completed. When there are other data on the bus, a filter needs to be set.
Distinguish the source of data received by the device. According to this approach. It can realize the communication of
multiple hosts on a bus. The data transmitted on the CAN bus does not require a CRC validation method. Data validation
on the CAN bus already has a more complete validation method. In this mode, the device supports Modbus verification
and forwarding, not the Modbus master or slave, and the user can communicate according to the Modbus protocol.
Segmented transmission protocol:
A method for segmenting and reorganizing information with a length greater than the maximum data length of a CAN
message. In the case of a CAN message, "Data 1" is used to segment identification data. The format of the segment
message is as follows, and the content of the transmitted Modbus protocol is sufficient. Starting from the "data 2" byte, if
the protocol content is greater than 7 bytes, the remaining protocol content will continue to be converted in this
segmented format until the conversion is completed.
Segment
mark
Bit7
Bit6
Segmented message tag: indicates whether the message is a segmented message. If this bit is 0, it means a separate
message, and it is 1 it means
Belongs to a frame in the segmented message.
Segment type: Indicate whether it is the first paragraph, the middle paragraph or the last paragraph.
Place
value
0
1
2
Segment counter: The mark of each segment indicates the sequence number of the segment in the entire message. If it is
the number of segments, the value of the counter is the number. In this way, it is possible to verify whether any segments
are missing when receiving. 5Bit is used in total, and the range is 0~31.
No
Copyright ©2012–2022,Chengdu Ebyte Electronic Technology Co.,Ltd.
Segment type
Bit5
Bit4
meaning
First
If the segment counter contains the value 0, then this
segment
is the first segment in the segment series
Middle
Indicates that this is an intermediate segment
segment
Last
segment
7
6
Segment counter
Bit3
Bit2
illustrate
Mark the last segment
5
4
3
ECAN-401S User Manual
Bit1
Bit0
2
1
0
18

Advertisement

Table of Contents
loading

Table of Contents