Using an Alignment Inside Loops or Branches

PC-DMIS facilitates changing alignments inside a measurement routine that uses looping or conditional branching by using the USE_ACTIVE_ALIGNMENT keyword following the RECALL: text within your ALIGNMENT/START command. This keyword lets you recall the active alignment.

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.

The USE_ACTIVE_ALIGNMENT keyword also displays the name of the active alignment within parentheses. So, if the active alignment was A3 during the last execution, the keyword shows the following after execution:

USE_ACTIVE_ALIGNMENT(A3)

PC-DMIS uses the active alignment name for different purposes depending on whether PC-DMIS is in learn or in execute mode.

Also, the alignment name in parentheses is now saved with the measurement routine. When opening a measurement routine created prior to PC-DMIS 2010 MR2, the information that appears in parentheses is dynamically populated by PC-DMIS as it searched for alignments above the alignment with the USE_ACTIVE_ALIGNMENT setting. This happens regardless of commands that may affect measurement routine flow during execution, such as looping or branching commands.

Measurement Routines that have been imported from a DMIS file into PC-DMIS do not support the functionality of showing the alignment name in parentheses, even if you save the file as a new measurement routine.

USE_ACTIVE_ALIGNMENT Example

If you look at the ALIGNMENT/START command line in Command mode, you'll see that the field immediately following the RECALL: text tells the measurement routine to use a stored starting alignment first. In the following example, alignment D_1 starts with the alignment from D_0 and then executes a 45 degree rotation about ZPLUS:

D_1=ALIGNMENT/START,RECALL:D_0, LIST= YES
ALIGNMENT/ROTATE_OFFSET,45.0,ABOUT,ZPLUS
ALIGNMENT/END

However, if you use the USE_ACTIVE_ALIGNMENT keyword instead, you can cause PC-DMIS to rotate 45 degrees from the active alignment:

D_1=ALIGNMENT/START,RECALL:
USE_ACTIVE_ALIGNMENT(D_0), LIST= YES
ALIGNMENT/ROTATE_OFFSET,45.0,ABOUT,ZPLUS
ALIGNMENT/END

When you use this keyword for an alignment inside a loop:

For information on looping, see the "Creating Generic Loops" topic in the "Branching by Using Flow Control" chapter.

Preferences that Affect USE_ACTIVE_ALIGNMENT

When you use the USE_ACTIVE_ALIGNMENT keyword, you should generally deselect the Reset global settings when branching check box and select the Treat theo values as if stored in part coordinates check box on the General tab in the Setup Options dialog box (Edit | Preferences | Setup).

See the "Setting Your Preferences" chapter for information on specifying setup preferences.