Using the Print Command in a Loop

To use the PRINT command in a loop in PC-DMIS, do this:

  1. Insert the LOOP/START and LOOP/END commands in your measurement routine.

  2. Insert the PRINT command between the loop commands where you want it.

  3. In the Edit window, click on the PRINT command. Then press the F9 key to show the Output Configuration dialog box for that PRINT command. For details on how to set the output and printer options for the Report window, see "Setting Output and Printer Options for the Report Window" topic in the "Using Basic File Options" chapter.

  4. Select one of the output format tabs (Report, DMIS, or Excel) to define the format for your PRINT command.

  5. Select the check box in the upper left of the tab page to enable the options for the output.

  6. Define where to send the generated report:

  1. Click the browse (...) button to the right of the path and file name box to display the Save As dialog box.

  2. On the Save As dialog box, define the file name and click Save.

  1. Make any other changes that you need. For example, if you want to view each report after PC-DMIS generates them, select the Show Report check box.

  2. If you want to generate outputs in multiple formats, press the next tab and repeat steps 4 through 7.

  3. Click the OK button to save your changes to the PRINT command.

The PRINT command works almost the same inside of loops as it does outside of loops. The difference is that internally, PC-DMIS keeps track of what was output, and only outputs data that was executed after executing the last PRINT command.

For example, consider the code snippet below. When PC-DMIS executes the PRINT command for the first time, the software creates the first output file with all the collected data up to that point. This means the first output file includes data collected before the LOOP/START command as well. The next time the PRINT command executes, PC-DMIS only executes the contents within the loop. This means the second data file only contains the data from within the loop. This repeats until the measurement routine ends.

.

.

.

Loop Start

CIR1 = CIRCLE (CONTACT)

CIR2 = CIRCLE (CONTACT)

Move Point

Move Point

Move Point

Move Point

CIR3 = CIRCLE (CONTACT)

Move Point

Move Point

Move Point

CIR4 = CIRCLE (CONTACT)

CIR5 = CIRCLE (CONTACT)

CIR6 = CIRCLE (CONTACT)

CIR7 = CIRCLE (CONTACT)

CIR8 = CIRCLE (CONTACT)

LOC1 Passed: CIR1

Print Report

Loop End

.

.

.

 

 

Related Topics:

Inserting a Print Command

More:

Using Generic Loops