Mitsubishi Electronics FX3G User Manual

Page of 964
225
FX
3S
/FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 Series
Programming Manual - Basic & Applied Instruction Edition
8 Program Flow – FNC 00 to FNC 09
8.1 FNC 00 – CJ / Conditional Jump
1
Introdu
ction
2
Ov
ervi
ew
3
Instruction 
Li
st
4
D
evices 
in Det
ai
l
5
Specifi
ed the
De
vice
 &
 
C
onst
ant
6
Bef
ore
 
Pr
og
ra
mmi
ng
7
Bas
ic 
Instruction
8
FN
C00-FN
C0
9
Program Fl
ow
9
FNC
10-FN
C19
Mov
e & Com
pare
10
FNC
20-FNC
29
Arith. & Lo
gi
Operati
on
8.1.1
CJ instruction and operations of contact and coil
In the program example shown below, when X000 turns ON, the program execution jumps from CJ instruction in the
first circuit to the label P8.
While X000 is OFF, jump is not executed; The program is executed from the 1st step in turn, and then the program
execution jumps from CJ instruction in the 11th circuit to the label P9.
Instructions skipped by jump are not executed.
1. Circuit example 1 for explaining operations
• Double coil operation of output Y001
While X000 is OFF, output Y001 is activated by X001.
While X000 is ON, output Y001 is activated by X012.
Even in a program divided by conditional jumps, if the same
coil (Y000 in this case) is programmed two or more times
within the jump area or outside the jump area, such a coil is
handled as double coil.
• When the reset (RST) instruction for the retentive type timer 
T246 is located outside the jump area
Even if the counting coil (OUT T246) is jumped, reset (return
of the contact and clearing of the current value) is valid.
• When the reset (RST) instruction for the counter C0 is 
located outside the jump area
Even if the counting coil is jumped, reset (return of the
contact and clearing of the current value) is valid.
• Operation of the routine timers T192 to T199
A routine timer continues its operation even if it is jumped
after the coil is driven, and the output contact is activated.
• Operation of the high-speed counters C235 to C255
A high-speed counter continues its operation even if it is
jumped after the coil is driven, and the output contact is
activated.
When each input changes during jump in the above
program, each coil executes the following operation:
Classification
Contact status before jump
Coil operation during jump
Y, M, S
(Y001, M1, S1)
X001, X002, X003 OFF
Y001, M1 and S1 turn OFF.
X001, X002, X003 ON
Y001, M1 and S1 turn ON
10 ms timer and 
100 ms timer (T0)
X004 OFF
Timer is not activated.
X004 ON
Counting is paused (, and is restarted after X000 turns OFF).
1 ms timer 
(T246)
X005 OFF
X006 OFF
Timer is not activated.
The deactivation status is reset when X013 turns ON.
X005 OFF
X006 ON
Counting is continued (, and the contact is activated after X000 turns OFF).
Counter 
(C0)
X007 OFF
X010 OFF
Counting is not activated.
The deactivation status is reset when X013 turns ON.
X007 OFF
X010 ON
Counting is paused (, and is restarted after X000 turns OFF).
Applied instruction 
(MOV)
X011 OFF
FNC instruction is not executed during jump.
But instructions FNC 52 to FNC 58 continue their operations.
X011 ON
X000
X001
Y001
X002
M 1
X003
S 1
X004
T 0
X005
RST
T246
X006
T246
X007
RST
C  0
X010
C 0
X011
FNC 12
MOV
K  3
D  0
X000
X012
Y001
X013
RST
T246
RST
C  0
Label
P  8
Label
P  9
FNC 00
CJ
P  8
FNC 00
CJ
P  9
K 10
K1000
K 20
1st
circuit
0
4
6
8
11
15
18
22
25
29
35
40
42
11th
circuit