I'm trying to optimize path of a routine that measures anywhere from 1 to 4 parts set on a fixture (variable QTY.INPUT). Fixture positions are spaced 5" apart from each other about x axis.
I'm looping each probe angle. I have the routine running now, with a loop for each probe angle, measuring fixture positions 1-4 for each probe angled loop...
--I'd like to further optimize the machine path so every other probe angle starts at last part position (QTY.INPUT) and works its way back to position 1 on the fixture, this way it eliminates traveling back to position1 a handful of times...
Here's some code for example of what I'm doing. I've truncated the actual features as they aren't relevant.
Any tips on what I'm doing wrong to get routine to run loop L_1 in part order 1-4, then loop L_2 as 4-1, then loop L_3 as 1-4, loop L_4 as 4-1 again, etc?
I've got 8 probe/wrist changes to measure one part, so it would save traversing to position four redundant times. This should cut 20 seconds off the routine run time. We run 24/7 here, so every second counts.
Should I use do/while with an alignment shift at beginning of do loop of X = -5" for the inverted execution order instead of standard loop/start loop/end command?
Should I just modify ASSIGN/INVERSE to start with -1?
DO array references even work within do/while loops?
I'm looping each probe angle. I have the routine running now, with a loop for each probe angle, measuring fixture positions 1-4 for each probe angled loop...
--I'd like to further optimize the machine path so every other probe angle starts at last part position (QTY.INPUT) and works its way back to position 1 on the fixture, this way it eliminates traveling back to position1 a handful of times...
Here's some code for example of what I'm doing. I've truncated the actual features as they aren't relevant.
Any tips on what I'm doing wrong to get routine to run loop L_1 in part order 1-4, then loop L_2 as 4-1, then loop L_3 as 1-4, loop L_4 as 4-1 again, etc?
I've got 8 probe/wrist changes to measure one part, so it would save traversing to position four redundant times. This should cut 20 seconds off the routine run time. We run 24/7 here, so every second counts.
Should I use do/while with an alignment shift at beginning of do loop of X = -5" for the inverted execution order instead of standard loop/start loop/end command?
Should I just modify ASSIGN/INVERSE to start with -1?
DO array references even work within do/while loops?
Code:
TYQUESTION=LABEL/ QTY =COMMENT/INPUT,NO,FULL SCREEN=YES, How many parts are in this shot? IF/QTY.INPUT-INT(QTY.INPUT)<>0 OR !(QTY.INPUT>=1 AND QTY.INPUT<=4) COMMENT/OPER,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO, Invalid input! Please input a value between 1 and 4. GOTO/QTYQUESTION END_IF/ $$ NO, *************************************************Start of part location for Position 1, T1A0B0 *************************************************Copy/offset X= 5.000" qty:3 L_1 =LOOP/START,ID=YES,NUMBER=QTY.INPUT,START=1,SKIP=, OFFSET:XAXIS=5,YAXIS=0,ZAXIS=0,ANGLE=0 LOOP/END $$ NO, ******************************************************************END OF 2x40 T1A0B0****************************************************** TIP/T1A90B180, SHANKIJK=-0.00042, -1, 0.00041, ANGLE=179.99403 MOVE/POINT,NORMAL,<0.00000,-0.10000,4.00000> ASSIGN/INVERSE_2=QTY.INPUT L_2 =LOOP/START,ID=YES,NUMBER=INVERSE_2,START=QTY.INPUT,SKIP=, OFFSET:XAXIS=-5,YAXIS=0,ZAXIS=0,ANGLE=0 $$ NO, ******************************************************************Start of 2x40 T1A90B180****************************************************** ASSIGN/INVERSE_2=INVERSE_2-1 LOOP/END $$ NO, ******************************************************************End of 2x40 T1A90B180****************************************************** TIP/T1A90B0, SHANKIJK=0.00042, 1, -0.00041, ANGLE=-179.99289 L_3 =LOOP/START,ID=YES,NUMBER=QTY.INPUT,START=1,SKIP=, OFFSET:XAXIS=5,YAXIS=0,ZAXIS=0,ANGLE=0 $$ NO, ******************************************************************START of 2x40 T1A90B0****************************************************** LOOP/END $$ NO, ******************************************************************END of 2x40 T1A90B0****************************************************** TIP/T1A0B0, SHANKIJK=0.00012, 0.00045, 1, ANGLE=-0.02387 ASSIGN/INVERSE_4=QTY.INPUT L_4 =LOOP/START,ID=YES,NUMBER=INVERSE_4,START=QTY.INPUT,SKIP=, OFFSET:XAXIS=-5,YAXIS=0,ZAXIS=0,ANGLE=0 $$ NO, ******************************************************************START of 2x40 T1A0B0****************************************************** ASSIGN/INVERSE_4=INVERSE_4-1 LOOP/END $$ NO, ***********************************************************************************************