hexagon logo

Different header outputs in one program

ALL RIGHT PCDMIS GURUS I NEED SOME HELP! I HAVE A PROGRAM THAT WILL BE USED FOR RECEIVING INSPECTION AS WELL AS PRODUCTION FLOOR. THE NAMING CONVENTIONS FOR WHAT SHOULD APPEAR IN THE HEADER ARE DIFFERENT DEPENDING ON WHERE THE PROGRAM WAS RAN. MY QUESTION WOULD BE IS THERE A WAY TO VARIABLIZE THE CELL EXPRESSIONS IN THE HEADER LABEL SO IT WILL ONLY PICK UP THE TRACEFIELDS THAT WERE USED DURING THAT EXECUTION. I AM AWARE I COULD JUST USE A SIMPLE HEADER AND PUT MY NAMING CONVENTIONS BELOW THE HEADER USING COMMENTS BUT THAT IS NOT THE ROUTE I WANT TO TAKE. USING ONE PROGRAM IS A REQUEST FROM MANGEMENT, OTHERWISE I WOULD SAVE TWO PROGRAMS WITH DIFFERNT .LBL FILES.


THIS IS MY CODE:


Z1 =COMMENT/YESNO,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
IS THIS FOR RECEIVING INSPECTION
IF_GOTO/Z1.INPUT=="NO",GOTO = PRODUCTION
RECEIVING =LABEL/
Z2 =COMMENT/INPUT,NO,FULL SCREEN=NO,
OPERATOR
ASSIGN/V1=Z2.INPUT
Z3 =COMMENT/INPUT,NO,FULL SCREEN=NO,
MATERIAL NO.
ASSIGN/V2=Z3.INPUT
Z4 =COMMENT/INPUT,NO,FULL SCREEN=NO,
BATCH NO.
ASSIGN/V3=Z4.INPUT
Z5 =COMMENT/INPUT,NO,FULL SCREEN=NO,
MAT. DOC. NO.
ASSIGN/V4=Z5.INPUT
Z6 =COMMENT/INPUT,NO,FULL SCREEN=NO,
SAMPLE NO.
ASSIGN/V5=Z6.INPUT
TRACEFIELD/NO_DISPLAY,LIMIT=15 ; OPERATOR : V1
TRACEFIELD/NO_DISPLAY,LIMIT=8 ; MATERIAL NO. : V2
TRACEFIELD/NO_DISPLAY,LIMIT=9 ; BATCH NO. : V3
TRACEFIELD/NO_DISPLAY,LIMIT=10 ; MAT.DOC. NO. : V4
TRACEFIELD/NO_DISPLAY,LIMIT=15 ; SAMPLE NO. : V5
ASSIGN/U="_"
ASSIGN/N=V3
ASSIGN/S=Z3.INPUT+U+Z4.INPUT+U+Z5.INPUT+U+Z6.INPUT
ASSIGN/PATH="T:\Shared\Quality_Engineering\CMM\Master\H-BLD_JOSH pc811\PCDMIS_2014\PRODUCTION"+N+""+S+".PDF"
ASSIGN/PATH2="T:\Shared\Quality_Engineering\CMM\Master\H-BLD_JOSH pc811\PCDMIS_2014\PRODUCTION"+N
CS1 =SCRIPT/FILENAME= T:\SHARED\QUALITY_ENGINEERING\CMM\MASTER\H-BLD_JOSH PC811\PCDMIS_2014\PC-DMIS SCRIPT\CREATE_FOLDER.BAS
FUNCTION/Main,SHOW=YES,,
STARTSCRIPT/
ENDSCRIPT/
GOTO/START
PRODUCTION =LABEL/
Z7 =COMMENT/INPUT,NO,FULL SCREEN=NO,
OPERATOR
ASSIGN/V6=Z7.INPUT
Z8 =COMMENT/INPUT,NO,FULL SCREEN=NO,
PROD. ORD. NO.
ASSIGN/V7=Z8.INPUT
Z9 =COMMENT/INPUT,NO,FULL SCREEN=NO,
MAT. NO.
ASSIGN/V8=Z9.INPUT
Z10 =COMMENT/INPUT,NO,FULL SCREEN=NO,
BATCH NO.
ASSIGN/V9=Z10.INPUT
Z11 =COMMENT/INPUT,NO,FULL SCREEN=NO,
SAMPLE NO.
ASSIGN/V10=Z11.INPUT
TRACEFIELD/NO_DISPLAY,LIMIT=15 ; OPER : V6
TRACEFIELD/NO_DISPLAY,LIMIT=10 ; PROD ORD # : V7
TRACEFIELD/NO_DISPLAY,LIMIT=8 ; MATERIAL : V8
TRACEFIELD/NO_DISPLAY,LIMIT=19 ; BATCH : V9
TRACEFIELD/NO_DISPLAY,LIMIT=15 ; SAMPLE NO. : V10
ASSIGN/U="_"
ASSIGN/N=V9
ASSIGN/S=Z9.INPUT+U+Z10.INPUT+U+Z8.INPUT+U+Z11.INPUT
ASSIGN/PATH="T:\Shared\Quality_Engineering\CMM\Master\H-BLD_JOSH pc811\PCDMIS_2014\PRODUCTION"+N+""+S+".PDF"
ASSIGN/PATH2="T:\Shared\Quality_Engineering\CMM\Master\H-BLD_JOSH pc811\PCDMIS_2014\PRODUCTION"+N
CS2 =SCRIPT/FILENAME= T:\SHARED\QUALITY_ENGINEERING\CMM\MASTER\H-BLD_JOSH PC811\PCDMIS_2014\PC-DMIS SCRIPT\CREATE_FOLDER.BAS
FUNCTION/Main,SHOW=YES,,
STARTSCRIPT/
ENDSCRIPT/
START =LABEL/
PRINT =LABEL/
PRINT/REPORT,EXEC MODE=END,$
TO_FILE=ON,OVERWRITE=PATH,AUTO OPEN REPORT=OFF,$
TO_PRINTER=OFF,COPIES=1,$
TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=,$
REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMEN SIONS=NO,$
TO_EXCEL_OUTPUT=OFF,
PREVIOUS_RUNS=DELETE_INSTANCES







