Siemens SITRANS F Operating Instructions Manual page 32

Communication modules modbus rtu rs485
Hide thumbs Also See for SITRANS F:
Table of Contents

Advertisement

Functions codes
6.5 Write multiple registers
The initial slave address is 1. Address 0 (broadcast) and other values between 1 and 255
can be used.
The function code of this message is 10hex (write multiple registers).
The starting register is the first register to be written to.
The quantity indicates how many consecutive 16-bit registers are to be written to. The
quantity may range from 1 to 25 registers. If the quantity is greater than 25 an error code of
03 hex is returned in the exception response message.
The Byte count is the number of bytes of data to be written to the device. The number of
bytes is actually the quantity times 2, since there are two bytes of data in each register.
The data section of the command message contains 8 upper and 8 lower bits of data for
each register that is being written to.
CRC check and exception handling is performed as described for command 'Read multiple
registers'.
Table 6- 11
Message byte
Slave address
Function code
Starting register
Quantity
Byte count
Starting register value
Next register value
Last register value
CRC-16
Normal response
The normal response message contains the same slave address and function code as the
command message.
The starting register is the first register that was written to.
The quantity value indicates how many consecutive registers were written to.
Table 6- 12
Message byte
Slave address
Function code
30
Write multiple coil command messages
Upper
Lower
Upper
Lower
Upper
Lower
Upper
Lower
Upper
Lower
Lower
Upper
Write multiple coil normal response messages
Example
xxhex
10hex
00hex
20hex
00hex
04hex
xxhex
xxhex
xxhex
xxhex
xxhex
xxhex
xxhex
xxhex
xxhex
Example
xxhex
10hex
Operating Instructions, 06/2010, A5E00753974-04
Modbus RTU RS485

Advertisement

Table of Contents
loading

Table of Contents