Справочник Пользователя для Mitsubishi Electronics FX

Скачать
Страница из 382
FX Series Programmable Controlers
Applied Instructions 5
5-5
5.1.1
CJ (FNC 00)
Mnemonic
Function 
Operands
Program steps
D
CJ
FNC 00
(Conditional 
Jump)
Jumps to the
identified pointer
position
Valid pointers from the range 0 to 63
CJ, CJP:3steps
Jump pointer
P
PP
: 1 step
FX
0(S)
FX
0N
FX FX
(2C)
FX
2N(C)
P9 
CJ
P9
X20
[ D ]
X21
P 9
P 9
CJ
P9
X20
CJ
X1
P 0
CJ
P0
X0
M8000
Y1
Y0
END
FX
(2C)
FX
FX
2N(C)
FX
0N
FX
0(s)
PULSE-P
FX
(2C)
FX
FX
2N(C)
FX
0N
FX
0(s)
16 BIT OPERATION
FX
FX
0N
FX
0(s)
FX
(2C)
FX
2N(C)
32 BIT OPERATION
Operation:
When the CJ instruction is active it forces the program
to jump to an identified program marker. While the
jump takes place the intervening pro-gram steps are
skipped. This means they are not processed in any
way. The resulting effect is to speed up the programs
operational scan time.
Points to note:
a) Many CJ statements can reference a single pointer.
b) Each pointer must have a unique number. Using
pointer P63 is equivalent to jumping to the END
instruction.
c) Any program area which is skipped, will not update
output statuses even if the input devices change.
For example, the program opposite shows a
situation which loads X1 to drive Y1. Assuming X1
is ON and the CJ instruction is activated the load
X1, out Y1 is skipped. Now even if X1 is turned
OFF Y1 will remain ON while the CJ instruction
forces the program to skip to the pointer P0. The
reverse situation will also apply, i.e. if X1 is OFF to
begin with and the CJ instruction is driven, Y1 will
not be turned ON if X1 is turned ON. Once the CJ
instruction is deactivated X1 will drive Y1 in the
normal manner. This situation applies to all types of
outputs, e.g. SET, RST, OUT, Y, M and S devices
d) The CJ instruction can jump to any point within the main program body or after an FEND
instruction