User manual - WEIGHT METER SWI-94
10.2.
TRANSMISSION ERRORS DESCRIPTION
If an error occurs while write or read of single register, then the device sends an error
code (according to Modbus RTU specifications).
Error codes:
01h
- illegal function (only functions 03h, 06h and 10h are available),
02h
- illegal register address
03h
- illegal data value
08h
- no write permission ( see: “
mbAccE
” parameter)
While reading of displayed value (registers 01h ÷ 04h) using function 03h (read single
register) other error codes can occur. Meaning of such codes is given in chapter
SIGNALISATION OF ERRORS
in details.
10.3.
EXAMPLES OF QUERY/ANSWER FRAMES
Examples apply for device with address 1. All values are represent hexadecimal.
Field description:
ADDR
Device address on modbus network
FUNC
Function code
REG H,L
Starting address (address of first register to read/write, Hi and Lo byte)
COUNT H,L
No. of registers to read/write (Hi and Lo byte)
BYTE C
Data byte count in answer frame
DATA H,L
Data byte (Hi and Lo byte)
CRC L,H
CRC
error check (Hi and Lo byte)
1. Read of the displayed value (measurement) and status, the device address = 01h:
ADDR
FUNC
REG H,L
COUNT H,L
CRC L,H
01
03
00
01
00
03
54
0B
a) The answer (we assume that the measure result is not out of range):
ADDR FUNC BYTE C
DATA H1,L1
DATA H2, L2
DATA H3.L3
CRC L,H
01
03
06
00
01
86
A0
00
00
2A
B4
DATA H1, L1 - reg. 01h (1 - high word of measurement value)
DATA H2, L2 - reg. 02h (86A0h - low word of measurement value ),
DATA H3, L3 - reg. 03h (0 - measurement status).
In this example measurement value is equal 186A0h (100 000 in decimal format).
Decimal point position is not included in measurement value (reg. 01h and 02h).
Decimal point position can be read from reg. 04h.
48
i