smartDEN
IP-16R-MT
User Manual
7 July 2020
-
48
-
The Write Multiple Registers request specifies the starting register address, the
number of registers, byte count, and the values to be written in ascending order.
Values are packed as two bytes per register.
Note
: If the sum of the start address and number of registers
exceeds the size of
the accessed block of registers, an error response will be returned.
Request example: Set Week Schedule Start Date to 10/09/2020:
Table 24.
Write Multiple Registers request
Field
Length
Data
Transaction Identifier
2 Bytes
0x0006
Protocol Identifier
2 Bytes
0x0000
Length
2 Bytes
0x000D
Unit Identifier
1 Byte
0x00
Function Code
1 Byte
0x10
Starting Register Address
2 Bytes
0x6100
Quantity of Registers
2 Bytes
0x0003
Byte Count
1 Byte
0x06
Start Date (Day)
2 Bytes
0x000A
Start Date (Month)
2 Bytes
0x0009
Start Date (Year)
2 Bytes
0x07E4
Response
The normal response returns the function code, starting register address, and
quantity of registers written.
Response example: Set Week Schedule Start Date to 10/09/2020:
Table 25.
Write Multiple Registers reply
Field
Length
Data
Transaction Identifier
2 Bytes
0x0006
Protocol Identifier
2 Bytes
0x0000
Length
2 Bytes
0x0006
Unit Identifier
1 Byte
0x00
Function Code
1 Byte
0x10
Starting Register Address
2 Bytes
0x6100
Quantity of Registers
2 Bytes
0x0003
Error
The possible error responses for function code 0x0F are:
Function Code (1 byte): 0x90 (0x80 + 0x10)
Exception Codes (1 byte):
- 0x01
– Function code not supported
- 0x02
– Invalid register address
- 0x03
– Invalid register value
Error response example:
Table 26.
Write Multiple Registers error response