Operation
X-317™ Users Manual
5.3.5 Write Multiple Registers (Modbus Function Code 16 (0x10))
The Write Multiple Registers function is used to write (set) the analog output value(s).
32-bit values are written to 16-bit register pairs. Consequently, addresses and registers must be even
numbers.
5.3.5.1 Request
Modbus TCP Request Frame Example – Write Analog Channel(s)
Field Name
Length
Function
Example Data
(AnalogOut1)
Transaction Identifier
2 bytes
Synchronization number.
0x0001
Protocol Identifier
2 bytes
Zero for Modbus/TCP
0x0000
Message Length
2 bytes
Number of bytes in frame (below)
0x000B
Unit Identifier
1 byte
Slave Address (0xff if not used)
0xFF
Function Code
1 byte
Write multiple registers
0x10
Start Address
2 bytes
Start Address:
0x0510
Quantity of registers
2 bytes
Quantity of registers:
0x0002
Byte Count
1 byte
Byte count (2 x N)
0x02
Data
N * 2
Register(s) value:
0x800042A2
5.3.5.2 Response
Response Frame Example
Field Name
Length
Function
Example Data
Transaction Identifier
2 bytes
Synchronization number.
0x0001
Protocol Identifier
2 bytes
Zero for Modbus/TCP
0x0000
Message Length
2 bytes
Number of bytes in frame (below)
0x0006
Unit Identifier
1 byte
Slave Address (0xff if not used)
0xFF
Function Code
1 byte
Write multiple registers
0x10
Starting Address
2-bytes
Starting address
0x0510
Quantity of registers
2-bytes
Quantity of registers
0x0002
Page 48
Xytronix Research & Design, Inc.
Summary of Contents for ControlByWeb X317
Page 1: ......