smartDEN
IP-16R-MT
User Manual
7 July 2020
-
44
-
Function Code
1 Byte
0x0F
Start Address
2 Bytes
0x0000
Quantity of Outputs
2 Bytes
0x0003
Byte Count
1 Byte
0x01
Outputs Value
1 Byte
0x05
Request example 2: Set relay 1 to OFF and relays 2..16 to ON:
Table 15.
Write Multiple Coils request example 2
Field
Length
Data
Transaction Identifier
2 Bytes
0x0003
Protocol Identifier
2 Bytes
0x0000
Length
2 Bytes
0x0009
Unit Identifier
1 Byte
0x00
Function Code
1 Byte
0x0F
Start Address
2 Bytes
0x0000
Quantity of Outputs
2 Bytes
0x0010
Byte Count
1 Byte
0x02
Outputs Value
2 Bytes
0xFEFF
In this example the first byte of the Outputs Value field corresponds to relays 8 to
1, and the second byte
– to relays 16 to 9.
Response
The normal response returns the function code, starting address, and quantity of
coils forced.
Response example 1: Set relays 1 and 3 to ON, and relay 2 to OFF:
Table 16.
Write Multiple Coils response example 1
Field
Length
Data
Transaction Identifier
2 Bytes
0x0003
Protocol Identifier
2 Bytes
0x0000
Length
2 Bytes
0x0006
Unit Identifier
1 Byte
0x00
Function Code
1 Byte
0x0F
Start Address
2 Bytes
0x0000
Quantity of Outputs
2 Bytes
0x0003
Response example 2: Set relay 1 to OFF and relays 2..16 to ON:
Table 17.
Write Multiple Coils response example 2
Field
Length
Data
Transaction Identifier
2 Bytes
0x0003
Protocol Identifier
2 Bytes
0x0000
Length
2 Bytes
0x0006
Unit Identifier
1 Byte
0x00