221
FX3G/FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
8 Program Flow – FNC 00 to FNC 09
8.1 FNC 00 – CJ / Conditional Jump
1
Introduction
2
Overview
3
Instruction
List
4
Devices
in Detail
5
Specified the
Device &
Constant
6
Before
Programming
7
Basic
Instruction
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
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 a 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