Relay Ladder; 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)
Example 1:
Routine
Main routine
Subroutine
Routine
Main routine
Subroutine
The JSR instruction passes value_1 and value_2 to routine_1.
The SBR instruction receives value_1 and value_2 from the JSR instruction and
copies those values to value_a and value_b, respectively. Logic execution
continues in this routine.
The RET instruction sends float_a to the JSR instruction. The JSR instruction
receives float_a and copies the value to float_value_1. Logic execution continues
with the next instruction following the JSR instruction.

Relay Ladder

Program
[Other rungs of code]

Structured Text

Program
JSR(routine_1,2,value_1,value_2,float_value_1);
SBR(value_a,value_b);
<statements>;
RET(float_a);
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Chapter 11
459

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents