Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
7 Applied Instructions (Program Flow)
7.1 CJ / Conditional Jump
108
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
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 pointer P8. While X000 is OFF, jump is executed. The program is sequentially
executed from first step, and jumps from 11th circuit to the pointer P9.
The jumped instruction is not executed.
1. Circuit example 1 for explain 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 jump area:
Even if the counting coil (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:
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:
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 program
shown on the left, 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, S1 OFF
X001, X002, X003 ON Y001, M1, S1 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
Countint 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).
Instruction
(MOV)
X011 OFF Instruction is not executed
during jump.
But MTR, HSCS, HSCR,
HSZ, SPD, PLSY and PWM
instructions continue their
operations.
X011 ON
X000
X001
X002
X004
X005
X006
X010
X011
X000
X013
P8:
P9:
1st circuit
11th circuit
CJ
EN ENO
p
RST
EN ENO
d
Y001
M1
X003
S1
OUT_T
EN ENO
TCoil
TValue
OUT_C
EN ENO
CCoil
CValue
P8
TC0
K10
TN246
OUT_T
EN ENO
TCoil
TValue
TC246
K1000
X007
RST
EN ENO
d
CN0
CC0
K20
MOV
EN
s
ENO
d
K3 D0
CJ
EN ENO
p
P9
X012
Y001
RST
EN ENO
d
RST
EN ENO
d
TN246
CN0