smartDEN IP-16R-XX User Manual
13 Apr 2021
Table 10.15. Write Single Coil error response
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
Request example 2: Set relay 1 to OFF and relays 2..16 to ON:
Table 10.17. Write Multiple Coils request example 2