7 Applied Instructions (Program Flow)
7.1 CJ / Conditional Jump
110
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
Timing chart
Relationship between master control instruction and jump instruction
The figure below shows the contents of operation and the relationship between the master control instruction.
Avoid using 2), 4) and 5) because the operation will be complicated.
Jump operation by
CJ instruction driven by X011
X012
Current value
of C0
1
2
3
Counter
is reset.
ON
In the same operating
cycle as the reset, the
reset status of counte
r
C0 is cleared.
X010
RST
C0
4
5
1
2
3
*1
*1
MC N 0 M 1
CJ P 1
MC N 0 M 0
P 1
CJ P 0
CJ P 2
P 2
CJ P 3
MCR N 0
P 3
1) Jump from outside MC to
outside MC is available
arbitrarily.
2) Jump from outside MC
to inside MC
Jump is executed
regardless of the MC
operation.
Even if M0 is OFF, M0 is
regarded as ON after P1.
3) Jump from inside MC to
inside MC
Jump is disabled while
M0 is OFF.
4) Jump from inside MC to
outside MC
Jump is disabled while
M0 is OFF.
Jump is executed while
M0 is ON, but MCR is
invalid.
CJ P 4
MCR N 0
MC N 0 M 2
P 4
MCR N 0
5) Jump from inside
MC to inside
other MC
Jump is enabled while M1 is ON.
In circuits after jump, M2 is regarded as ON
regardless of the actual ON/OFF status of M2.
And the first MCR is ignored.
Master control
P 0
Master control Master control