hexagon logo

Looping a Loop?

Good morning all I hope you are all having a good day, I have a program that contains a simple loop to check multiple pockets on a valve rotator body, We have recently set up a few other machines to make the same part and I want to loop the entire program Loop included to check multiple parts at once.

My question is, can you Loop a Loop?
Or will the end point of the Loop checking multiple pockets cancel out the Loop that would be needed at the start of the program.
Parents
  • IF_GOTO/C3.INPUT>=2,GOTO = CONTINUE
                IF_GOTO/C3.INPUT==1,GOTO = END
    CONTINUE     =LABEL/
             LOOP/END
                IF_GOTO/C3.INPUT==2,GOTO = END
                RECALL/ALIGNMENT,INTERNAL,3
    8          =ALIGNMENT/START,RECALL:3,LIST=YES
                  ALIGNMENT/TRANS_OFFSET,XAXIS,-83.11
                ALIGNMENT/END
                TIP/T1A-90B-90, SHANKIJK=-1, -0.007, 0.017, ANGLE=-90.548
    ALOOP_1    =LOOP/START,ID=YES,NUMBER=2,START=1,SKIP=,
                  OFFSET:XAXIS=0,YAXIS=50.8,ZAXIS=0,ANGLE=0
                  CLEARP/XMINUS,-7,XMINUS,0,ON

    This is what I do after the first loop. both loops are set at 2. At the beginning of program, I ask "How Many Parts Do You Want To Run?" C3.INPUT
    IF_GOTO/C3.INPUT==4,GOTO = CONTINUE_2
              IF_GOTO/C3.INPUT==3,GOTO = END
    CONTINUE_2   =LABEL/
             LOOP/END
    END        =LABEL/

    This is at the End of second loop
    INCORRECT_INPUT=LABEL/
    C3         =COMMENT/INPUT,NO,FULL SCREEN=NO,
                How Many Parts Do You Want To Run?
                IF_GOTO/C3.INPUT<1,GOTO = INCORRECT_INPUT
                IF_GOTO/C3.INPUT>4,GOTO = INCORRECT_INPUT
    LOOP_1     =LOOP/START,ID=YES,NUMBER=2,START=1,SKIP=,
                  OFFSET:XAXIS=0,YAXIS=50.8,ZAXIS=0,ANGLE=0

    just to idiot proof it. since my fixture can only hold 4 pieces, any other number besides 1-4, wont work. This is at the beginning
  • Can you run this with say 3 parts?

    I have been doing some experiments to run a 5x3 fixture so I can measure 15 parts. Obviously there are times where there may be less parts than that. I can easily select how many loops are needed in blocks of 5, but say I wanted to run 12 parts the only way I can make it work is to have a on hit error command in there which then continues the loop. but it has to do it three times for the missing parts.

    Was just wondering if you had a way of telling it to miss that final part off if you were running less than 4.
Reply
  • Can you run this with say 3 parts?

    I have been doing some experiments to run a 5x3 fixture so I can measure 15 parts. Obviously there are times where there may be less parts than that. I can easily select how many loops are needed in blocks of 5, but say I wanted to run 12 parts the only way I can make it work is to have a on hit error command in there which then continues the loop. but it has to do it three times for the missing parts.

    Was just wondering if you had a way of telling it to miss that final part off if you were running less than 4.
Children
No Data