Write Multiple Registers - Siemens SITRANS F Operating Instructions Manual

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

Advertisement

Table 6- 9
Message byte
Slave address
Function code
Coil address
New coil value
CRC-16
Exception response
The exception response message contains the same slave address as the command
message.
The function code of the exception message is actually a value of 80 hex plus the original
function code of 05hex . The exception code indicates where the error occurred in the
command message. A complete listing of exception codes is shown in a later chapter
Table 6- 10
Message byte
Slave address
Function code
Exception code
CRC-16
Examples
Coil 0 (Restart Modbus communication)
To activate a new baudrate and parity/framing the coil 0 (restart Modbus communication)
must be send. Otherwise a power down/up initiate a new baudrate and parity/framing:
● Query: 1,5,0,0,255,0,140,58 (Hex 01,05,00,00,FF,00,8C,3A) (Set coil 0 to 0xFF00)
● Receive: 1,5,0,0,255,0,140,58 (Hex 01,05,00,00,FF,00,8C,3A) (Restart Modbus
6.5

Write multiple registers

Command messages
The multiple register write functions (10hex) allows the master to write data to the slaves
registers. The command message of a multiple register write is structured as shown below.
Modbus RTU RS485
Operating Instructions, 06/2010, A5E00753974-04
Write coil normal response messages
Write coil exception response messages
communication)
Upper
Lower
Upper
Lower
Lower
Upper
Lower
Upper
Functions codes
6.5 Write multiple registers
Example
xxhex
05hex
xxhex
xxhex
FFhex or 00hex
00hex
xxhex
xxhex
Example
xxhex
85hex
01hex to 06hex
xxhex
xxhex
29

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents