E L C P r o g r a m m i n g M a n u a l
F o r m o r e i nf o r m a t i o n v i sit :
w w w. e a t o n . c o m
MN05003003E
3-44
API Mnemonic
Function
06
FEND
Terminate the Main Routine Program
OP Range
Program
Steps
N/A Instruction driven by contact is not necessary.
FEND: 1 steps
ELC ELCB
ELCM
PB PC/PA/PH
PV
PB PH/PA
32 16
P
32 16
P
32 16
P
32 16 P 32 16 P
Description:
1.
Use the FEND instruction when the application uses either standard subroutines or interrupt
routines. If subroutines are not used then use the END instruction to end the main program.
2.
This instruction denotes the end of the main program when subroutines are used. It has the
same function as the END instruction during ELC operation.
3.
Subroutines must be placed after the FEND instruction. Each subroutine must end with the
SRET instruction.
4.
Interrupt subroutines must be placed after the FEND instruction. Each interrupt subroutine
must end with the IRET instruction.
5.
When using the FEND instruction, an END instruction is still required, but should be placed as
the last instruction after the main program and all subroutines.
6.
If using several FEND instructions, place the subroutines between the FEND and END
instructions.
7.
During execution of a subroutine, if a FEND instruction is scanned before the SRET instruction,
an error will occur.
8.
During execution of a FOR instruction, if a FEND instruction is scanned before the NEXT
instruction, an error will occur.
Summary of Contents for ELC-PB
Page 1: ......
Page 5: ...For more information visit www eaton com MN05003003E iv...
Page 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Page 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Page 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Page 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...