10
- 23
10.3 Z(P).MBREQ
10
DEDICATED INSTRUCTIONS
(7) Program example
This section provides a program example for sending a request message (Mask Write
Register (FC: 22)) and writing a value OR-masked with 0008
H
to holding register
400003 of the slave (Station No. 1) on channel 2.
(a) Operation of the program example
(b) Frames to be sent/received with MBREQ instruction (in RTU mode)
1) Request message format (Master (QJ71MB91)
Slave)
2) Response message format
<Normal completion>
Figure 10.11 Configuration example for MBREQ instruction execution
Figure 10.12 Example of request message format to be sent
Figure 10.13 Response message format to be received (Normal completion)
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
4
2
5
3
1
6
7
(FG)
(FG)
RS-232
/485
RS-422
CH2
RDB
RDA
SDB
SG
SDA
CH1
QJ71MB91
RUN
RD
NEU.
SD
NEU.
RD
SD
CH1
CH2
ERR.
b15
b5
1
b15
b5
1
R
QJ71MB91
(master)
MODBUS
slave device
(station No. 1)
CH2 (RS-422 or RS-485)
<OR mask value>
<Holding register 400003>
Mask write (OR)
b3
b0
b3
b0
Data
(L)
(L)
(L)
Address field
Target
station No.
Function code
Function code
Target holding register number
00
H
02
H
AND mask value
01
H
00
H
00
H
00
H
OR mask value
(0008
H
)
08
H
Transmission order
7 bytes
16
H
(H)
(H)
(H)
Data
(L)
(L)
(L)
Address field
Host
station No.
01
H
Function code
Function code Target holding register number
00
H
00
H
00
H
00
H
02
H
AND mask value
OR mask value
(0008
H
)
08
H
7 bytes
Reception order
16
H
(H)
(H)
(H)
Summary of Contents for QJ71MB91
Page 1: ......
Page 2: ......
Page 366: ...App 14 Appendix 4 External Dimensions APPENDICES Memo ...
Page 371: ......
Page 372: ......