17.03.2014 Views

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>DVP</strong>-<strong>ES2</strong>/<strong>SA2</strong>/<strong>SS2</strong>/<strong>SA2</strong>/<strong>SX2</strong>/SE <strong>Operation</strong> <strong>Manual</strong> - Programming<br />

API Mnemonic Function<br />

06 FEND The End of The Main Program (First End)<br />

Controllers<br />

<strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SA2</strong><br />

SE <strong>SX2</strong><br />

OP Descriptions Program Steps<br />

N/A No contact to drive the instruction is required. FEND: 1 step<br />

PULSE 16-bit 32-bit<br />

<strong>SA2</strong><br />

<strong>SA2</strong><br />

<strong>SA2</strong><br />

<strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SX2</strong> <strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SX2</strong> <strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong><br />

SE<br />

SE<br />

SE<br />

<strong>SX2</strong><br />

Explanations:<br />

1. Use FEND instruction when the program uses either CALL instructions or interrupts. If no<br />

CALL instruction or interrupts are used, use END instruction to end the main program.<br />

2. The instruction functions same as END instruction in PLC operation process.<br />

3. CALL subroutines must be placed after the FEND instruction. Each CALL subroutine must<br />

end with the SRET instruction.<br />

4. Interrupt subroutines must be placed after the FEND instruction. Each interrupt subroutine<br />

must end with the IRET instruction.<br />

5. When using the FEND instruction, an END instruction is still required, but should be placed<br />

as the last instruction after the main program and all subroutines.<br />

6. If several FEND instructions are in use, place the subroutine and interruption service<br />

programs between the final FEND and END instruction.<br />

7. When CALL instruction is executed, executing FEND before SRET will result in errors.<br />

8. When FOR instruction is executed, executing FEND before NEXT will result in errors.<br />

3-52

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!