beautypg.com

Delta DVP-ES2 User Manual

Page 168

background image

D V P - E S 2 / S A 2 / S S 2 / S A2 / S X 2 / S E O p e r a t i o n M a n u a l - P r o g r a m m i n g

3 - 5 2

API Mnemonic

Function

06

FEND

The End of The Main Program (First End)

Controllers

ES2/EX2 SS2

SA2

SE

SX2

OP Descriptions Program

Steps

N/A

No contact to drive the instruction is required.

FEND: 1 step

PULSE 16-bit 32-bit

ES2/EX2 SS2

SA2

SE

SX2 ES2/EX2 SS2

SA2

SE

SX2 ES2/EX2 SS2

SA2

SE

SX2

Explanations:

1.

Use FEND instruction when the program uses either CALL instructions or interrupts. If no

CALL instruction or interrupts are used, use END instruction to end the main program.

2.

The instruction functions same as END instruction in PLC operation process.

3.

CALL subroutines must be placed after the FEND instruction. Each CALL 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 several FEND instructions are in use, place the subroutine and interruption service

programs between the final FEND and END instruction.

7.

When CALL instruction is executed, executing FEND before SRET will result in errors.

8.

When FOR instruction is executed, executing FEND before NEXT will result in errors.

This manual is related to the following products: