4
- 59
4.19 Mask Write Register (FC: 22)
4
MODBUS(R) STANDARD FUNCTIONS
4.19 Mask Write Register (FC: 22)
Masks the values stored in a single holding register with AND or OR and writes the value.
The masked values written to the holding register are as shown below.
When the OR mask value is 0000
H
, only the AND processing of the AND mask value is
performed.
When the AND mask value is 0000
H
, the OR mask value is the write value.
(1) Request Message Format (Master Slave)
(2) Response message format (Slave Master)
(When completed normally)
The slave returns the request message received from the master without change.
(When completed with an error)
* 1 Exception and error codes are stored in the buffer memory in the case of error completion.
Refer to the following for storage location, confirmation methods, and detailed contents.
POINT
This function code is used to read the value stored in a specified holding register
from the slave, process the value with AND/OR mask in the master, and then write
the masked value to the holding register of the slave.
Therefore, if the holding register value is changed during the AND/OR operation,
the changed value is overwritten.
Figure 4.96 Mask write register (Request message)
Figure 4.97 Mask write register (Normal response message)
(
Target register current value
AND mask value) (OR mask value
AND mask value) = Write value
Data
(L)
(L)
(L)
Function
code
Function
code
(16
H
)
Target holding register number
(0000
H
to FFFF
H
)
AND mask value
(0000
H
to FFFF
H
)
OR mask value
(0000
H
to FFFF
H
)
(H)
(H)
(H)
Data
Function
code
Function
code
(96
H
)
Exception
code*
1
Summary of Contents for QJ71MB91
Page 1: ......
Page 2: ......
Page 366: ...App 14 Appendix 4 External Dimensions APPENDICES Memo ...
Page 371: ......
Page 372: ......