hexagon logo

Header while looping

How can I get the header to print on every report when using loops? We have several fixtures we use to locate parts when inspecting them with the CMM. So to save time, we loop back to the part to eliminate the need to take the hits on the fixture every time. However, the header does not print out on any of the reports after the first part is checked.
  • You need to change your report template to one that has a header on every page. There should be a template included with the software install that will do this.
  • If you don't need it on every page, but just at the beginning of each loop put the cursor at the beginning of the loop and from the menu select Insert/Report Command/Report Label, then select "FILE_HEADER.LBL"
    The only problem would be double header on the first report, but you could always put a Form Feed command(from the same place in the menu as above) before the loop starts to give a clean slate.
  • If you don't need it on every page, but just at the beginning of each loop put the cursor at the beginning of the loop and from the menu select Insert/Report Command/Report Label, then select "FILE_HEADER.LBL"
    The only problem would be double header on the first report, but you could always put a Form Feed command(from the same place in the menu as above) before the loop starts to give a clean slate.


    Didn't know you could do this. Interesting, very interesting!

    Slight smile
  • You can get rid of the double header on the first report.

    Haven't tried this with a loop but it should work....

    My programs are setup with a menu system that lets you run a part, do manual alignment, calibrate probe, display a setup form and Quit the program. When the program is finished measuring the operator has an option to either hardcopy print and create a PDF/ Excel or just create a PDF and a Excel. Afterwards the program returns to the Menu.

    Before the Menu, If you Insert a File_Header.Lbl followed by a print command that does not send output anywhere (No printer, PDF or Excel) the file header is turned off.

    Then put another File_Header.Lbl command at the beginning of your loop the file header is turned back on

    PART NAME  : 25x25 fixture programming template
    REV NUMBER : 
    SER NUMBER : 
    STATS COUNT : 1
     
    STARTUP    =ALIGNMENT/START,RECALL:USE_PART_SETUP,LIST=YES
                ALIGNMENT/END
                MODE/MANUAL
    $$ NO,
                
                Enter appropriate probe
                
                
                LOADPROBE/1X20
                TRACEFIELD/DISPLAY,LIMIT=15 ; Inspection Lot : 
    $$ NO,
                
                
    $$ NO,
                *************************************************
                
                Turn off header
                
                
                REPORT/LABEL, FILENAME= FILE_HEADER.LBL
    $$ NO,
                
                
                PRINT/REPORT,EXEC MODE=END,$
                  TO_FILE=OFF,AUTO=1,AUTO OPEN REPORT=OFF,$
                  TO_PRINTER=OFF,COPIES=1,$
                  TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=,$
                  REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$
                  TO_EXCEL_OUTPUT=OFF,
                  PREVIOUS_RUNS=DELETE_INSTANCES
    $$ NO,
                
                ********************************************
                
                
    MENU       =LABEL/
    $$ NO,
                *************************************************
                
                Turns header back on
                
                
                REPORT/LABEL, FILENAME= FILE_HEADER.LBL
    $$ NO,
                
                ********************************************
                
                
    C1         =COMMENT/INPUT,NO,FULL SCREEN=NO,
                0) Calibrate Probe
                1) Run Part
                2) Fixture Setup
                3) Picture
                4) Manual Alignment
                5) Program Revision History
                6) QUIT
                IF_GOTO/C1.INPUT == 0,GOTO = CALIBRATE_PROBE
                IF_GOTO/C1.INPUT == 1,GOTO = RUN_PART
                IF_GOTO/C1.INPUT == 2,GOTO = FIXTURE_SETUP
                IF_GOTO/C1.INPUT == 3,GOTO = PICTURE
                IF_GOTO/C1.INPUT == 4,GOTO = MANUAL_ALIGNMENT
                IF_GOTO/C1.INPUT == 5,GOTO = PROGRAM_END
                COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
                INCORRECT INPUT!
                GOTO/MENU
    $$ NO,
                \
                \\
                \\\
    CALIBRATE_PROBE=LABEL/
                AUTOCALIBRATE/PROBE, PARAMETER_SET=ALL-TIPS-WITH-DEFAULTS, QUALTOOL_MOVED=NO, 
                              SHOW_SUMMARY=NO, OVERWRITE_RESULTSFILE=NO
                GOTO/MENU
    $$ NO,
                \
                \\
                \\\
    FIXTURE_SETUP=LABEL/
                COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
                1" dia  x 3/4" tall standoff
                X20 Y41
                X25 Y45
                X44 Y45
                
                25 X 25 Fixture Plate
                GOTO/MENU
    $$ NO,
                \
                \\
                \\\
    PICTURE    =LABEL/
    $$ NO,
                Form with at least a picture of the fixture setup and a picture of the part within the setup.
                GOTO/MENU
    $$ NO,
                \
                \\
                \\\
    MANUAL_ALIGNMENT=LABEL/
                WORKPLANE/ZPLUS
                GOTO/MENU
    $$ NO,
                \
                \\
                \\\
    RUN_PART   =LABEL/
                MODE/DCC
                EXTERNALCOMMAND/NO_DISPLAY, NO_WAIT ; C:\PROGRAM FILES (X86)\WAI\DATAPAGE+ 2011 MR1\DATAPAGESTATS.EXE -listening
    $$ NO,
                 
    $$ NO,
                BODY OF PROGRAM
    $$ NO,
                \
                \\
                \\\
    $$ NO,
                //              PRINTING
                /
                Print and File or Just File as PDF
                COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
                Review Results  before deciding to print or not
    RESTART1   =LABEL/
    PRINT_CUE  =COMMENT/INPUT,NO,FULL SCREEN=NO,
                Enter correct number to print to your choice
                
                1  To Printer  AND  File  (OOT Condtions)
                2  To File only  (In Tolerance Part)
                
                
                IF/PRINT_CUE.INPUT<>1 AND PRINT_CUE.INPUT<>2 
                  COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
                  INPUT INVALID
                GOTO/RESTART1
                END_IF/
                IF_GOTO/PRINT_CUE.INPUT==1,GOTO = PRINT_AND_FILE
                IF_GOTO/PRINT_CUE.INPUT==2,GOTO = FILEONLY
    PRINT_AND_FILE=LABEL/
                PRINT/REPORT,EXEC MODE=END,$
                  TO_FILE=ON,AUTO=1,AUTO OPEN REPORT=OFF,$
                  TO_PRINTER=ON,COPIES=1,$
                  TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=,$
                  REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$
                  TO_EXCEL_OUTPUT=OFF,
                  PREVIOUS_RUNS=DELETE_INSTANCES
                GOTO/PRINT_END
    FILEONLY   =LABEL/
                PRINT/REPORT,EXEC MODE=END,$
                  TO_FILE=ON,AUTO=1,AUTO OPEN REPORT=OFF,$
                  TO_PRINTER=OFF,COPIES=1,$
                  TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=,$
                  REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$
                  TO_EXCEL_OUTPUT=OFF,
                  PREVIOUS_RUNS=DELETE_INSTANCES
                GOTO/PRINT_END
    PRINT_END  =LABEL/
                EXTERNALCOMMAND/NO_DISPLAY, NO_WAIT ; C:\PROGRAM FILES (X86)\WAI\DATAPAGE+ 2011 MR1\DATAPAGESTATS.EXE -end
                GOTO/MENU
    PROGRAM_END=LABEL/
  • What about placing the header label command in an IF/ENDIF statement which tests for the loop counter? If LOOP>1 then show the label.
  • What about placing the header label command in an IF/ENDIF statement which tests for the loop counter? If LOOP>1 then show the label.

    That was my original thought but I couldn't get If/ENDIF to work in 2015.0 Offline. Didn't want to accept any arguments in the expression builder. It may just be me; I haven't played around with IF/ENDIF in PC DMIS. Understand the concept and have used it in other software but hadn't had the need where I'm at now. Got this to work and it was simple enough to cut and paste into my programs.