KROHNE OPTISONIC V6 Modbus User Manual
Page 10
2011-07-19
OPTISONIC_V6_Modbus_6.doc
10/29
K
R
O
H
N
E
C
T
P
ro
d
u
c
ts
Registers 1-16 are addressed as 0-15. The value to be written is specified in the data field, which is a 16-bit
value.
Example
Request for slave 17 to preset register 40002 (decimal), 9C42 (hex) to 00 03 (hex).
Register Address
Data
Header
--
Slave
Address
11(h)
Function
06(h)
Hi
9C(h)
Low
41(h)
Hi
00(h)
Low
03(h)
Error Check
--
Trailer
--
Response
The response message is an echo of the request, returned after the register contents has been written.
Register Address
Data
Header
--
Slave
Address
11(h)
Function
06(h)
Hi
9C(h)
Low
41(h)
Hi
00(h)
Low
03(h)
Error Check
--
Trailer
--
If the request is not applicable, an exception response will be sent.
See chapter 5.10 for exception
responses.
5.7
Function 8: DIAGNOSTICS
Function 8 provides a test for checking the communication system between the master and the slave.
Request
The function uses a two-byte sub-function field in the request to define the test to be performed:
Header
--
Slave address
11(h)
Function
08(h)
Sub-function
00 00(h)
Data Hi+Lo
A1B8 (h)
Error check
--
Trailer
--
All sub-functions are supported.
5.8
Function 15: WRITE MULTIPLE COILS
Function 15 writes the status of 1 to 2000 contiguous logical (Boolean or ON/OFF) variables.
This function is not used, as in this application Boolean variables are not used as individual entities. Boolean
variables are represented by means of specific bits packed in 32 bit data word (type “Long”).
5.9
Function 16: WRITE MULTIPLE HOLDING REGISTERS
Function 16 writes the contents of 1 to 123 contiguous holding registers in the slave.
When the address is a broadcast, the function pre-sets the same register references in all attached slaves.
Request
The request message specifies the register references to be pre-set. Registers are addressed starting at
zero (register 1 is addressed as 0).