smartDEN
IP-16R-XX
User Manual
13 Apr 2021
-
49
-
Table 10.15.
Write Single Coil error response
Field
Length
Data
Transaction Identifier
2 Bytes
0x0002
Protocol Identifier
2 Bytes
0x0000
Length
2 Bytes
0x0003
Unit Identifier
1 Byte
0x00
Function Code
1 Byte
0x85
Exception Codes
1 Byte
0x01 or 0x02 or 0x03
10.2.1.2. Write Multiple Coils
This command will force each coil in a sequence of coils to either ON or OFF.
Request
The Write Multiple Coils request specifies the starting address and quantity of
relays to be forced:
Start Address: 0x0000 (Relay 1) to 0x000F (Relay 16)
Coil Quantity: 0x0001 (1 Relay) to 0x0010 (16 Relays)
Note
: If the sum of the start address and coil quantity exceeds 16, an error
response will be returned.
The requested ON/OFF states are specified by contents of the request data field.
A logical '1' in a bit position of the field requests the corresponding output to be ON.
A logical '0' requests it to be OFF.
Request example 1: Set relays 1 and 3 to ON, and relay 2 to OFF:
Table 10.16.
Write Multiple Coils request example 1
Field
Length
Data
Transaction Identifier
2 Bytes
0x0003
Protocol Identifier
2 Bytes
0x0000
Length
2 Bytes
0x0008
Unit Identifier
1 Byte
0x00
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 10.17.
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
Содержание smartDEN IP-16R Series
Страница 63: ...smartDEN IP 16R XX User Manual 13 Apr 2021 63 Figure 10 9 Inputs state notifications...
Страница 66: ...smartDEN IP 16R XX User Manual 13 Apr 2021 66 13 Appendix 2 Application reply formats 13 1 XML reply...
Страница 67: ...smartDEN IP 16R XX User Manual 13 Apr 2021 67 13 2 JSON reply...