Header not repeating in looped program

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Header not repeating in looped program

    Hi all! I've got a program that loops to measure four parts on one run. The program loops properly and gives me four separate reports except after the first run our company header is not carried on past the first report. What am i missing? I know I am missing something simple, but I have been beating my head against the wall trying to figure it out. I have chosen the proper template and chose the right default report to use, but to no avail. BTW, I am running 2013 MR1 SP6. Thanks in advance.
    Last edited by RHOEL; 04-20-2016, 04:46 PM.

  • #2
    You can insert a new header anywhere in the report by going to Insert | Report Command | Report Label in the menu. Select FILE_HEADER.LBL and it will put the header in the report where your cursor is.

    I'm guessing you have a print command before the loop begins to save or print the report each time. If so, then put the new header command after the print command. That should do it.
    PC-DMIS 2016.0 SP8

    Jeff

    Comment


    • #3
      Originally posted by Schrocknroll View Post
      You can insert a new header anywhere in the report by going to Insert | Report Command | Report Label in the menu. Select FILE_HEADER.LBL and it will put the header in the report where your cursor is.

      I'm guessing you have a print command before the loop begins to save or print the report each time. If so, then put the new header command after the print command. That should do it.
      +1

      Comment


      • #4
        I put the new header command after the print command and it put it right under the original header. It did not replace it for the successive 3 reports. I screwed four dowels on the CMM table and quickly wrote a looping program to test it. Thank you for the responses.

        ScreenHunter_02 Apr. 22 16.19.jpg
        Last edited by wowie; 04-22-2016, 06:23 PM.

        Comment


        • #5
          http://www.pcdmisforum.com/showthrea...993#post406993

          Comment


          • #6
            Another question along with this topic, how do I get the "part serial numbers" to correspond with each report inside the loop? I'm able to separate each report with a Header as describe above, but not able to change the part serial number in the tracefield . It post that same number for each part. How can I enter and have it report the number entered?

            Comment


            • #7
              I added a counter in loop that prints part number then adds +1 to that at end of loop
              Code:
              ASSIGN/PARTSER_NUM=C4.INPUT
              
              LOOP/START
              COMMENT/REPT,
                          "  ORDER NUMBER  :"+C5.INPUT+" Serial Number : "+PARTSER_NUM+" Operator :"+C3.INPUT+  "  WORK CENTER  : "+ C6.INPUT
              
              *****code******
              PRINT COMMAND
               ASSIGN/PARTSER_NUM=PARTSER_NUM+1
              loop/end

              Comment


              • #8
                Rich P - Thanks for the response, but I'm still struggling. when I enter a serial number in C1, it reports the same serial number for each part in the loop. See code.

                TIP/T1A0B0, SHANKIJK=0, 0, 1, ANGLE=90
                FORMAT/TEXT,OPTIONS, ,HEADINGS,SYMBOLS, ;NOM,TOL,MEAS,DEV,DEVANG,OUTTOL,
                C1 =COMMENT/INPUT,NO,FULL SCREEN=NO,
                **************************
                enter serial number
                **************************
                ASSIGN/PARTSER_NUM=C1.INPUT

                LOOP_1 =LOOP/START,ID=YES,NUMBER=2,START=1,SKIP=,
                OFFSET:XAXIS=-6,YAXIS=0,ZAXIS=0,ANGLE=0
                REPORT/LABEL, FILENAME= ABC.LBL
                COMMENT/REPT,
                ************************************************
                Serial Number : "+PARTSER_NUM+"
                ************************************************
                MOVE/CLEARPLANE

                **** CODE *******

                MOVE/CLEARPLANE
                PRINT/REPORT,EXEC MODE=END,$
                TO_FILE=OFF,AUTO=1,$
                TO_PRINTER=ON,$
                TO_DMIS_REPORT=OFF,FILE_OPTION=OVERWRITE,FILENAME= ,$
                REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMEN SIONS=NO,$
                TO_EXCEL_OUTPUT=OFF,
                PREVIOUS_RUNS=DELETE_INSTANCES
                ASSIGN/PARTSER_NUM=PARTSER_NUM+1
                LOOP/END

                Comment


                • #9
                  Your C1.INPUT is outside the loop. It is only read once so it will always be the same. Move the C1.INPUT inside the loop so that it asks you for a new serial number each loop.count. Also, there is no need for the ASSIGN/PARTSER_NUM.. Simply use C1.INPUT.

                  COMMENT/REPT
                  "Serial Number " + C1.INPUT

                  Mike
                  You can never tell exactly how deep a mud puddle is without getting your feet wet -- Dennis the Menice

                  Comment


                  • #10
                    Mike -
                    Thing is, parts have over one hour run time each. Boss wants program to run without operator attending cmm machine for 6hrs. I'm trying to find a way to have a one time input of all serial numbers at the beginning of the program and have them report along with header for each part inside the loop.

                    Comment


                    • Hi-Tech Redneck
                      Hi-Tech Redneck commented
                      Editing a comment
                      Here's what I do for a nested loop I have:

                      Code:
                                    MODE/DCC
                          C2         =COMMENT/INPUT,NO,FULL SCREEN=NO,
                                      <<< Please Enter Beginning Serial Number >>>
                                      ASSIGN/PARTCOMM=C2.INPUT
                                      ASSIGN/LOOPPART=PARTCOMM
                          C3         =COMMENT/INPUT,NO,FULL SCREEN=NO,
                                      How Many Parts Are In Each Row? >>>
                                      ASSIGN/V1=C3.INPUT
                          C4         =COMMENT/INPUT,NO,FULL SCREEN=NO,
                                      <<< How Many Rows? >>>
                                      ASSIGN/V2=C4.INPUT
                              V3     =LOOP/START,ID=YES,NUMBER=V2,START=1,SKIP=,
                                        OFFSET:XAXIS=0,YAXIS=4,ZAXIS=0,ANGLE=0
                              V4     =LOOP/START,ID=YES,NUMBER=V1,START=1,SKIP=,
                                        OFFSET:XAXIS=4,YAXIS=0,ZAXIS=0,ANGLE=0
                                      COMMENT/REPT,
                                      "PART #_"+LOOPPART
                      and this at the end:

                      Code:
                          PRINT/REPORT,EXEC MODE=END,$
                                        TO_FILE=ON,AUTO=80,$
                                        TO_PRINTER=OFF,$
                                        TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=,$
                                        REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$
                                        PREVIOUS_RUNS=DELETE_INSTANCES
                                      EXTERNALCOMMAND/NO_DISPLAY, NO_WAIT ; C:\PROGRAM FILES\WAI\DATAPAGE+ 2011\DATAPAGESTATS.EXE
                                      ASSIGN/LOOPPART=LOOPPART+1
                                      LOOP/END
                                      LOOP/END
                      this puts the serial number on the report as a comment...haven't figured out how to get it in the appropriate spot in the header yet...HTH

                  • #11
                    Are your serial numbers sequential? You could do this within the loop quite easily if they are. If they aren't then you'll need to enter each individually and either write them to a table for recall or maybe poke them into an array to grab at each loop cycle. If you're only talking about a SAMPLE NUMBER then that's even easier.

                    Mike

                    EDIT: I just realized that you tagged this question on to an existing topic. You should really start your own as this has nothing to do with repeating headers.
                    You can never tell exactly how deep a mud puddle is without getting your feet wet -- Dennis the Menice

                    Comment

                    Related Topics

                    Collapse

                    Working...
                    X