Relay Ladder And Structured Text - 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

Program Control Instructions (JMP, LBL, JSR, RET, SBR, JXR, TND, MCR, UID, UIE, AFI, NOP, EOT, SFP, SFR, EVENT)
Main Routine
Arithmetic Status Flags:
Fault Conditions:
A Major Fault Will Occur If
JSR instruction has fewer input parameters than SBR instruction
JSR instruction jumps to a fault routine
RET instruction has fewer return parameters than JSR instruction
Main routine contains a RET instruction
Execution:
Condition
Prescan
Rung-condition-in is false to
the JSR instruction
Rung-condition-in is true
EnableIn is set
There are no restrictions, other than controller memory, on the number of nested
routines you can have or the number of parameters you pass or return.
action_1
JSR
Arithmetic status flags are affected.

Relay Ladder and Structured Text

Relay Ladder Action
The controller executes all subroutines regardless of rung condition. To ensure that all rungs in the subroutine are
prescanned, the controller ignores RET instructions. (that is, RET instructions do not exit the subroutine.)
· Release 6.x and earlier, input and return parameters are passed.
· Release 7.x and later, input and return parameters are not passed.
If recursive calls exist to the same subroutine, the subroutine is prescanned only the first time. If multiple calls exist
(non-recursive) to the same subroutine, the subroutine is prescanned each time.
The rung-condition-out is set to false (relay ladder only).
The subroutine does not execute.
Outputs in the subroutine remain in their last state.
The rung-condition-out is set to false.
The instruction executes.
The rung-condition-out is set to true.
N/A
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Level 1
Level 2
subroutine action_1
subroutine action_2
SBR
SBR
action_2
JSR
RET
Structured Text Action
N/A
N/A
EnableIn is always set.
The instruction executes.
Level 3
subroutine action_3
SBR
action_3
JSR
RET
Fault Type
Fault Code
4
31
4 or user-supplied
0 or user-supplied
4
31
4
31
Chapter 11
RET
457

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents