The Label instruction is used in conjunction with a Jump instruction. When the JMP instruction is enabled, the code between the JMP and LBL instruction is not executed. Code execution begins immediately after the LBL instruction. When the JMP instruction is disabled the code between the JMP and LBL instruction is executed normally. A LBL instruction is required when a JMP label is inserted.
The JMP/LBL instructions can move ladder execution backward or forward. Skipping forward saves scan time while skipping backward increases scan time.
The LBL instruction has the same name as the JMP instruction which calls it.
Example:
Instruction Name
- JMP SKIP_CODE
- LBL SKIP_CODE
Names can be up to 40 characters long and can contain letters, numbers and the underscore ( _ ) character.
Note: Watch the amount of time you jump backward as this increases scan time and can cause a Watchdog fault if excessive. Jumping forward can save scan time by skipping code that does not need to be scanned continuously. Also make sure the LBL instruction is the first or left most instruction on a rung.