Many times a CMM program may have a manual alignment followed by a DCC alignment. In some cases, the manual alignment does not need to be executed each time the program is run. This is true if subsequent running of the program is done with each part in a repeatable location. A simple square mounted to the table is typically sufficient to fixture the parts in a repeatable location.
One method of running parts in this arrangement would include a small program that establishes and saves the Ref Frame, then the main program that recalls this alignment at the beginning. The problem with this method is when the program is transferred to another CMM; it requires the user to transfer multiple programs and know the procedure to set up the alignment.
Note: Do not depend on "remembered" last run values for future program runs. You should always begin with either a manual alignment (As simple as a Free-Position point) or recalling a previously saved alignment as shown here.
A much easier solution involves using a simple VB Script to control the flow of a program. i.e., Prompt the user if the manual alignment is required. When running the part in the same location, there is no need to perform the manual alignment each time. Such a program is set up as follows:
001: Programs Settings
002: Get Prb Assy
003: Get Tip
004: VB Script
CODE:
answer = MsgBox("IS MANUAL ALIGNMENT REQUIRED?", 4)
IF answer = 6 THEN
005: 3-2-1 Alignment
006: Save Ref Frame MyManualAlignment
007: VB Script
008: Recall Ref Frame MyManualAlignment
009: Meas Plane1
010: Level Plane1
011: Meas Line1
012: Align Line1
013: Meas Point1
014: Set Origin Point1
When running this program, a message is displayed... Is Manual Alignment Required?
If the user selects Yes, the entire program is run. If NO, steps 1-3 are run followed by 8-14 - the manual alignment is skipped, and the program runs in DCC from the same location as the recalled alignment.
The big benefit is the user only needs to copy ONE file from machine to machine if transferring the project, AND no special procedure is required. The prompt in the program takes care of this for us. The operator only needs to know how to answer a simple YES or NO question accurately.
Attached is a usable example of the VBS Option.