## Branching On an Error

On Error dialog box

The Insert | Flow Control Command | On Error command can be used to tell PC-DMIS what action to take in the case that a machine Error occurs.

PC-DMIS tracks these error conditions:

- Unexpected Probe Hit

- Missed Probe Hit

- Reflector Not Found (used with the Tracker in PC-DMIS Portable)

- Laser Error (see the "Handling Laser Probe Errors Using ONERROR" if you're using a Laser configuration)

For each of these error conditions, these possible actions can be taken:

- Jump to a label

- Set a variable's value to one

- Do nothing

- Skip command

By default, all part programs start with the action for both types of errors set to the third option (Do nothing). The action mode for each error type can be changed throughout the program.

Example: If during execution, PC-DMIS encounters an ON ERROR/ Unexpected Hit / Jump To Label command, any unexpected hits that occur after that point in the program will cause 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 part program.

The Edit window command line for the ON ERROR option reads:
ONERROR/UNEXPECTED_HIT, mode ID
or,
ONERROR/PROBE_MISS, mode ID
or,
ONERROR/REFLECTOR_NOT_FOUND, mode ID

To use the ON ERROR command:

1. Select On Error. The On Error dialog box will appear.

2. Select either Unexpected Probe Hit or Missed Probe Hit from the Error Type drop-down list.

3. Select one of the following Error Mode options to define what action should take place.

4. Click the OK button to apply the ON ERROR option. The Cancel button will close the On Error dialog box without applying any changes.

More:

Error Type

Error Mode

Supported Interfaces

RAW DOCUMENTATION ADDED I THINK TO PORTABLE HELP

Task # 103321. This would go under the “Portable” section.

The scenario for the enhancement is this:

Some users use a tracker machine to measure fixed points in space every 5 minutes, or 15, or 30, or 60 minutes. The point is that it is done periodically.

(In case you don’t know what a tracker is, it is a machine that shines a laser on a reflector ball and it measures the distance and angle from the tracker to the reflector.)

To do this, they affix several reflectors permanently to the structure in question, for example a wall or support beams or whatever. They are interested to see if any of the points move between runs.

In some cases, a reflector that was not affixed properly might fall off of the structure.

If this happens, when the part program is run in PC-DMIS, part program execution would halt because the reflector could not be found at its expected position. Since this would be running unattended, they wanted to be able to configure PC-DMIS to continue executing in that case.

To support this, the OnError command was expanded to include a new Error Mode, called “Skip Command”. A new error type was also added, called “Reflector Not Found”. This error type will only be available when using a tracker CMM.

To use this, the user would add an OnError command to the part program and set the Error Mode to “Skip Command” and the Error Type to “Reflector Not Found”. From that point on in the part program, if the Tracker produces an “Reflector Not Found” error, it will automatically skip that command and move to the next command in the part program.

This is the basic description of the new enhancement. If you have any questions or need clarification, I’ll be happy to help out.