## Using On Error Commands

On Error commands allow you to specify the action that will be taken for focus or edge detection errors. The 'Vision' option must be enabled on your portlock for these options to be available for the 'On Error' command.

To use On Error commands:

1. Open or Create a Part Program.

2. Insert Manual/DCC mode command, and set it to DCC.

3. Insert an On Error command by selecting the Insert | Flow Control Command | On Error menu item.

On Error dialog box

4. Select either the 'Edge Not Detected' or 'Focus Not Detected' Error Type.

5. Select the Error Mode:

   - Off: PC-DMIS does nothing.

   - GoTo Label: Jumps to a defined label.

   - Set Variable: Sets a variable's value to one.

   - Skip Command: Skips over the current command and moves to the next marked command in the part program.

When errors are detected during part program execution, the specified action will be performed.