680
Subroutines Section 3-18
The step instructions, STEP(008) and SNXT(009) cannot be used in subrou-
tines.
Example When CIO 0.00 is ON in the following example, subroutine 10 is executed and
program execution returns to the next instruction after the SBS(091) or
MCRO(099) instruction that called the subroutine.
3-18-4 SUBROUTINE RETURN: RET(093)
Purpose Indicates the end of a subroutine program. Used in combination with
SBN(092) to define a subroutine region.
Ladder Symbol
Variations
Applicable Program Areas
Description RET(093) indicates the end of a subroutine and SBN(092) indicates the
beginning of a subroutine. See 3-18-3 SUBROUTINE ENTRY: SBN(092) for
more details on the operation of subroutines.
When program execution reaches RET(093) it is automatically returned to the
next instruction after the SBS(091) or MCRO(099) instruction that called the
subroutine. When the subroutine has been called by MCRO(099), the output
data in A604 through A607 is written to D through D+3 before program execu-
tion is returned.
Not allowed
OR
10
10
10
0.00
Subroutine 10
RET(093)
Variations Executed Each Cycle for ON Condition RET(093)
Immediate Refreshing Specification Not supported
Block program areas Step program areas Subroutines Interrupt tasks
Not allowed Not allowed OK OK