core

## 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 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 (y or z) direction, and you want to start with position number 5. For the End Number box, type 10. For in 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 skip to the fourth part.

Offset - The offset area contains these boxes:

X Axis, Y Axis, Z Axis - These boxes set up the x, y, or z offset between parts, or patterns on the same part. These offset the part by the entered distance each time the loop runs. The first offset is based on the part's origin.

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 each time the loop runs.

If you have an alignment command inside a loop and the loop is using 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 or not PC-DMIS increment the feature IDs (within the loop) as a value in square brackets that coincides with the loop increment.

If you have feature CIR1, it becomes CIR1[1] on the first loop, CIR1[2] on the second loop, and so on.

Feature IDs in Statistical Databases

If you select the Loop IDs check box and are sending statistical data to a database, in some cases, PC-DMIS may not display these loop IDs in the database.

Consider the following:

If you have a STATS/ON command and a STATS/UPDATE command inside a loop block, then loop IDs are not displayed inside the database.

If you have a STATS/ON command outside a loop block and a STATS/UPDATE command inside a loop block, then loop IDs are not displayed inside the database.

If you have a STATS/ON command outside a loop block and a STATS/UPDATE command outside a loop block, then loop IDs are displayed inside the database.

If you have a STATS/ON command inside a loop block and a STATS/UPDATE command outside a loop block, then loop IDs are displayed inside the database.

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. The command LOOP/START must be followed by the command LOOP/END in the Edit window.

More:

Uses for Looping

Creating a Loop