ICP DAS, ZT-257x DIO Data Concentrator Quick Start Guide, v1.0
Page 45
Copyright © 2016, by ICP DAS Co., LTD. All Rights Reserved
5.3.4.
15 (0x0F) Write Multiple Coils
This function code is used to set the temporary Digital Output value for a range of
channels on the ZT-257x module.
Request
Byte
Description
Length Value
00
Address
1
0x01 to 0xF7 (1 to 247)
01
Function Code
1
0x0F
02-03
Starting Channel
Number
2
DO
(
Local Output)
0x0000 to 0x0117
Safe Value
0x0400 to 0x0517
04-05
Output Channel
Number
2
0x0001 to 0x0118
(
Bit Count)
06
Byte Count
1
B=(Bit Count + 7)/8
07
Output Value
B
A bit corresponds to a channel. When the bit is
‘1’
, it denotes that the value of the channel that
was set is ON. If the bit is ‘0’
, it denotes that the
value of the channel that was set is OFF.
Response
Byte Description
Length Value
00
Address
1
0x01 to 0xF7 (1 to 247)
01
Function Code
1
0x0F
02-03
Starting Channel
Number
2
This value is the same as bytes 02 and 03 of the
Request
04-05
Output Channel
Number
2
0x0001 to 0x0118
(
Bit Count)
Error Response
Byte Description
Length Value
00
Address
1
0x01 to 0xF7 (1 to 247)
01
Function Code
1
0x8F
02
Exception Code
1
Refer to the Modbus standard for more details