Termination Instructions; Fend; Main Routine Program End - Mitsubishi MELSEC-Q/L Programming Manual

Table of Contents

Advertisement

5.6

Termination Instructions

5.6.1

FEND

Main routine program end

5.6.1
FEND
FEND
Setting
Internal Devices
Data
Bit
Word
––
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.)
0
Operation
Main routine
performed
when the CJ
instruction is
not executed
Main routine
P
Main routine
(a) When the CJ instruction is used
J
\
R, ZR
Bit
Jump caused
program
by the CJ instruction
CJ
P
Operation
performed
program
when the CJ
instruction is
FEND
executed
program
FEND
END
High
Basic
performance
U
\G
Word
––
CALL
P
Main routine
program
FEND
P
Subroutine
program
I
Interrupt program
END
(b) When there are subroutine and
interrupt programs
FEND
Process
LCPU
Redundant Universal
FEND
Zn
Constants
Other
1
2
3
4
5
6
7
8
163

Advertisement

Table of Contents
loading

Table of Contents