13.07.2015 Views

[Instruction] Contents

[Instruction] Contents

[Instruction] Contents

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.

Advanced Function <strong>Instruction</strong>FUN 68RTSRETURN FROM SUBROUTINEFUN 68RTS• This instruction is used to represent the end of a subroutine. Therefore it can only appear within thesubroutine area. Its input side has no control signal, so there is no way to serially connect any contacts.This instruction is self sustain, and is directly connected to the power line.• When PLC encounter this instruction, it means that the execution of a subroutine is finished. Therefore it willreturn to the address immediately after the CALL instruction, which were previously executed and willcontinue to execute the program.• If this instruction encounters any of the three flow control instructions MC, SKP, or JMP, then this instructionmay not be executed (it will be regarded as not exist). If the above instructions are used in the subroutineand causing the subroutine not to execute the RTS instruction, then PLC will halt the operation and set theM1933( flow error flag) to 1. Therefore, no matter what the flow is going, it must always ensure that anysubroutine must be able to execute a matched RTS instruction.• For the usage of the RTS instruction please refer to instructions for the CALL instruction.7-51

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

Saved successfully!

Ooh no, something went wrong!