Mitsubishi Electronics FX3G User Manual

Page of 964
221
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
FNC 00 – CJ / Conditional Jump
Outline
CJ or CJP instruction jumps to a pointer (P); The sequence program steps between CJ or CJP instruction and the
pointer are not executed.
CJ and CJP instructions reduce the scan time, and allow programs with double coils.
1. Instruction format
2. Set data
3. Applicable devices
Explanation of function and operation
1. 16-bit operation (CJ and CJP)
While the command input is ON, CJ or CJP instruction executes a program with a specified label (pointer number).
1) In the case of CJ instruction
2) In the case of CJP instruction
Operand type
Description
Data type
Pointer number (P) indicating the label number for the jump destination
(FX
3S
: n=0 to 255, FX
3G
/FX
3GC
: n=0 to 2047, FX
3U
/FX
3UC
: n=0 to 4095) 
(P63 jumps to END instruction.)
Pointer number
Oper-
and 
Type
Bit Devices
Word Devices
Others
System User
Digit Specification
System User
Special 
Unit
Index
Con-
stant
Real 
Number
Charac-
ter String
Pointer
X Y M T C S D .b KnX KnY KnM KnS T C D R U \G
V Z Modify K H
E
" "
P

P
FNC 00
CJ
16-bit Instruction
3 steps CJ
CJP
Continuous
Operation
Pulse (Single)
Operation
Mnemonic
Operation Condition
Mnemonic
Operation Condition
32-bit Instruction
  
Pn
  
Pn
FNC 00
CJ
Label
Command
User program
User program
which is skipped and is not executed when the command turns ON
User program
Executed in every scan.
Command
input
CJ
ON
Jumps to the pointer while the
command is ON.
Pn ‚
Pn ‚
FNC 00
CJP
Pn
Label
Command
User program
User program
which is skipped and is not executed in one operation cycle
when the command turns ON
User program
Jumps to the pointer only in one
operation while the command is ON.
Executed in one scan.
Command
input
CJP
ON
Pn ‚
Pn ‚