5. SEQUENCE INSTRUCTIONS
5
−
37
MELSEC-A
(4) Use the END and FEND instructions in the main routine program, subroutine
program, interrupt program, and subsequence program as shown below.
Fig. 5.1 Use of the END (FEND) Instructions
(5) If the END instruction is not given in the program, operation error occurs and the
PC does not run. If parameters are used to set subprogram capacity, operation
error occurs when the END instruction is not given in the subprogram.
Operation Errors
In the following cases, operation error occurs and the PC stops its operation.
(1) Jump has been made to a step below the END instruction by the CJ, SCJ, or
JMP instruction.
(2) The subroutine program or interrupt program located below the END instruction
has been executed.
Main routine program
Subroutine program
(FEND instruction is always required.)
Main sequence program
area
Interrupt program
(END instruction is always required.)
Main routine program
(FEND instruction is always required.)
Subroutine program
Subsequence program
area
Interrupt program
(END instruction is always required.
FEND
END
FEND
END
Summary of Contents for MELSEC-A series
Page 1: ......
Page 2: ......
Page 13: ...A 11 MEMO...
Page 505: ...APPENDICES APP 100 MELSEC A MEMO...
Page 507: ......
Page 508: ......