Jump to Label (JMP) and Label (LBL)
This information applies to the CompactLogix 5370, ControlLogix 5570, Compact GuardLogix 5370, GuardLogix 5570, Compact GuardLogix 5380, CompactLogix 5380, CompactLogix 5480, ControlLogix 5580, and GuardLogix 5580 controllers.
The JMP and LBL instructions skip portions of ladder logic.
Available Languages
Ladder Diagram
Function Block
This instruction is not available in function block.
Structured Text
This instruction is not available in structured text.
Operands
Ladder Diagram
Operand | Format | Description |
JMP instruction | ||
Label name | label name | Enter the name for associated LBL instruction |
LBL instruction | ||
Label name | label name | Execution jumps to the references LBL instruction |
Description
When true, the JMP instruction skips to the referenced LBL instruction and the controller continues executing from there. When false, the JMP instruction does not affect ladder execution.
The JMP and LBL it references must be in the same routine.
The JMP instruction can move ladder execution forward or backward. Jumping forward to a label saves program scan time by omitting a logic segment until it is needed. Jumping backward lets the controller repeat iterations of logic.
IMPORTANT:
Be careful not to jump backward an excessive number of times. The watchdog timer could time out because the scan does not complete in time.
IMPORTANT:
Jumped logic is not scanned. Place critical logic outside the jumped zone.
A JMP instruction requires the associated label to exist before you:
- Download when working offline
- Accept edits when working online
The LBL instruction must be the first instruction on the rung.
A label name must be unique within a routine. The name can:
- Have as many as 40 characters
- Contain letters, numbers, and underscores (_)
Affects Math Status Flags
No.
Major/Minor Faults
None specific to this instruction. See Common Attributes for operand-related faults.
Execution
Ladder Diagram
Condition | Action |
Prescan | N/A |
Rung-condition-in is false | N/A |
Rung-condition-in is true | (For JMP) Execution jumps to the rung that contains the LBL instruction with the referenced label name. (For LBL) no action taken |
Postscan | N/A |
Example
Ladder Diagram
JMP
When the JMP instruction is enabled, execution jumps over successive rungs of logic until it reaches the rung that contains the LBL instruction with label_20.
LBL
Provide Feedback