
Chapter 4. Basic instructions
4-14
2) Program example
Use 2 master control blocks (MCS 0 and MCS 1), and they are cleared with MCSCLR 0 instruction. The
MCS 1 block is cleared automatically.
( P060 )
P030
P031
[
END
]
P032
P033
[
MCS 0
]
( P061 )
[
MCS 1
]
M0001
( P062 )
M0002
( P063 )
[
MCSCLR 0
]
MCS 0 block
MCS 1 block
0000
0002
0004
0006
0008
0010
0012
0013
1. Scanning between the MCS and MCSCLR instructions is executed even when the On/Off
command for the MCS instruction is off. Therefore, scan time does not become shorter.
2. When On/Off command for the MCS instruction is off, the operation result of MCS to MCSCLR is
as indicated below.
TIMER
The timer output contact turns off and the current value
becomes 0.
COUNTER
The counter output contact turns off but the current value
holds the present value.
OUT
All turns off
SET, RST
Hold present value
3. If an instruction which does not need a contact instruction immediately before it (FOR, NEXT, EI,
DI, etc.) is contained in the MCS ~ MCSCLR block, the CPU executes the instruction regardless of
the status of the On/Off command for the MCS instruction.
Remark