Branching on an Error

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:

The On Error command must be placed above the Temperature Compensation command in the measurement routine.

Error mode - PC-DMIS can take these possible actions depending on the error type:

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

  1. Select Insert | Flow Control Command | On Error to open the On Error dialog box.

  2. In the Error type list, select the error type as the condition for branching.

  3. In the Error mode area, select the option that defines the action to take place when that condition is met.

  4. To add the On Error command, click OK. To close the dialog box without applying any changes, click Cancel.

The Edit window command line in Summary mode is:

On Error
 Error Type : <type>
 Error Mode : <mode>

Where <type> is the type of error, and <mode> is the error mode to be taken.

More:

On Error Supported Interfaces