13
NT579-NT579 RS485
TECSYSTEM SHANGHAI
DATA PACKET
A complete sequence of request/answer is composed as follows:
Master request.
SLAVE ADDRESS
- 1 byte
FUNCTION CODE
- 1 byte
DATA
- variable, they depend by the function code
CRC
- 2 bytes
Slave answer.
SLAVE ADDRESS
- 1 byte
FUNCTION CODE
- 1 byte
DATA
- variable, they depend by the function code
CRC
- 2 bytes
29) FUNCTION CODE
ModBus module supports the following function codes:
3
(10)
:
- holding register reading
16
(10)
:
- multiple register writing
If ModBus receives a message and a CRC error is detected, no answer is
given.
30) CODE 3
(10)
.
Request:
Slave address, code 3
(10)
, Starting address HI, Starting address LO, Number of
Point HI, Number of Point LO, Crc LO, Crc HI.
Answer:
Slave address, code 3
(10)
, Byte count, Data HI, Data LO……., Crc LO, Crc HI.
ERROR CODES (exception code)
In case of wrong request ModBus will answer with modified codes and codified
errors according to the following points:
1:
- Non-supported function code
2:
- Wrong data address
3: - Wrong data (for instance length)
4: -illegal data(for value)
Содержание NT579
Страница 23: ...23 NT579 NT579 RS485 TECSYSTEM SHANGHAI ...
Страница 24: ...24 NT579 NT579 RS485 TECSYSTEM SHANGHAI ...