smartDEN
IP-16R-MT
User Manual
7 July 2020
-
45
-
Function Code
1 Byte
0x0F
Start Address
2 Bytes
0x0000
Quantity of Outputs
2 Bytes
0x0010
Error
The possible error responses for function code 0x0F are:
Function Code (1 byte): 0x8F (0x80 + 0x0F)
Exception Codes (1 byte):
- 0x01
– Function code not supported
- 0x02
– Incorrect combination of start address and coil quantity
Error response example:
Table 18.
Write Multiple Coils error response
Field
Length
Data
Transaction Identifier
2 Bytes
0x0003
Protocol Identifier
2 Bytes
0x0000
Length
2 Bytes
0x0003
Unit Identifier
1 Byte
0x00
Function Code
1 Byte
0x8F
Exception Codes
1 Byte
0x01 or 0x02
9.1.4. Read Holding Registers
This command is used to read the contents of a contiguous block of registers.
Request
The Read Holding Registers request specifies the starting register address and
the number of registers to be read.
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: Read Week Schedule Start Date fields:
Table 19.
Read Holding Registers request
Field
Length
Data
Transaction Identifier
2 Bytes
0x0004
Protocol Identifier
2 Bytes
0x0000
Length
2 Bytes
0x0006
Unit Identifier
1 Byte
0x00
Function Code
1 Byte
0x03
Starting Register Address
2 Bytes
0x6100
Quantity of Registers
2 Bytes
0x0003
Response
The Read Holding Registers response returns the function code, byte count, and
register‟s values packed as two bytes per register.