Mitsubishi Electronics FX3G User Manual

Page of 964
223
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
5. Label unnecessary for the pointer P63
The pointer P63 specifies jump to END step.  Do not program P63.
If P63 is programmed, PLCs will display the error code 6507 (defective label definition) and stop.
6. When jumping to a pointer for subroutine
Any label cannot be shared by CALL instruction and CJ instruction.
7. Unconditional jump if the command contact is normally ON
Because M8000 is normally ON while a PLC is operating, unconditional jump is specified when M8000 is used in the
following example:
Label
P  63
FNC 00
CJ
P 63
END
Do not program P63.
X000
M8000
K10
FNC 01
CALLP
C0
X001
P15
FNC 06
FEND
RUN monitor
(normally ON)
FNC 02
SRET
P15
Label
User program
Command
Subroutine program
dedicated to CALL
instruction
Program a label (P) after
FEND instruction.
FNC 00
CJ
P15
Good
Bad
FNC 00
CJ
P5
Label
P5
M8000
User program
(It is skipped, and is not executed.)
User program
RUN monitor