Modbus protocol description and set-up, 5 function 05: write single coil, 6 function 06: write single holding register – KROHNE ALTOSONIC V12 EN User Manual
Page 118: 7 function 08: diagnostics
![background image](/manuals/369187/118/background.png)
10
MODBUS PROTOCOL DESCRIPTION AND SET-UP
118
ALTOSONIC V12
www.krohne.com
04/2013 - 4002643502 - MA ALTOSONIC V12 R02 en
10.5.5 Function 05: WRITE SINGLE COIL
Function 05 writes the status of a logical (Boolean or ON/OFF) variable.
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”).
10.5.6 Function 06: WRITE SINGLE HOLDING REGISTER
Function 06 presets a value into a single holding register.
When the address is a broadcast, all slaves will process the request.
Request
The request specifies the register reference to be written. Registers are addressed starting from
zero. 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).
Response
The response message is an echo of the request, returned after the register contents has been
written.
If the request is not applicable, an exception response will be sent.
For more information, refer to
Exception responses
on page 120.
10.5.7 Function 08: 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
Function
Register address
Data
Error
check
Trailer
--
11(h)
06(h)
Hi
9C(h)
Low
42(h)
Hi
00(h)
Low
03(h)
--
--
Table 10-4: Example write single holding register
Header
Slave
address
Function
Register address
Data
Error
check
Trailer
--
11(h)
06(h)
Hi
9C(h)
Low
42(h)
Hi
00(h)
Low
03(h)
--
--
Table 10-5: Response write single holding register