beautypg.com

Advanced instruction set chapter 6 – Rockwell Automation 1772-LV Mini-PLC - 2/15 Programmable Controller (Series B) Programming and Operations User Manual

Page 73

background image

Advanced Instruction Set

Chapter 6

6Ć16

A maximum of eight subroutines can be programmed in the subroutine area.
Each subroutine begins with a label instruction and (when you want to exit to
your main program) ends with a return instruction. We will discuss jump, label,
and return instructions later in this section.

Subroutine Area Instruction

Symbol: SBR

Purpose: Serves as an end of program statement for the main program
(Figure 6.8).

Figure 6.8

Advance Data Instruction Format (General)

112

00

JSR

01

Rung 1

RET

Rung 7

114

06

U

012

11

Rung 3

112

02

10

013

Rung 2

116

11

U

200

17

Rung 4

116

02

116

13

Subroutine Area

LBL

01

114

06

012

11

Rung 5

116

11

116

12

116

13

EN

200

17

DN

200

15

Rung 6

Block

Format

Instruction

NOTE: The block format instruction can be any file, sequencer, or block transfer instruction.