Using Generic Loops

Loop Parameters dialog box

The Insert | Flow Control Command | Looping menu option displays the Loop Parameters dialog box. You can use this dialog box to create a LOOP command that repeats the measurement routine (or portions of the measurement routine) with or without any of the offsets. The LOOP command can be added anywhere in the measurement routine, although this function is most useful at the beginning and end of the measurement routine.

Start Number - This box tells PC-DMIS the starting position number in a series of parts.

Suppose you have 10 parts, and you want to start with position number 5. You would enter 10 for the total number of parts and 5 for the starting position.

End Number - This box tells PC-DMIS how many times to loop through the measurement routine. This number is usually the same as the number of parts that the fixture holds (or patterns on the part) in the X, Y, or Z direction. PC-DMIS also asks for the starting part (pattern) number.

Suppose you have 10 parts in the X direction, and you want to start with position number 5. For the End Number box, type 10. For the Start Number box, type 5.

Skip Number - In a loop, PC-DMIS repeats a measurement routine the indicated number of times. The Skip Number box allows you to skip a specified increment. Note that you cannot skip the first increment using this box, but you can change the Start Number to 2 and effectively skip over it that way.

Suppose you want to set the parameter to skip every third increment of the loop. If the number three is indicated, PC-DMIS measures the first and second part and then skips to the fourth part.

Offset - The offset area contains these boxes:

X Axis, Y Axis, Z Axis - These boxes define the X, Y, and Z offset distances between parts, or patterns on the same part. These values offset the part by the defined offset distances once the loop executes.

Angle - This box sets up the angular offset between parts, or patterns on the same part. The first offset is based on the part's origin. PC-DMIS offsets the part by the angle value once the execution loops.

The software bases the offset distances on the part's origin. The first time through the loop, PC-DMIS uses the part's origin. The second time through the loop, it moves by the offset distances. The third time through the loop, it moves by the offset distances multiplied by two, and so on.

If you have an alignment command inside a loop, and the loop uses offsets, you must define all axes for that alignment. Additionally, the alignment inside the loop must use features measured inside the loop.

Loop IDs - This check box determines whether PC-DMIS displays the current loop value in square brackets in the feature ID.

Suppose you have a circle feature of CIR1. It becomes CIR1[1] on the first time through the loop, CIR1[2] on the second time through the loop, and so on.

Feature IDs in Statistical Databases

 

Variable ID - This box allows you to define the variable name used to track the loop's current iteration (or current loop within the number of specified loops). During the measurement routine's execution, this variable is equal to the current iteration number of the loop.

End Loop - This button completes the looping process. You must follow the command LOOP/START with the command LOOP/END in the Edit window.

More:

Uses for Looping

Creating a Loop

Using the Print Command in a Loop