Loops: Jump to Label

Loops in a Ladder project cause the program to jump over certain net(s), according to specific logic conditions.

A Loop contains a Jump element and a Label. When the Jump condition(s) is true, the project jumps to the associated Label.

To create a Loop in your project:

  1. Click Loop on the Ladder toolbar.

  2. Select Set Label from the Loop menu. Place the cursor in the desired net and click.

  3. The Edit Label box opens.

  4. Enter a Label name of up to eight characters.

  5. The Label appears above the net.

  6. Select Jump from the Loop menu.

  7. Place the Jump in the desired place on the desired net.

  8. Select Jump to... window appears.

  1. Select the desired Label name to which you want to jump. Click OK.

  2. The Jump element appears with the selected Label name on the net.

According to the above example, if Ladder logic is true for net 4, the program will jump over nets 5 and 6 and continue from net 7.

Important note: You must take care when creating Loops not to create an endless Loop. While you can place Labels before a Jump condition and you can refer to a Label more than once, repeated referrals to a Label above a Jump element can create an endless loop which will cause the controller to stop with an error message "PROGRAM LOOP."

Loop functions are featured in the sample application, such as the applications ' Shortening scan time-jump'. This application may be found by selecting Sample U90 Projects from the Help Menu.