Mitsubishi Electronics FX3G User Manual

Page of 964
222
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
Cautions
1. Relationship between the label input position and the list program
The figure below shows programming of a label.
When creating a circuit program, move the cursor to the left side of the bus line in the ladder diagram, and input a label
(P) at the head of the circuit block.
2. Programming a label in a smaller number step than CJ instruction
A label can be programmed in a smaller number step than CJ instruction.  However, note that a watchdog timer error
occurs when the scan time exceeds 200 ms (default setting).
3. Jumping to one label from two or more CJ instructions
When the pointer number in operands is same and there is one label, the following operation is caused:
When X020 turns ON, the program execution jumps from CJ instruction corresponding to X020 to the label P9.  When
X020 turns OFF and X021 turns ON, the program execution jumps from CJ instruction corresponding to X021 to the
label P9.
4. Using a label (P) two or more times
When a label number (including labels for CALL instructions described later) is used two or more times, an error is
caused.
X030
Label
P  20
X031
X032
Y011
Y010
FNC 00
CJ
P 20
LD
X030
CJ
P 20
LD
X031
OUT Y010
P 20
LD
X032
OUT Y011
Pointer
Label
Bus
line
Label
P  10
X022
FNC 00
CJ
P 10
X020
X021
Label
P  9
FNC 00
CJ
P  9
FNC 00
CJ
P  9
P 9
Label
FNC 00
CJ
P 9
END
User program
X030
X020
P 9
FNC 00
CJ
P 9
Label
User program
Good
Good
Bad