Jump (jmp) and label (lbl) – Rockwell Automation 1761-HHP-B30 MicroLogix 1000 with Hand-Held Programmer (HHP) User Manual
Page 218

Chapter 12
Using Program Flow Control Instructions
12–2
Use these instructions in pairs to skip portions of the ladder program.
If the Rung Containing the
Jump Instruction is:
Then the Program:
True
Skips from the rung containing the JMP instruction to the rung
containing the designated LBL instruction and then continues
executing. You can jump forward or backward.
False
Does not execute the JMP instruction.
Jumping forward to a label saves program scan time by omitting a program
segment until needed. Jumping backward lets the controller execute program
segments repeatedly.
Important: Be careful not to jump backwards an excessive number of
times. The watchdog timer could time out and fault the
controller. Use a counter, timer, or the “program scan” register
(system status register, word S3, bits 0–7) to limit the amount of
time you spend looping inside of JMP/LBL instructions.
Entering Parameters
Enter a decimal label number from 0 to 999. You can place up to 1,000
labels in each subroutine file.
Using JMP
The JMP instruction causes the controller to skip rungs. You can jump to the
same label from one or more JMP instruction.
Entering the Instruction
You enter the instruction from within the program monitor functional area.
Asterisks appear on the display to indicate that the HHP is waiting for data
entry (i.e., a number).
P 0 1 1
J M P
L B L #
2
Using LBL
This input instruction is the target of JMP instructions having the same label
number. This instruction has no control bits.
Important: You must program this instruction as the first instruction of a
rung. (Since it must be the first instruction on the rung, the
LBL instruction is also known as LD LBL.)
(JMP)
]LBL[
2
False
9.04
True
6.78
JMP
1.45
0.99
LBL
Execution Times (
µ
sec) when:
Ladder representation:
2
Jump (JMP) and
Label (LBL)
3
U
ANB
0
ENT
1
FUN
To enter the function code, press: