6 SEQUENCE INSTRUCTIONS
6.6 Termination Instructions
161
6
6.6
Termination Instructions
Ending the main routine program
FEND
This instruction is used to branch operation of the sequence program by the CJ instruction or to divide the main routine
program into a subroutine program or an interrupt program.
Processing details
• This instruction branches operation of the sequence program by the CJ instruction or dividing the main routine program into
subroutine programs and interrupt programs.
• When this instruction is executed, program execution returns to the program at step 0 after output processing, input
processing and refreshing of the watchdog timer.
• The sequence program from this instruction onwards can also be displayed as ladder by the engineering tool.
(Left: When the CJ instruction is used, Right: When there are subroutine programs and interrupt programs)
Operation error
Ladder diagram
Structured text
Not supported.
FBD/LD
Not supported.
A: Main routine program
B: Subroutine program
C: Interrupt Program
(1): Operation when the CJ instruction is not executed
(2): Jump by the CJ instruction
(3): Operation when the CJ instruction has been executed
Error code
(SD0/SD8067)
Remarks
3340H
The FEND instruction is executed before the NEXT instruction after the FOR instruction is executed.
3381H
The FEND instruction is executed before the RET instruction after the CALL(P) instruction is executed.
33E3H
The FEND instruction is programmed between FOR-NEXT.
33E4H
The FEND instruction is programmed between MC-MCR.
33E5H
The FEND instruction is programmed between STL-RETSTL.
33E7H
The FEND instruction is programmed between I-IRET.
3100H
The FEND instruction is programmed in standby type program.
The FEND instruction is programmed in FB file.
CJ
FEND
FEND
END
0
P**
P**
CALL
FEND
END
(2)
(3)
(1)
P**
P**
I**
A
A
A
B
C
A
Summary of Contents for MELSEC iQ-F FX5
Page 1: ...MELSEC iQ F FX5 Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 17: ...15 CONTENTS ...
Page 24: ...22 MEMO ...
Page 1050: ...1048 26 TIME DATA FUNCTIONS 26 4 Division MEMO ...
Page 1068: ...1066 29 COUNTER FUNCTION BLOCKS 29 4 Counter Function Block Operation error There is no error ...
Page 1107: ...I 1105 MEMO ...
Page 1111: ......