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.
Header not repeating in looped program
Collapse
X
-
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
-
Originally posted by Schrocknroll View PostYou 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.
Comment
-
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.jpgLast edited by wowie; 04-22-2016, 06:23 PM.
Comment
-
-
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
-
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
-
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
-
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
MikeYou can never tell exactly how deep a mud puddle is without getting your feet wet -- Dennis the Menice
- 1 like
Comment
-
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
-
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
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
-
-
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
-
by mdconI'm writing a some programs that will be using a loop to measure two parts on 2 different fixtures. I'm using FORMFEED to get the results for each part...
-
Channel: PC-DMIS for CMMs
01-10-2008, 09:10 AM -
-
by deasyseProblem I'm having is with the report header. I don't use marked sets in my programs, I mark everything. I build a menu structure and use labels to branch...
-
Channel: PC-DMIS for CMMs
06-01-2007, 06:05 PM -
-
by Liambo734I'm programming offline v2012mr1. I am looping the program using external alignments (no loop commands in the program).
I have a print command...-
Channel: PC-DMIS for CMMs
07-31-2018, 10:40 AM -
-
by dre_23I am looping a program to measure multiple parts, at the end of the loop I am printing the report to file but only the first report has the header with...
-
Channel: PC-DMIS for CMMs
08-24-2007, 09:45 PM -
-
by bsteeleHow 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....
-
Channel: PC-DMIS for CMMs
11-21-2015, 09:22 AM -
Comment