5. SEQUENCE INSTRUCTIONS
5
−
34
MELSEC-A
5.6 Termination Instructions
5.6.1 Main routine program termination
(FEND)
Available Device
Bit device
Word (16-bit) device
Constant
Pointer Level
Ca
rr
y
fla
g
Err
o
r
fla
g
X Y M L S B F T C D W R A0
A1 Z V K H P I N
D
igit specification
Inde
x
M9012 (M9010, M9011)
O
Functions
(1) Terminates the main routine program.
(2) When the FEND instruction is executed, the PC returns to step 0 after the
processing (such as timer/counter processing and self-diagnostic check) after
the execution of END instruction, and resumes operation from step 0.
(3) The sequence program located after FEND instruction can also be displayed on
the GPP. (The GPP displays a circuit up to the END instruction.)
Operation Errors
In the following cases, operation error occurs and the PC stops its operation.
•
After the CALL(P) instruction is executed, the FEND instruction has been executed
before executing the RET instruction.
•
After the FOR instruction is executed, the FEND instruction has been executed
before executing the NEXT instruction.
Applicable
CPU
All CPUs
FEND
Operation when
CJ instruction is
not exectuted
Main routine
program
Main routine
program
Main routine
program
Jump by CJ
instruction
Operation when
CJ instruction is
executed
(a) By use of CJ instruction
Main routine
program
Subroutine
program
Interrupt program
(b) There are subroutine program
and interrupt program
Содержание MELSEC-A series
Страница 1: ......
Страница 2: ......
Страница 13: ...A 11 MEMO...
Страница 505: ...APPENDICES APP 100 MELSEC A MEMO...
Страница 507: ......
Страница 508: ......