Mitsubishi Electronics 13JW55 Network Card User Manual


 
4 - 24
4.7 FEND
/ CJ / SCJ / CALL / RET
Project name QB-10
Program name MAIN
4.7.1 FEND F end
FEND
FEND is a 1-step instruction.
• Use the FEND instruction as the END instruction under the following conditions;
1) When a sequence program must be executed and terminated in each program
block.
For example, use the FEND instruction with the CJ and SCJ instructions.
2) When using subroutine programs (CALL and RET instructions)
3) When using an interrupt program
• After each execution of the FEND instruction, the programmable controller
processes the current value of the timer and counter and executes self-diagnostic
check, and then re-operates from the step 0.
0
P**
CJ
P**
FEND
Sequence program
Operation
when CJ is
not executed
Jump by CJ
Operation when
CJ is executed
END
Sequence program
Sequence program
P**
I**
CALL P**
Sequence program
FEND
Subroutine program
Interrupt program
END
(a) When operating in each program block
by the CJ instruction
(b) When using the subroutine
and interrupt programs
NOTE
• There is no limit on the number of the FEND instructions in a sequence program,
however, they cannot be used in the subroutine and interrupt programs.
• The FEND instruction cannot be used to terminate the main or sub sequence
program.
Make sure to use the END instruction for the end of a whole program.
REFERENCE
The interrupt program stops the current process and processes an interrupt
upon receiving an interrupt request while a normal program is being processed.