Modbus Protocol Specification


Notes for the 584 and 984A / B / X



tải về 0.61 Mb.
Chế độ xem pdf
trang31/35
Chuyển đổi dữ liệu14.05.2023
Kích0.61 Mb.
#54683
1   ...   27   28   29   30   31   32   33   34   35
modbus protocol

5.3 Notes for the 584 and 984A / B / X
Baud Rates
When using both Modbus ports 1 and 2, the maximum allowable combined baud rate is 19,200
baud.
Port Lockups
When using ASCII, avoid sending zero-data-length messages or messages with no device
address. For example, this is an illegal message:
: CR LF (colon, CR, LF)
Random port lockups can occur this kind of message is used.
Terminating ASCII Messages
ASCII messages should normally terminate with a CRLF pair. With the 584 and 984A/B/X
controllers, an ASCII message can terminate after the LRC field (without the CRLF characters
being sent), if an interval of at least 1 s is allowed to occur after the LRC field. If this happens,
the controller will assume that the message has terminated normally.
http://www.modicon.com/techpubs/app7.html (7 of 7) [1/11/2000 10:44:32 PM]


Chapter 6
LRC / CRC Generation

LRC Generation

CRC Generation
6.1 LRC Generation
The Longitudinal Redundancy Check (LRC) field is one byte, containing an eight-bit binary value. The LRC value is
calculated by the transmitting device, which appends the LRC to the message. The receiving device recalculates an LRC
during receipt of the message, and compares the calculated value to the actual value it received in the LRC field. If the two
values are not equal, an error results.
The LRC is calculated by adding together successive eight-bit bytes in the message, discarding any carries, then two's
complementing the result. The LRC is an eight-bit field, therefore each new addition of a character that would result in a value
higher than 255 decimal simply rolls over the field's value through zero. Because there is no ninth bit, the carry is discarded
automatically.
Generating an LRC

tải về 0.61 Mb.

Chia sẻ với bạn bè của bạn:
1   ...   27   28   29   30   31   32   33   34   35




Cơ sở dữ liệu được bảo vệ bởi bản quyền ©hocday.com 2024
được sử dụng cho việc quản lý

    Quê hương