### Yes / No

The Yes / No option functions similarly to the "Operator" option in that it allows you to display text when executing a part program. In addition, Yes and No buttons will appear at the bottom of the dialog box allowing the operator to answer YES or NO to simple questions.

To use the Yes / No option:

1. Place the cursor where you want the COMMENT/YESNO command to be inserted in the Edit window.

2. Select the Comment menu option. The Comment dialog box appears.

3. Select the Yes / No option.

4. Type the desired text in the Comment Text box.

5. When the comments are completed, click the OK button (or ENTER key) to close the dialog.

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 a button it not clicked by the time 0 is reached, the part program execution continues with the assumption that the No button was clicked.

How it Works

During execution, the PC-DMIS Message dialog box appears just below the Execution Mode Options dialog box, allowing the operator to select YES, NO, or click Cancel.:

A Sample PC-DMIS Message dialog showing YES and NO

Execution pauses until a button is clicked. The answer the operator selects is accessible using expressions with the ID of the comment. For example, if the comment has an ID of C1 and the Yes button is clicked, the expression "C1.INPUT" will have the value 'YES'. If the No button is clicked, the expression "C1.INPUT" will have the value 'NO'. This option is useful to users wishing to branch or loop on a 'Yes' or 'No' response. If the operator clicks Cancel part program execution is canceled.

Important: When using a conditional branching statement to test for the value of a YES / NO comment, be aware that your test should look for an uppercase "YES" or "NO" value. A lowercase "Yes" or "No" will not work. For information on program branching, see the "Branching by Using Flow Control" section.