Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
7 Applied Instructions (Program Flow)
7.1 CJ / Conditional Jump
109
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
1
Outline
2
Instruction List
3
Configuration of
Instruction
4
How to Read
Explanation of
Instructions
5
Basic Instruction
6
Step Ladder
Instructions
7
Applied Instructions
(Program Flow)
8
Applied Instructions
(Move and
Compare)
9
Applied Instructions
(Arithmetic and
Logical Operation)
10
Applied Instructions
(Rotation and
Shift Operation)
2. Circuit example 2 for explaining operations (when only an RST instruction for timer or
counter is jumped)
When X011 turns ON while the RST instruction
for the counter C0 is operating (X010 is ON), the
program execution jumps past the RST
instruction due to the CJ instruction.
In this jump status, the counter C0 remains
reset. Accordingly, the current value of C0
remains "0" even if X012 turns ON.
To clear this reset status, it is necessary to turn
OFF the RST instruction for counter C0. (Refer
to the program shown below.)
Timing chart
Program example for activating a timer and counter even during a jump
X010
X012
P0:
X011
CJ
EN ENO
p
RST
EN ENO
d
OUT_C
EN ENO
CCoil
CValue
CN0
CC0
K10
P0
Jump operation by
CJ instruction driven by X011
X012
Current value
of C0
1
2
3
Counter
is reset.
Because C0 remains
reset, its current value
remains unchanged
even if X012 turns ON.
ON
Remains reset
X010
RST
C0
1
2
M8000
Clears the reset status
of counter C0 during jump
X010
X012
P0:
X011
CJ
EN ENO
p
RST
EN ENO
d
OUT_C
EN ENO
CCoil
CValue
CN0
CC0
K10
P0
RST
EN ENO
d
CN0