6 Application Instructions API 00-49 API 06 Explanations: 1. This instruction denotes the end of the main program. It has the same function as that of END instruction when 2. CALL must be written after FEND instruction and add SRET instruction in the end of its subroutine. Interruption being executed by PLC. program has to be written after FEND instruction and IRET must be added in the end of the service program. 3. If several FEND instructions are in use, place the subroutine and interruption service programs between the final FEND and END instruction. 4. After CALL instruction is executed, executing FEND before SRET will result in errors in the program. 5.
After FOR instruction is executed, executing FEND before NEXT will result in errors in the program. CJ Instruction Program Flow: 0 The program flow when X0=off, X1=off main program The program flow when X=On and the program jumps to P0. X0 X1 main program P0 main program P63 CALL instruction subroutine I301 Interruption subroutine DVP-PLC Application Manual 6-14 Mnemonic Function FEND The End of The Main Program (First End) OP Descriptions Program Steps N/A No contact to drive the instruction is required. FEND: 1 steps PULSE 16-bit 32-bit SA SX SC EH E SV S H3 ES V2 EH3 ES EX SS SA SX SC EH SV EH3 SV2 ES E X SS EX SS SA SX SC EH SV SV2 CJ P0 CALL P63