Chapter 7 Second Development PlatformVP3000
337
No. Example
MODRW instruction
S
1
S
2
S
3
S n
Station
number
Command
code
Address Register Length
12
Write C0–C3 status of PLC slave, 4
records in total. And the written data are
bit0–bit3 of D4.
K20 HF HE00 D4 K4
13
Write T0–T3 count values of PLC slave,
4 records in total. And the written data
are D10–D13.
K20 H10 H600 D10 K4
14
Write C0–C3 count values of PLC slave,
4 records in total. And the written data
are D20–D23.
K20 H10 HE00 D20 K4
15
Write D0–D3 count values of PLC slave,
4 records in total. And the written data
are D30–D33.
K20 H10 H1000 D30 K4
Example
PLC triggers M0 to be ON when it starts, and sends the instruction to execute one MODRW.
After receiving a response from the slave device, if the instruction is correct, then ROL is
executed once, and M1 becomes ON.
After receiving a response from the slave device, delays 10 PLC scan cycles, trigger M50 = 1,
and then MODRW is executed once again.
After receiving a response from the slave device again, if the instruction is correct, then ROL is
executed once, and M2 becomes ON (M2 can be defined as repeat M), K4M0 becomes K1
again, that is, only M0 is 1, and the instructions can be sent cyclically. If you want to add
instructions to be sent, you just have to add instructions in the dotted line box, and replace the
M of repeat M to be Mn+1.