User Manual For - CONTROLLER/DATA RECORDER MultiCon CMC-99/141
7.15.2.5.
Modbus SLAVE - Transmission errors handling
If during reading or writing one of registries an error occurs then the unit shall return the frame
containing the error code (according to the Modbus protocol).
Error codes should be interpreted as follows:
01h
- illegal function (only functions 03h, 04h, 06h and 10h are available),
02h
- illegal register address
03h
- illegal data value
7.15.2.6.
Modbus SLAVE- Example of query/answer frames
The examples concern a unit with address 1. All values are given in the hexadecimal system.
Designations:
ADDR
Address of the device in the system
FUNC
Function number
REG H,L
Higher and lower part of registry number, to which the command refers to
COUNT H,L
Higher and lower part of registry counter number, to which the command
refers to, starting with the register, which is defined by REG (max. 32)
BYTE C
Number of higher bytes in the frame
DATA H,L
Higher and lower part of data word
CRC L,H
Higher and lower part of CRC sum
1. Read of ID code
ADDR FUNC
REG H,L
COUNT H,L
CRC L,H
01
03
00
21
00
01
D4
00
The answer:
ADDR
FUNC
BYTE C
DATA H,L
CRC L,H
01
03
02
DATA H,L - identification code (2060h)
2.
Read of the registers 401h, 402h and 403h in one message (example of reading a number
of registries in one frame):
ADDR FUNC
REG H,L
COUNT H,L
CRC L,H
01
03
04
01
00
03
55
3B
COUNT L - the count of being read registers (max. 32)
209