Mitsubishi Electronics FX3G 用户手册

下载
页码 964
238
FX
3S
/FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 Series
Programming Manual - Basic & Applied Instruction Edition
8 Program Flow – FNC 00 to FNC 09
8.7 FNC 06 – FEND / Main Routine Program End
2. In the case of CALL instruction
Cautions
1. When FEND instruction is programmed two or more times
Put a subroutine program or interrupt routine program between last FEND instruction and END instruction.
2. When CALL or CALLP instruction is used
Put a label after FEND instruction.  And the SRET instruction is required in every case.
3. When CALL or CALLP instruction is used
If FEND instruction is executed after CALL or CALLP instruction was executed and before SRET instruction is
executed, an error is caused.
4. When FOR instruction is used
If FEND instruction is executed after FOR instruction was executed and before NEXT instruction is executed, an error
is caused.
5. When the interrupt function (I) is used
Make sure to program an interrupt label (pointer) after FEND instruction.  And IRET instruction is required in every
case.
I100
P21
0
W
hen X
0
11
is O
N
W
hen X
011 is O
F
F
X011
Main routine
program
Main routine
program
Subroutine
program
Interrupt routine
program
FNC 01
CALL
P 21
FNC 06
FEND
END