4 - 21
Nested "MC to MCR" Program Example
• The MC and MCR instructions can be nested as shown below.
Project name QB-9
Program name MAIN
0
2
N0
5
10
N1
13
18
19
21
22
24
N0
27
29
30
32
X5
X2
X6
M6
X3
M7
X7
X8
X0
X4
X1
X9
M6
M8
Y70
MC N0 M6
K5
C0
K100
TO
Y71
MC N1 M7
MCR N1
MCR N0
SET Y72
MC N0 M8
RST Y72
MCR N0
Y73
Y74
N1 N0
N0
1
2
3
a
b
c
d
1
• The "MC to MCR" program
a
is nested under the "MC to MCR" program
b
. (It
is called "nested structure".)
In this case;
1) Assign the nesting number (N) of the MC instructions in ascending order.
2) Assign the nesting number (N) of the MCR instructions used for the MC in
descending order.
2
• The "MC to MCR" program
a
can be independent from the
c
program. The
same nesting numbers (N) can be used in the both programs.
• The internal relay number (M) must be changed for each MC instruction.
3
• As shown in the
d
program, the internal relay number M of MC can be used
as a contact.
Note) In GX Works2, the on/off status of the master control is displayed in the title tag on
the monitor screen.