Define an LBL and insert a JMP for the LBL

LBL and JMP skip portions of ladder logic. JMP controls the execution of a diagram and LBL is the target for JMP.
LBL and JMP are supported in ladder diagram (LD) programs.
  • When True, JMP skips to the referenced LBL and the controller continues executing from there.
  • When False, JMP does not affect ladder execution.
JMP moves the 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:
  • Don't jump backward an excessive number of times because this might prevent the scan cycle from completing, causing the watchdog timer to time out.
  • Jumped logic is not scanned. Place critical logic outside the jumped zone.
The following rules apply to LBL and JMP:
  • LBLs can be any length and must begin with a letter or underscore, followed by letters, digits, or underscores. Spaces and special characters, such as "+", "-", or "\", are not allowed.
  • Before inserting a JMP, define one or more LBLs within the program.
  • Place LBLs on the left of a diagram.
  • JMP and the LBL it references must be in the same Program Organization Unit (POU).
To define an LBL and insert a JMP for the LBL
  1. From
    Toolbox
    , locate and drag LBL to a ladder rung.
  2. In the language editor, double-click the added LBL, enter a string for it, and then select the
    Enter
    key.
  3. From
    Toolbox
    , locate and drag JMP to a valid location in the language editor.
  4. In the language editor, double-click the added JMP, and then enter the same string for JMP as LBL.
Example
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal