Change filename variable only if there is a rejection?

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

  • Change filename variable only if there is a rejection?

    Solved:

    See post#8

    __________________________________________________ __________________________________________________ _____________________________

    Original Post-->
    PCD 2021.1 CAD

    We save PDFs to the network. The QEs complain that they have to open up the PDF reports to see if the part is good or not.

    Is there a way to automatically make PCD put an "XX" at the end (or somewhere inside of...I don't really care) of the filename IF there is any OUTTOL condition? Whatever solution we come up with NEEDS TO WORK WITH A "DO LOOP".


    Currently, I use this code. Goes right after my dimensions at the very end of my loop:
    Code:
    Program_blahblahblah
    
    Dimensions_blahblahblah
    
    GROUP_PRINT_AND_CSV_COMMANDS =GROUP/SHOWALLPARAMS=YES
    ASSIGN/PROG_NAME=GETPROGRAMINFO ("PARTNAME")
    ASSIGN/DATE=STR(SYSTEMDATE ("MMddyyyy"))
    ASSIGN/TIME=STR(SYSTEMTIME ("HHmmss"))
    ASSIGN/VAR_SERIAL_NUMBER=SER_NUM[CURR_POS]
    ASSIGN/REPORT_NAME="O:\\CMM PROGRAMS\\CMM_PDF_PC DMIS\\AG0OFFLINETEST\\"+PROG_NAME+"__"+VAR_SERIAL_ NUMBER+"__"+VAR_RUNNUMBER+"_"+DATE+TIME+".PDF"
    PRINT/REPORT,EXEC MODE=END,$
    TO_FILE=ON,AUTO=1,AUTO OPEN=OFF,$
    TO_PRINTER=OFF,COPIES=1,$
    TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=REPORT_NAME,$
    REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$
    TO_EXCEL=OFF,$
    PREVIOUS_RUNS=KEEP_INSTANCES
    ENDGROUP/ID=GROUP_PRINT_AND_CSV_COMMANDS


    This is my Eng Dept's wants something like this. Currently, I make this happen manually.
    Capture.JPG
    At a quick glance, they'd know they have an issue with #s 2,3,6,7, and 8...and not to worry about the others (these parts are messed up, issues with outside vendor).


    Any ideas?
    Attached Files
    Last edited by DAN_M; 02-25-2021, 11:15 AM.
    SF7107(PCD), SF454(PCD), 152614(Quindos), 9159(Quindos), 7107(Quindos), B&S Manual, M&M Gear Checker

  • #2
    Something along the lines of the following may work

    Assign/OT=0
    Assign/OT=GETPROGRAMINFO("numoot")

    NAME="O:\\CMM PROGRAMS\\CMM_PDF_PC DMIS\\AG0OFFLINETEST"+PROG_NAME+"__"+VAR_SERIAL_ NUMBER+"__"+VAR_RUNNUMBER+"_"+DATE+TIME+"+OT.PDF"

    If the last character in the name is anything other than zero then the report contains out of tolerance conditions. Added bonus you know if there are a lot of problems or just one.

    Code will probably need some tweaking, but its the first thing I thought of after reading your post.

    May need the Assign /OT=0 at the start of your DO loop.. Not sure, shooting from the hip...
    Last edited by kingsld1; 02-24-2021, 02:26 PM.

    Comment


    • #3
      Originally posted by kingsld1 View Post
      Something along the lines of the following may work

      Assign/OT=0
      Assign/OT=GETPROGRAMINFO("numoot")

      NAME="O:\\CMM PROGRAMS\\CMM_PDF_PC DMIS\\AG0OFFLINETEST"+PROG_NAME+"__"+VAR_SERIAL_ NUMBER+"__"+VAR_RUNNUMBER+"_"+DATE+TIME+"+OT.PDF"

      If the last character in the name is anything other than zero then the report contains out of tolerance conditions. Added bonus you know if there are a lot of problems or just one.

      Code will probably need some tweaking, but its the first thing I thought of after reading your post.

      May need the Assign /OT=0 at the start of your DO loop.. Not sure, shooting from the hip...
      Thanks for giving me a nudge in the right direction! I think I am going to try this;

      Code:
      ASSIGN/NUMOOT=0
      ASSIGN/NUMOOT=GETPROGRAMINFO("NUMOOT")
      ASSIGN/PROG_NAME=GETPROGRAMINFO ("PARTNAME")
      ASSIGN/DATE=STR(SYSTEMDATE ("MMddyyyy"))
      ASSIGN/TIME=STR(SYSTEMTIME ("HHmmss"))
      ASSIGN/VAR_SERIAL_NUMBER=SER_NUM[CURR_POS]
      IF/NUMOOT>="1"
      ASSIGN/REPORT_NAME="O:\\CMM PROGRAMS\\CMM_PDF_PC DMIS\\AG0OFFLINETEST\\"+PROG_NAME+"__"+VAR_SERIAL_ NUMBER+"__"+VAR_RUNNUMBER+"_"+DATE+TIME+"__"REJECT .PDF"
      END_IF/
      ELSE/
      ASSIGN/REPORT_NAME="O:\\CMM PROGRAMS\\CMM_PDF_PC DMIS\\AG0OFFLINETEST\\"+PROG_NAME+"__"+VAR_SERIAL_ NUMBER+"__"+VAR_RUNNUMBER+"_"+DATE+TIME+".PDF"
      END_ELSE/
      PRINT/REPORT,EXEC MODE=END,$
      TO_FILE=ON,AUTO=1,AUTO OPEN=OFF,$
      TO_PRINTER=OFF,COPIES=1,$
      TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=REPORT_NAME,$
      REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$
      TO_EXCEL=OFF,$
      PREVIOUS_RUNS=KEEP_INSTANCES
      SF7107(PCD), SF454(PCD), 152614(Quindos), 9159(Quindos), 7107(Quindos), B&S Manual, M&M Gear Checker

      Comment


      • MBaroni
        MBaroni commented
        Editing a comment
        I would do in a slightly different way:


        Code:
        ASSIGN/OOTFLAG=""
        ASSIGN/NUMOOT=0
        ASSIGN/NUMOOT=GETPROGRAMINFO("NUMOOT")
        ASSIGN/PROG_NAME=GETPROGRAMINFO ("PARTNAME")
        ASSIGN/DATE=STR(SYSTEMDATE ("MMddyyyy"))
        ASSIGN/TIME=STR(SYSTEMTIME ("HHmmss"))
        ASSIGN/VAR_SERIAL_NUMBER=SER_NUM[CURR_POS]
        IF/NUMOOT>="1"
        ASSIGN/OOTFLAG="__REJECT"
        END_IF/
        ASSIGN/REPORT_NAME="O:\\CMM PROGRAMS\\CMM_PDF_PC DMIS\\AG0OFFLINETEST\\"+PROG_NAME+"__"+VAR_SERIAL_ NUMBER+"__"+VAR_RUNNUMBER+"_"+DATE+TIME+OOTFLAG".PDF"
        PRINT/REPORT,EXEC MODE=END,$
        TO_FILE=ON,AUTO=1,AUTO OPEN=OFF,$
        TO_PRINTER=OFF,COPIES=1,$
        TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=REPO RT_NAME,$
        REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMEN SIONS=NO,$
        TO_EXCEL=OFF,$
        PREVIOUS_RUNS=KEEP_INSTANCES

    • #4
      If looping you would need to keep track of the oot between loops.
      roughly speaking...

      baseline = 0
      loop
      measure stuff
      currentoot = getprograminfo(“numoot”)
      runnumoot = currentoot - baseline
      baseline = currentoot
      end loop

      runnumoot would be the number for that loop. Pcdmis keeps a running total.

      Comment


      • #5
        Originally posted by SABarber View Post
        If looping you would need to keep track of the oot between loops.
        roughly speaking...

        baseline = 0
        loop
        measure stuff
        currentoot = getprograminfo(“numoot”)
        runnumoot = currentoot - baseline
        baseline = currentoot
        end loop

        runnumoot would be the number for that loop. Pcdmis keeps a running total.
        ^^^Thanks for this info! I was wondering about this exact thing, thank you for confirming my suspicions. I'll work on some code
        SF7107(PCD), SF454(PCD), 152614(Quindos), 9159(Quindos), 7107(Quindos), B&S Manual, M&M Gear Checker

        Comment


        • #6
          just out of curiosity what if you sent OOT part report to a different folder within a folder for that job? That way you don't have to scan through a list, they would be separated. cool stuff you guys. I dont get to mess with stuff like this too often. We like to chart in a SPC software and pull bad part #'s from that. "Prolink"
          sigpicTAU ALPHA PI INDIANA DELTA CHAPTER
          "Due to the highly confidential nature of my job, I am not allowed to know what I am doing" - author unknown

          Comment


          • #7
            Originally posted by SABarber View Post
            If looping you would need to keep track of the oot between loops.
            roughly speaking...

            baseline = 0
            loop
            measure stuff
            currentoot = getprograminfo(“numoot”)
            runnumoot = currentoot - baseline
            baseline = currentoot
            end loop

            runnumoot would be the number for that loop. Pcdmis keeps a running total.
            I didn't know the running total thing. I would never have guessed, that is some very useful knowledge. Thank you!

            Comment


            • #8
              This was a tricky one. Special thanks to SABarber & @Kingsld1

              I did this-->

              BASELINE = 0
              DO/
              PROGRAM
              DIMENSIONS

              Code:
              GROUP_PRINT_AND_CSV_COMMANDS =GROUP/SHOWALLPARAMS=YES
              ASSIGN/CURRENTOOT=GETPROGRAMINFO("NUMOOT")
              ASSIGN/RUNOOT=CURRENTOOT-BASELINE
              ASSIGN/PROG_NAME=GETPROGRAMINFO ("PARTNAME")
              ASSIGN/DATE=STR(SYSTEMDATE ("dMMMyyyy"))
              ASSIGN/TIME=STR(SYSTEMTIME ("HHmmss"))
              ASSIGN/REJECT="____REJECT___"
              IF/RUNOOT=="0"
              ASSIGN/REPORT_NAME="O:\\CMM PROGRAMS\\CMM_PDF_PC DMIS\\AG0OFFLINETEST\\"+PROG_NAME+"__"+SER_NUM[CURR_POS]+"__"+VAR_RUNNUMBER+"__"+DATE+"__"+TIME+"__.PDF "
              END_IF/
              ELSE/
              ASSIGN/REPORT_NAME="O:\\CMM PROGRAMS\\CMM_PDF_PC DMIS\\AG0OFFLINETEST\\"+PROG_NAME+"__"+SER_NUM[CURR_POS]+"__"+VAR_RUNNUMBER+"__"+DATE+"__"+TIME+"__"+REJECT+".PDF"
              END_ELSE/
              PRINT/REPORT,EXEC MODE=END,$
              TO_FILE=ON,AUTO=1,AUTO OPEN=OFF,$
              TO_PRINTER=OFF,COPIES=1,$
              TO_DMIS_REPORT=OFF,FILE_OPTION=OVERWRITE,FILENAME= REPORT_NAME,$
              REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$
              TO_EXCEL=OFF,$
              PREVIOUS_RUNS=KEEP_INSTANCES
              ASSIGN/BASELINE=CURRENTOOT
              ENDGROUP/ID=GROUP_PRINT_AND_CSV_COMMANDS
              UNTIL/CURR_POS==TOTAL_PARTS
              END OF PROGRAM


              PDFs end up looking like this, am very happy with outcome:
              Capture.PNG

              Thank you again!!!
              Last edited by DAN_M; 02-25-2021, 11:19 AM.
              SF7107(PCD), SF454(PCD), 152614(Quindos), 9159(Quindos), 7107(Quindos), B&S Manual, M&M Gear Checker

              Comment


              • #9
                Originally posted by Cris_C View Post

                I didn't know the running total thing. I would never have guessed, that is some very useful knowledge. Thank you!
                The run total was definitely a curve-ball! Had to stare at it for like 20mins before it sunk in. Am really happy SAbarber chimed in about that.
                SF7107(PCD), SF454(PCD), 152614(Quindos), 9159(Quindos), 7107(Quindos), B&S Manual, M&M Gear Checker

                Comment


                • #10
                  Originally posted by Benedictj1 View Post
                  just out of curiosity what if you sent OOT part report to a different folder within a folder for that job? That way you don't have to scan through a list, they would be separated. cool stuff you guys. I dont get to mess with stuff like this too often. We like to chart in a SPC software and pull bad part #'s from that. "Prolink"
                  Good idea my friend but they want it all in the same folder =/ Figured it out though. Thanks for weighing in!
                  SF7107(PCD), SF454(PCD), 152614(Quindos), 9159(Quindos), 7107(Quindos), B&S Manual, M&M Gear Checker

                  Comment


                  • #11
                    Originally posted by DAN_M View Post

                    The run total was definitely a curve-ball! Had to stare at it for like 20mins before it sunk in. Am really happy SAbarber chimed in about that.
                    Yeah, when you specified that it had to be in a loop! I was like "good luck with that!" Then, SAbarber to the rescue.

                    Nice code! Good job pulling that off. Now the engineers will know to expect lots of impossible things from you! But, I suspect they already do.

                    Comment


                    • #12
                      Originally posted by Cris_C View Post

                      Yeah, when you specified that it had to be in a loop! I was like "good luck with that!" Then, SAbarber to the rescue.

                      Nice code! Good job pulling that off. Now the engineers will know to expect lots of impossible things from you! But, I suspect they already do.
                      Not gonna lie I was sitting at home last night thinking about scrapping the code IF demon treated that var as a running total...really glad this all worked out.

                      thank you sir!
                      SF7107(PCD), SF454(PCD), 152614(Quindos), 9159(Quindos), 7107(Quindos), B&S Manual, M&M Gear Checker

                      Comment


                      • #13
                        Glad to hear things worked out.

                        Comment

                        Related Topics

                        Collapse

                        Working...
                        X