All of our parts have barcodes that contain the part's serial number. Operators scan the serial number with a barcode scanner and my print command uses the input to save and create a pdf with the serial number as its filename. This serial number easy to input and reports easy to find.
A problem occurs when operators want to retest the same serial number either for wacky results or they are in doubt of the CMM. To do this operators would have to manually type in the parts serial number with a -1 at the end to differentiate the retest report with the original report. Some times operators forget to type in the serial number for the retest report and scan it again. Printing errors pop up and the original reports opens not showing any changes. Since all reports go to the same folder automatically, you can't have more than one file with the same filename in the same folder.
So after thinking about this I created a little test program offline. It asks my usual input comments and uses assignments and the print command for my report name and location just like in production.
I added another question, if this is a retest, another assignment, and another retest print command. This adds the system time instead of -1 at the end of every retest so the filename will have the correct serial number and an unique identifier at the end of it to differentiate the reports. Operators don't have to type in the serial number anymore eliminating typos and forgetfulness.
So depending on how they any the retest question, the pdf report will either be reported as usual or with the unique identifier at the end.
Hopefully this helps someone out. Its useful when operators don't have programming access and are in production mode.
FYI I skipped any alignments, i'm offline, just testing code here.
SERIAL_NUMBER =COMMENT/INPUT,YES,FULL SCREEN=NO,[COLOR=#0000FF]<---------------use barcode scanner to scan barcode, gets the serial number[/COLOR] SCAN SERIAL NUMBER ASSIGN/SN=SERIAL_NUMBER.INPUT [COLOR=#0000FF]<--------------------------what to name the report[/COLOR] ASSIGN/REPORT_LOC="\\\PRISM\quality\CMM\\"[COLOR=#0000FF]<-------------where the reports go[/COLOR] ASSIGN/REPORT_NAME=REPORT_LOC+SN[COLOR=#0000FF]<----------------for my print command[/COLOR] C1 =COMMENT/YESNO,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO, is this a retest? IF_GOTO/C1.INPUT=="NO",GOTO = CIR1[COLOR=#0000FF]<-------if they answer no, it goes as usual with no unique identifier on the report[/COLOR] ASSIGN/RT=SYSTEMTIME("'_'HH'.'mm") COMMENT/REPT, "retest serial number:" +SN+RT[COLOR=#0000FF]<---------if they answer yes, it adds the system time to the report itself and adds the unique identifier[/COLOR] ASSIGN/REPORT_NAME_RT=REPORT_LOC+SN+RT[COLOR=#0000FF]<------------------for the unique identifier print command[/COLOR] CIR1 =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR THEO/<3.6811,3.1693,0>,<0,0,1>,0.5906 ACTL/<3.6811,3.1693,0>,<0,0,1>,0.5906 TARG/<3.6811,3.1693,0>,<0,0,1> START ANG=0,END ANG=360 ANGLE VEC=<1,0,0> DIRECTION=CCW SHOW FEATURE PARAMETERS=NO SHOW CONTACT PARAMETERS=YES NUMHITS=7,DEPTH=0.1969,PITCH=0 SAMPLE METHOD=SAMPLE_HITS SAMPLE HITS=3,SPACER=0 AVOIDANCE MOVE=NO,DISTANCE=0.3937 FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO SHOW HITS=NO DIM LOC1= LOCATION OF CIRCLE CIR1 UNITS=IN ,$ GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH HALF ANGLE=NO AX NOMINAL +TOL -TOL MEAS DEV OUTTOL D 0.5906 0.0020 0.0020 0.5906 0.0000 0.0000 ----#---- END OF DIMENSION LOC1 IF/C1.INPUT=="NO"[COLOR=#0000FF]<----------------determines which print command to use[/COLOR] GOTO/PRINT END_IF/ ELSE_IF/C1.INPUT=="YES" GOTO/RETEST_PRINT END_ELSEIF/ PRINT =LABEL/ PRINT/REPORT,EXEC MODE=END,$[COLOR=#0000FF]<-----------------regular print command[/COLOR] TO_FILE=ON,OVERWRITE=REPORT_NAME,AUTO OPEN REPORT=ON,$ 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=KEEP_INSTANCES GOTO/END[COLOR=#0000FF]<--------- moves to end of program[/COLOR] RETEST_PRINT=LABEL/ PRINT/REPORT,EXEC MODE=END,$[COLOR=#0000FF]<-------unique identifier print command[/COLOR] TO_FILE=ON,OVERWRITE=REPORT_NAME_RT,AUTO OPEN REPORT=ON,$ 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=KEEP_INSTANCES END =LABEL/[COLOR=#0000FF]<-----------ends program[/COLOR]