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

Скачать
Страница из 1204
5-51
FEND
1
2
3
4
5
6
7
8
5
.6 Ter
m
ination Instru
ctions
5
.6.1 End main routine pr
ogram (
F
END
)
5.6  
Termination Instructions
5.6.1  
End main routine program (FEND)
FEND
Function
(1) The FEND instruction is used in cases where the CJ instruction or other instructions are 
used to cause a branch in the sequence program operations, and in cases where the main 
routine program is to be split from a subroutine program or an interrupt program.
(2) Execution of the FEND instruction will cause the CPU module to terminate the program it 
was executing.
(3) Even sequence programs following the FEND instruction can be displayed in ladder display 
at a peripheral device.
(Peripheral devices continue to display ladders until encountering the END instruction.)
Setting 
Data
Internal Devices 
R, ZR
J
\
U
\G
Zn
Constants
Other
Bit
Word
Bit
Word
––
––
Basic
Process
High
performance
Redundant Universal
FEND
FEND
CJ
FEND
FEND
END
0
P
(a) When the CJ instruction is used
CALL
FEND
Interrupt program
END
P
P
I
P
Operation 
performed 
when the CJ 
instruction is 
not executed
Main routine 
program
Main routine 
program
Main routine 
program
Main routine 
program
Subroutine 
program
Jump caused 
by the CJ instruction
Operation 
performed 
when the CJ 
instruction is 
executed
(b) When there are subroutine and 
      interrupt programs