Write Multiple Registers - Siemens SITRANS F Operating Instructions Manual

Communication modules sitrans f m mag 8000 modbus rtu
Hide thumbs Also See for SITRANS F:
Table of Contents

Advertisement

Function codes

6.5 Write multiple registers

6.5
Write multiple registers
Command messages
The multiple register write functions (10 hex) allow the master to write data to the slaves
registers. The command message of a multiple register write is structured as shown below.
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 10 hex (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.
32
Write multiple coil command messages
Upper
Lower
Upper
Lower
Upper
Lower
Upper
Lower
Upper
Lower
Lower
Upper
Example
xx hex
10 hex
xx hex
xx hex
xx hex
xx hex
xx hex
xx hex
xx hex
xx hex
xx hex
xx hex
xx hex
xx hex
xx hex
MAG 8000 Modbus RTU
Operating Instructions, 04/2016, A5E03409989-AB

Advertisement

Table of Contents
loading

Table of Contents