EasyManua.ls Logo

Mitsubishi Electric MELSEC-Q/L - Termination Instructions

Mitsubishi Electric MELSEC-Q/L
1084 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
5 SEQUENCE INSTRUCTIONS
5.6 Termination Instructions
177
5
5.6 Termination Instructions
Main routine program end
FEND
Processing details
The FEND instruction is used in cases where the CJ instruction or other instructions are used to create 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.
Execution of the FEND instruction will cause the CPU module to terminate the program it was executing.
Even sequence programs following the FEND instruction can be displayed in ladder display at a programming tool.
(Programming tool continues to display ladders until encountering the END instruction.)
Operation error
In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
Setting
data
Internal device R, ZR J\ U\G Zn Constant Others
Bit Word Bit Word

Error
code
Error details Q00J/
Q00/
Q01
QnH QnPH QnPRH QnU LCPU
4200 The FEND instruction was executed after the execution of the FOR
instruction, and before the execution of the NEXT instruction.

4211 The FEND instruction was executed after the execution of the CALL, FCALL,
ECALL, or EFCALL instruction, and before the execution of the RET
instruction.

4221 The FEND instruction was executed before the execution of the IRET
instruction in an interrupt program.

4230 The FEND instruction was executed between the CHKCIR and CHKEND
instructions.

4231 The FEND instruction was executed between the IX and IXEND instructions. 
Basic
Process
High
performance
Redundant
Universal
LCPU
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

Table of Contents

Related product manuals