IF/GOTO - Deciding how many parts to measure

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

  • IF/GOTO - Deciding how many parts to measure

    Looking to inspect several parts at once but also have an option to inspect only a single part or any number in between, but not sure what options I have to approach the issue. I have a fixture that will support 10 parts, 1-10 with labeled locations to indicate the spot number for each part.

    In some cases the operator may not need to check all 10 parts. I was looking at ideas that included the possibility of adding a comment with choices, or a user input that asks "How many parts will you be measuring?" at the start of the program and based on this the machine would measure the number of parts the operator desired up to the maximum allowed by the fixture. The fixture is designed to indicate the 10 locations and therefore the operator could load part in locations 1-3 if they were measuring only 3, or just in spot 1 if they were measuring 1 part.

    I am not sure if anyone has information on how or if this would be possible to implement but I think it would be an interesting feature to add to my program.

    Thanks in Advance

  • #2
    You could probably do it with ONERROR (ON ERROR), so that if a part isn't on your fixture in that spot, it skips it, then there isn't any user input.
    sigpic
    Originally posted by AndersI
    I've got one from September 2006 (bug ticket) which has finally been fixed in 2013.

    Comment


    • #3
      I didn't think of that, that probably would work. The only question I could think of if I went this route would be if the operator is only running one part on a 10 part fixture, would it proceed to check the 9 other positions and find no part there and then finish the program, or would it finish the program right after it does not find the next part.

      Comment


      • RandomJerk
        RandomJerk commented
        Editing a comment
        It doesn't have to.

        Matt's idea is fine, it really wouldn't take too terribly long to go through all the stations of the fixture. Or you can just have it end the program on first "miss", or empty station. The same evaluation that's used to decide the part isn't there and move on can be amended to see the part isn't there and end by using the vriable assignment technique to the ONERROR command, then put an ENDPROG label in at the end of the program and...

        {aircode}
        ONERROR assign PART_THERE=1
        IF_GOTO/PART_THERE==1,ENDPROG

    • #4
      it would continue to the end, 1 attempt for each position. BUT, all you need is a bogus (not part of the REAL check routine) vector point on the part, it tries to measure, gets an error, ONERROR goes to the next station, repeats until it gets to the 'park' move point at the end. Would be fairly quick, even on my old, slow machine. If the yutz left the fixture empty, it would try to measure a max of 10 vector points before finishing.
      sigpic
      Originally posted by AndersI
      I've got one from September 2006 (bug ticket) which has finally been fixed in 2013.

      Comment


      • #5
        So, I have parts that sometimes I have to measure up to 24 pcs. I have a plate similar to a Rayco plate. I use input comments at the beginning of the program asking how many parts per row and how many rows then assign the inputs to variables that are used in a nested loop. If your fixture houses all 10 pcs in one row, you would only need a loop instead of a nested loop. All this provided I understand your question.
        Last edited by Hi-Tech Redneck; 09-13-2019, 12:47 PM.
        Sheffield Endeavor3 9.20.8, Tesastar-SM, Leitz LSP-X1s & LSP-X1M, PCDMIS 2011 MR1

        Comment


        • #6
          At the beginning of the program, do this:

          Code:
          C1         =COMMENT/INPUT,NO,FULL SCREEN=NO,
                      HOW MANY PARTS DO YOU WANT TO RUN?
                      (ENTER A NUMBER 1 THRU 10)
          
          ~Manual alignments and other stuff...
          
          ~DCC MODE
          
          
          LOOP1      =LOOP/START,ID=YES,NUMBER=[B][COLOR=#006400]C1.INPUT[/COLOR][/B],START=1,SKIP=,
                        OFFSET:XAXIS=0,YAXIS=0,ZAXIS=0,ANGLE=0
          
                     ***** PROGRAM CODE WITH  DCC ALIGNMENTS & DIMENSIONS*****
          
                      LOOP/END
          This is basically the way I started doing it. I then learned how to use forms. Now I have a drop down for them to select how many parts they want to run instead of them typing a number in. Do a search on the forums for loops. There are plenty of examples.
          Whatever a man sows, he shall reap.

          Comment


          • mckenzie
            mckenzie commented
            Editing a comment
            your offset value will shift the position of the alignment origin by the value amount. example: if your parts are equally spaced 50mm apart in x, inputting an offset of 50mm in x will move the alignment 50mm in x after the each part has finished running.

            example:
            first part origin x0 y0 z0
            second part origin x50 y0 z0
            third part origin x100 y0 z0 ...

          • SM_19
            SM_19 commented
            Editing a comment
            Got it to work. Thanks very much for your help. Eventually I will look into dropdowns to eliminate any chance of the operator entering the incorrect number. Thanks

          • Kp61dude!
            Kp61dude! commented
            Editing a comment
            SM_19 when you get 'better' at this you'll loop stuff that has no rhyme or reason when it comes to patterns/placements. Lock in your offsets and call them with logic based on the loop counter value. You can even rotate parts, helps squeeze more parts on the table sometimes.

        • #7
          At the beginning of the program
          Code:
          ASSIGN/QTY_1=0
          ASSIGN/CNT_1=1
          Then I use a form for input information such as quantity (QTY_1) serial number etc

          Then at the start of the loop
          Code:
          START_MEAS =LABEL/
                      FASTPROBEMODE/ON
          MAN_ABC_AL =ALIGNMENT/START,RECALL:MAN_AB_AL,LIST=YES
                        ALIGNMENT/LEVEL,XMINUS,MAN_A_PLN
                        ALIGNMENT/ROTATE_CIRCLE,ZPLUS,TO,MAN_B_CIR,AND,MAN_C_PNT,ABOUT,XPLUS
                        ALIGNMENT/ROTATE_OFFSET,-33,ABOUT,XPLUS
                        ALIGNMENT/TRANS,XAXIS,MAN_A_PLN
                        ALIGNMENT/TRANS,YAXIS,MAN_B_CIR
                        ALIGNMENT/TRANS,ZAXIS,MAN_B_CIR
                      ALIGNMENT/END
                      SAVE/ALIGNMENT,Pentastar_vertical_al1.aln,MACHINETOPARTS
                      ASSIGN/X_OFFSET=ARRAY(0,0,0,0,165.2,165.2,165.2,165.2,329.8,329.8,329.8,329.8)
                      ASSIGN/Y_OFFSET=ARRAY(0,139.5,279,418.5,0,139.5,279,418.5,0,139.5,279,418.5)
          STATION_OFFSET_AL1=ALIGNMENT/START,RECALL:MAN_ABC_AL,LIST=YES
                        ALIGNMENT/TRANS_OFFSET,XAXIS,X_OFFSET[CNT_1]
                        ALIGNMENT/TRANS_OFFSET,YAXIS,Y_OFFSET[CNT_1]
                      ALIGNMENT/END
                      SAVE/ALIGNMENT,Pentastar_vertical_offset_al1.aln,MACHINETOPARTS
                      IF/CNT_1==1
                        RECALL/ALIGNMENT,EXTERNAL,PENTASTAR_VERTICAL_AL1
                      END_IF/
                      IF/CNT_1<>1
                        RECALL/ALIGNMENT,EXTERNAL,PENTASTAR_VERTICAL_OFFSET_AL1
                      END_IF/
          Then the body of the routine
          And at the end of the routine
          Code:
          ASSIGN/CNT_1=CNT_1+1
          IF_GOTO/CNT_1<=QTY_1GOTO = START_MEAS
          Last edited by BKulpa; 09-16-2019, 08:01 AM.

          Comment


          • #8
            Oldie but goodie:
            PcDmis 2015.1 SP10 CAD++
            Global 7-10-7 DC800S

            Comment

            Related Topics

            Collapse

            Working...
            X