Return (Ret); Relay Ladder - Allen-Bradley Logix5000 Reference Manual

1756 controllogix, 1768 compactlogix, 1769 compactlogix, 1789 softlogix, 1794 flexlogix, powerflex 700s with drivelogix
Hide thumbs Also See for Logix5000:
Table of Contents

Advertisement

Chapter 12
For/Break Instructions (FOR, FOR...DO, BRK, EXIT, RET)

Return (RET)

Description:
Arithmetic Status Flags:
Fault Conditions:
Condition:
Prescan
Rung-condition-in is false
Rung-condition-in is true
Postscan
490
The RET instruction returns to the calling FOR instruction.
Operands:

Relay Ladder

None
IMPORTANT
When enabled, the RET instruction returns to the FOR instruction. The FOR
instruction increments the Index value by the Step size and executes the
subroutine again. If the Index value exceeds the Terminal value, the FOR
instruction completes and execution moves on to the instruction that follows the
FOR instruction.
The FOR instruction does not use parameters. The FOR instruction ignores any
parameters you enter in a RET instruction.
You could also use a TND instruction to end execution of a subroutine.
Not affected
A major fault will occur if
Main routine contains a RET instruction
Execution:
Relay Ladder Action
The rung-condition-out is set to false.
The rung-condition-out is set to false.
Returns the specified parameters to the calling routine.
The rung-condition-out is set to true.
The rung-condition-out is set to false.
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Do not place a RET instruction in the main routine. If you place a RET
instruction in the main routine, a major fault occurs
(type 4, code 31).
Fault type
4
Fault code
31

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents