Mask Write Register (Fc: 22) - Mitsubishi Electric QJ71MT91 User Manual

Modbus/tcp interface module
Table of Contents

Advertisement

4
MODBUS STANDARD FUNCTIONS

4.3.11 Mask write register (FC: 22)

4 - 19
Masks the value stored in one holding register with AND or OR, and writes the masked
value.
The masked value is written to the holding register as described below.
(Target register's current value
= write value
When the OR mask value is 0000
is performed.
When the AND mask value is 0000
(1) Request message format (Master → Slave)
Function code
Target holding register number
Function code
(0000
(16
)
H
(H)
(2) Response message format (Slave → Master)
(When completed normally)
The slave returns the request message received from the master as it is.
(When completed with an error)
Function code
Function code
Exception
(96
)
H
: When completed with an error, the exception code and error code are stored
into the buffer memory.
Refer to Section 11.3 for the storage location, confirmation method and more
details.
POINT
This function code reads the value stored in the holding register from the slave, and
after AND/OR processing in the master, writes the masked value to the holding
register of the slave.
Therefore, when the holding register value is changed during AND/OR processing,
the new value is overwritten.
Number of accessible devices with one message
AND mask value) (OR mask value
, only the AND processing of the AND mask value
H
, the OR mask value becomes the write value.
H
AND mask value
to FFFF
)
(0000
H
H
(L)
(H)
Data
code*
MELSEC-Q
1 point
AND mask value)
Data
OR mask value
to FFFF
)
(0000
H
H
(L)
(H)
to FFFF
)
H
H
(L)
4 - 19

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec q series

Table of Contents