SO IN SHORT IF THE OPERATOR ANSWERS "YES" FOR THE FIRST QUESTION I WANT THE FIRST SET OF TRACEFIELDS TO APPEAR IN THE HEADER. IF "NO" THEN THE SECOND SET TO APPEAR.

THANKS IN ADVANCE FOR ANY HELP ON THIS TOPIC!!!
Parents
  • What if you set the tracefields with if/else statements....Then Tracefield2 could be filled by Z2 when 'R' is selected and Z7 when 'P' is selected:
    duplicate as little as possible for your input boxes.

    When looking through, it appears like you're really just trying to change the save location. You probably don't need 2 sets of tracefields to work through. You can change the save location with If/else statements just as well based on the 'R' and 'P' selections.

    HTH
  • I haven’t tried using if/else statements yet. This project came about because my company has decided to start retaining all CMM data electronically for Production as well as Receiving Insp. We will have a dedicate server for this so the save location will be the same. The assignments in my code before the script file are used in conjunction with the script and print command to create/name a folder in the directory as well as name the pdf and place it in the folder created upon execution. The operators will be scanning from a shop order to obtain the data necessary for each input comment. The naming conventions scanned on orders which will maintain traceability are different depending on where the program is used. The outliers being Receiving Insp. has a Mat. Doc. Number and Production has a Prod. Order Number. These are both Unique Identifiers for our traceability. Each input comment will also have conditional formatting to make sure the operators can not scan the wrong data.
Reply
  • I haven’t tried using if/else statements yet. This project came about because my company has decided to start retaining all CMM data electronically for Production as well as Receiving Insp. We will have a dedicate server for this so the save location will be the same. The assignments in my code before the script file are used in conjunction with the script and print command to create/name a folder in the directory as well as name the pdf and place it in the folder created upon execution. The operators will be scanning from a shop order to obtain the data necessary for each input comment. The naming conventions scanned on orders which will maintain traceability are different depending on where the program is used. The outliers being Receiving Insp. has a Mat. Doc. Number and Production has a Prod. Order Number. These are both Unique Identifiers for our traceability. Each input comment will also have conditional formatting to make sure the operators can not scan the wrong data.
Children
No Data