The Insert | Flow Control Command | On Error option opens the On Error dialog box:
On Error dialog box
You can use this dialog box to tell PC-DMIS the action to take when a machine error occurs.
Error type - PC-DMIS tracks these error conditions:
Unexpected probe hit
Missed probe hit
Reflector not found - This is used with the Tracker in PC-DMIS Portable.
Laser error - If you are using a laser configuration, see the "Handling Laser Sensor Errors with On Error Command" topic in the PC-DMIS Laser documentation.
Temperature Outside Limits - The Temperature Compensation command in the measurement routine raises this error if one or more of the temperatures for the X axis, Y axis, or Z axis scale or part are above the maximum limit or below the minimum limit that is defined for the Temperature Compensation command.
The On Error command must be placed above the Temperature Compensation command in the measurement routine.
Calibration Outside Limits - The Check Calibration Limits command in the measurement routine raises this error if one or more calibration error checks are outside the limits. For more information on the Check Calibration Limits command, see "About Check Calibration Limits" in the PC-DMIS Toolkit Modules documentation.
The On Error command must be placed above the Check Calibration Limits command in the measurement routine.
Error mode - PC-DMIS can take these possible actions depending on the error type:
Off - PC-DMIS does nothing.
GoTo label - The measurement routine flow moves to a defined label (see "Using Labels"). These options become available:
Label ID - Type a reference to a label that doesn't exist yet.
Current labels - Lists all the labels in the measurement routine.
Set variable - Sets a variable's value to one.
Skip command - The measurement routine flow skips over the current command and moves to the next marked command in the measurement routine.
For details on how PC-DMIS reports dimensions that use skipped features during execution, see the "Reporting a Dimension Using a Feature Skipped During Execution" topic in this documentation.
By default, all measurement routines start with the action for both types of errors set to Off (PC-DMIS does nothing). The action mode for each error type can be changed throughout the measurement routine.
During execution, if PC-DMIS encounters an ONERROR/UNEXPECTED HIT/JUMPTOLABEL command, any unexpected hits that occur after that point in the measurement routine cause the execution to jump to the specified label. The action to "set a variable’s value to one" causes the variable to be set as soon as the specified error type occurs. This value of the variable can then be tested using an IF statement to cause execution to jump to a new point in the measurement routine.
Using the On Error Command
Select Insert | Flow Control Command | On Error to open the On Error dialog box.
In the Error type list, select the error type as the condition for branching.
In the Error mode area, select the option that defines the action to take place when that condition is met.
To add the On Error command, click OK. To close the dialog box without applying any changes, click Cancel.
More: