Yes / No

(This item applies to the Comment dialog box, accessible through Insert | Report Command | Comment.)

The Yes / No option functions similarly to the Operator option in that it allows you to display text when you execute a measurement routine. In addition, Yes, No and Cancel buttons appear at the bottom of the dialog box of the PC-DMIS Message dialog box; this enables the operator to answer yes or no to simple questions.

To use the Yes / No option, follow these steps:

  1. Place the cursor in the Edit window where you want to insert the comment command.

  2. Select the Insert | Report Command | Comment menu option to open the Comment dialog box.

  3. From the Comment dialog box, select the Yes / No option.

  4. In the Comment Text box, enter the comment text.

  5. If you do not click Yes or No on the PC-DMIS Message dialog box and you want the measurement routine to auto-execute after a set time, select the Auto-continue execution check box. You can then enter the number of seconds for the delay in the Execution delay (in seconds) box. For details, see "Auto-Continue Execution".

  6. Click the OK button to close the dialog box and insert the comment.

The Edit window command line for this option reads:
comment ID = COMMENT/YESNO,TOG1,FULL SCREEN=TOG2,AUTO-CONTINUE=TOG3,

comment text

TOG1 - This YES/NO field allows you to specify whether or not the comment shows up in the inspection report.

TOG2 - This YES/NO field allows you to specify whether or not the comment fills the entire screen when displayed.

TOG3 - This YES/NO field determines whether or not the comment will use a count-down timer and automatically continue execution once the timer reaches zero. If the operator does not click a button by the time 0 is reached, the measurement routine execution continues with the assumption that the operator clicked the Yes button.

After you insert a PC-DMIS comment, to type additional PC-DMIS commands in Command mode, you must first press Enter twice after the COMMENT command. This tells PC-DMIS that you no longer want to add text to the comment but are ready to add a new command.

How it Works

During execution, the PC-DMIS Message dialog box appears below the Execution dialog box. This enables the operator to click Yes, No, or Cancel:

Sample PC-DMIS Message dialog box with buttons

Execution pauses until the operator clicks a button. A variable stores the answer. The variable is C1.INPUT.

The answer the operator selects is accessible using expressions with the ID of the comment.

Example 1: If the comment has an ID of C1 and the operator clicks the Yes button, the expression "C1.INPUT" contains the value "YES". If the operator clicks the No button, the expression "C1.INPUT" contains the value "NO". This option is useful to users who want to branch or loop on a "YES" or "NO" string response.

Example 2: If the comment has an ID of C1 and the operator clicks the Yes button, the expression "C1.INPUTVALUE" contains the value 1. If the operator clicks the No button, the expression "C1.INPUTVALUE" contains the value 2. This option is useful to users who want to branch or loop on a 1 or 2 integer response.

In either case, if the operator clicks Cancel, the measurement routine execution is canceled.

When you use a conditional branching statement to test for the value of a YES / NO comment using the .INPUT expression, be aware that your test must look for an uppercase "YES" or "NO" value. A lowercase "Yes" or "No" does not work. For information on measurement routine branching, see the "Branching by Using Flow Control" chapter.