hexagon logo

Looping not working right after a tool change and calibration??? What's wrong???

So, I tried to get my feet a little bit wet with looping, and I'm missing something or doing something wrong here and I can't figure it out. Basically, I've been running one part with a manual alignment and then 2 DCC alignments. That way I could open up the part number, do a manual alignment on the table where the part is, and after the first setup, I can just start the program where DCC begins so I can be more productive by just slapping a new part up there and running it DCC. I want to be able to run more than one part at once by just offsetting it in Y. I have 2 parts on the table, the original part location, and then after the first part is done probing, I ask it to move down 11.5" in Y and re-measure the second part. I have 2 probes that I'm using. It measure with a 4mmx20mm probe first, then changes to a 1mmx40 mm, calibrates, inspects some of the finer holes, then it switches back to the 4mmx20mm probe so the next part can be ready and it calibrates that probe as well. I'm running into a problem where basically It inspects the first part just fine with both probes on all the holes...it then inspects the second part with the 4mmx20mm probe just fine...but when it does a probe change to the 1mmx40mm probe, it tries to calibrate off my sphere...but the sphere has "moved" -11.5 inches in Y- , the same amount of space that the offsets for the loop is telling my program. I can't figure this out, because the 4mmx20 mm probe does just fine on the second part...it's the second probe for some reason that has trouble. I'm going crazy here! I'll post the code so y'all can see it. I will take any suggestions or hints. I know some people might not like how I'm running it? Basically it might be more efficient to run all of the first probe on BOTH parts, then change tools and probe both parts as well. Yes, the tool changing might be excessive. But...it shouldn't affect the program and do what it's doing to me??? This doesn't make sense.

MODE/DCC
V1 =LOOP/START,ID=YES,NUMBER=2,START=1,SKIP=,
OFFSET:XAXIS=0,YAXIS=-11.5,ZAXIS=0,ANGLE=0
MOVESPEED/ 250
TOUCHSPEED/ 3
FLY/ON
MOVE/POINT,NORMAL,<-0.0075,2.3808,7.921>
MOVE/POINT,NORMAL,<4.134,2.3808,2.5197>
PLN2 =FEAT/PLANE,CARTESIAN,TRIANGLE
THEO/<5.7484,1.842,0>,<0,0,1>
ACTL/<5.7485,1.8418,-0.0045>,<0.0002279,-0.0007598,0.9999997>
MEAS/PLANE,3
HIT/BASIC,NORMAL,<3.9052,1.3284,0>,<0,0,1>,<3.9051,1.3 281,-0.0045>,USE THEO=YES
                  (CODE REMOVED TO SAFE SPACE FOR FORUM)
ENDMEAS/
MOVE/POINT,NORMAL,<7.3177,-0.4021,1.109>
MOVE/POINT,NORMAL,<7.3177,-0.4457,-0.5434>
LIN2 =FEAT/LINE,CARTESIAN,UNBOUNDED
THEO/<0.1081,0,-0.6337>,<1,0,0>
ACTL/<0.1079,0.0084,-0.6336>,<1,0.000076,0>
MEAS/LINE,2,ZPLUS
HIT/BASIC,NORMAL,<0.1081,0,-0.6384>,<0,-1,0>,<0.1079,0.0084,-0.6385>,USE THEO=YES
                    (CODE REMOVED TO SAFE SPACE FOR FORUM)
ENDMEAS/
MOVE/POINT,NORMAL,<8.8349,-0.1429,3.0301>
MOVE/POINT,NORMAL,<8.8349,2.464,3.1052>
MOVE/POINT,NORMAL,<-1.0149,2.464,2.9871>
MOVE/POINT,NORMAL,<-0.821,2.464,-0.395>
PNT2 =FEAT/POINT,CARTESIAN
THEO/<0,2.0871,-0.3681>,<-1,0,0>
ACTL/<0.0111,2.0867,-0.368>,<-1,0,0>
MEAS/POINT,1,WORKPLANE
HIT/BASIC,NORMAL,<0,2.0871,-0.3681>,<-1,0,0>,<0.0111,2.0867,-0.368>,USE THEO=YES
ENDMEAS/
A2 =ALIGNMENT/START,RECALL:STARTUP,LIST=YES
ALIGNMENT/LEVEL,ZPLUS,PLN2
ALIGNMENT/TRANS,ZAXIS,PLN2
ALIGNMENT/ROTATE,XPLUS,TO,LIN2,ABOUT,ZPLUS
ALIGNMENT/TRANS,YAXIS,LIN2
ALIGNMENT/TRANS,XAXIS,PNT2
ALIGNMENT/END
TOUCHSPEED/ 1
PREHIT/0.05
RETRACT/0.05
MOVE/POINT,NORMAL,<-0.9451,2.0871,2.4574>
                     (CODE REMOVED TO SAFE SPACE FOR FORUM)
PLN3-DATUM B =FEAT/PLANE,CARTESIAN,TRIANGLE
THEO/<4.7898,11.5,-0.7307>,<0,-1,0>
ACTL/<4.7909,11.5004,-0.7393>,<0.0000402,-0.999999,-0.0014355>
MEAS/PLANE,8
HIT/BASIC,NORMAL,<0.1503,11.5,-0.6915>,<0,-1,0>,<0.1515,11.5001,-0.7002>,USE THEO=YES
                     (PART OF CODE TAKEN OUT TO SAFE SPACE FOR THE FORUM, WAS JUST MEASURING A PLANE)
ENDMEAS/
MOVE/POINT,NORMAL,<8.0074,-0.1971,2.386>
MOVE/POINT,NORMAL,<8.0074,2.5067,2.3753>
PLN4-DATUM A =FEAT/PLANE,CARTESIAN,TRIANGLE
THEO/<5.7571,13.8907,0>,<0,0,1>
ACTL/<5.758,13.8904,-0.0083>,<0.0000803,-0.0002732,1>
MEAS/PLANE,12
               (PART OF CODE TAKEN OUT TO SAFE SPACE FOR THE FORUM, WAS JUST MEASURING A PLANE)
ENDMEAS/
MOVE/POINT,NORMAL,<7.3516,1.0049,3.4112>
              (CODE REMOVED TO SAFE SPACE FOR FORUM)
PLN5-BACKSIDE FOR COMPARISON =FEAT/PLANE,CARTESIAN,TRIANGLE
THEO/<6.2292,16.09,-0.7728>,<0,1,0>
ACTL/<6.2299,16.095,-0.7814>,<-0.0000332,0.9999996,-0.0008982>
MEAS/PLANE,9
HIT/BASIC,NORMAL,<11.4342,16.09,-0.6407>,<0,1,0>,<11.4354,16.0952,-0.6494>,USE THEO=YES
                 (PART OF CODE TAKEN OUT TO SAFE SPACE FOR THE FORUM, WAS JUST MEASURING A PLANE)
ENDMEAS/
MOVE/POINT,NORMAL,<-0.962,5.6591,2.1858>
MOVE/POINT,NORMAL,<-0.5673,5.6591,-0.5041>
PLN3-DATUM C =FEAT/PLANE,CARTESIAN,TRIANGLE
THEO/<0,14.0367,-0.4754>,<-1,0,0>
ACTL/<0.0007,14.0363,-0.4842>,<-0.9999982,0.0000008,0.001918>
MEAS/PLANE,17
HIT/BASIC,NORMAL,<0,16.0305,-0.7623>,<-1,0,0>,<-0.0001,16.0302,-0.7713>,USE THEO=YES
                       (PART OF CODE TAKEN OUT TO SAFE SPACE FOR THE FORUM, WAS JUST MEASURING A PLANE)
ENDMEAS/
MOVE/POINT,NORMAL,<-1.094,0.0399,2.1094>
MOVE/POINT,NORMAL,<2.0704,0.0399,3.2446>
A3 =ALIGNMENT/START,RECALL:STARTUP,LIST=YES
ALIGNMENT/LEVEL,ZPLUS,PLN4-DATUM A
ALIGNMENT/TRANS,ZAXIS,PLN4-DATUM A
ALIGNMENT/ROTATE,YMINUS,TO,PLN3-DATUM B,ABOUT,ZPLUS
ALIGNMENT/TRANS,YAXIS,PLN3-DATUM B
ALIGNMENT/TRANS,XAXIS,PLN3-DATUM C
ALIGNMENT/END
CIR1-LEFT BORE OD =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,OUT,LEAST_SQR
THEO/<2.27,13.795,0.4>,<0,0,1>,2.94,0
ACTL/<2.2748,13.7989,0.3881>,<0,0,1>,2.9428,0
TARG/<2.27,13.795,0.4>,<0,0,1>
START ANG=0,END ANG=360
ANGLE VEC=<1,0,0>
DIRECTION=CCW
SHOW FEATURE PARAMETERS=NO
SHOW CONTACT PARAMETERS=YES
NUMHITS=10,DEPTH=-0.05,PITCH=0
SAMPLE METHOD=SAMPLE_HITS
SAMPLE HITS=0,SPACER=0
AVOIDANCE MOVE=BOTH,DISTANCE=1
FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
SHOW HITS=NO
CIR2-RIGHT BORE OD =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,OUT,LEAST_SQR
THEO/<9.235,13.795,0.4>,<0,0,1>,2.94,0
ACTL/<9.2371,13.7989,0.3881>,<0,0,1>,2.9423,0
TARG/<9.235,13.795,0.4>,<0,0,1>
START ANG=0,END ANG=360
ANGLE VEC=<1,0,0>
DIRECTION=CCW
SHOW FEATURE PARAMETERS=NO
SHOW CONTACT PARAMETERS=YES
NUMHITS=10,DEPTH=-0.05,PITCH=0
SAMPLE METHOD=SAMPLE_HITS
SAMPLE HITS=0,SPACER=0
AVOIDANCE MOVE=BOTH,DISTANCE=1
FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
SHOW HITS=NO
               (CODE REMOVED TO SAFE SPACE FOR FORUM)-CODE FOR MEASURING A BORE 
CIR17-BOTTOM RIGHT CLEARANCE HOLE =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
THEO/<6.276,12.355,-0.315>,<0,0,1>,0.56
ACTL/<6.2787,12.3591,-0.3269>,<0,0,1>,0.566
TARG/<6.276,12.355,-0.315>,<0,0,1>
START ANG=0,END ANG=360
ANGLE VEC=<1,0,0>
DIRECTION=CCW
SHOW FEATURE PARAMETERS=NO
SHOW CONTACT PARAMETERS=YES
NUMHITS=10,DEPTH=0.065,PITCH=0
SAMPLE METHOD=SAMPLE_HITS
SAMPLE HITS=0,SPACER=0
AVOIDANCE MOVE=BOTH,DISTANCE=1
FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
SHOW HITS=NO
                         (CODE REMOVED TO SAFE SPACE FOR FORUM)-WAS CODE FOR NON-IMPORTANT CIRCLES NOT AFFECTED
CIR20-NEXT ADJACENT CLEARANCE HOLE =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
THEO/<5.156,14.295,0>,<0,0,1>,0.56
ACTL/<5.1596,14.2993,-0.0119>,<0,0,1>,0.5678
TARG/<5.156,14.295,0>,<0,0,1>
START ANG=0,END ANG=360
ANGLE VEC=<1,0,0>
DIRECTION=CCW
SHOW FEATURE PARAMETERS=NO
SHOW CONTACT PARAMETERS=YES
NUMHITS=10,DEPTH=0.065,PITCH=0
SAMPLE METHOD=SAMPLE_HITS
SAMPLE HITS=0,SPACER=0
AVOIDANCE MOVE=BOTH,DISTANCE=1
FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
SHOW HITS=NO
CIR21-TOP LEFT CLEARANCE HOLE =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
THEO/<5.276,15.235,-0.315>,<0,0,1>,0.56
ACTL/<5.28,15.239,-0.3269>,<0,0,1>,0.566
TARG/<5.276,15.235,-0.315>,<0,0,1>
START ANG=0,END ANG=360
ANGLE VEC=<1,0,0>
DIRECTION=CCW
SHOW FEATURE PARAMETERS=NO
SHOW CONTACT PARAMETERS=YES
NUMHITS=10,DEPTH=0.065,PITCH=0
SAMPLE METHOD=SAMPLE_HITS
SAMPLE HITS=0,SPACER=0
AVOIDANCE MOVE=BOTH,DISTANCE=1
FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
SHOW HITS=NO
CIR22-TOP RIGHT CLEARANCE HOLE =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
THEO/<6.276,15.235,-0.2563>,<0,0,1>,0.56
ACTL/<6.2796,15.2389,-0.2681>,<0,0,1>,0.5663
TARG/<6.276,15.235,-0.2563>,<0,0,1>
START ANG=0,END ANG=360
ANGLE VEC=<1,0,0>
DIRECTION=CCW
SHOW FEATURE PARAMETERS=NO
SHOW CONTACT PARAMETERS=YES
NUMHITS=10,DEPTH=0.065,PITCH=0
SAMPLE METHOD=SAMPLE_HITS
SAMPLE HITS=0,SPACER=0
AVOIDANCE MOVE=BOTH,DISTANCE=1
FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
SHOW HITS=NO
MOVE/POINT,NORMAL,<5.5233,2.3556,4.4173>
MOVE/INCREMENT,<0.0007,-0.0011,6>
MOVE/INCREMENT,<9,0.0005,-0.0011>
MOVE/POINT,NORMAL,<17.1669,-20.2313,10.1206>
LOADPROBE/ 1MM X 40MM
TIP/T1A0B0, SHANKIJK=0.0001, -0.0002, 1, ANGLE=0.003
CALIBRATE ACTIVE TIP WITH FEAT_ID=
SPH1-CALIBRATION TOOL =FEAT/SPHERE,CARTESIAN,OUT
THEO/<2.6061,-8.3221,4.4226>,<0,0,1>,0.9813
ACTL/<2.5995,-8.3296,4.4315>,<-0.0000314,0.0007901,0.9999997>,0.9841
MEAS/SPHERE,13
HIT/BASIC,NORMAL,<2.6428,-8.3562,4.9107>,<0.0749079,-0.0696,0.9947586>,<2.6318,-8.3602,4.9217>,USE THEO=YES
MOVE/CIRCULAR
HIT/BASIC,NORMAL,<2.8644,-8.5553,4.769>,<0.5260029,-0.4749804,0.7054889>,<2.8555,-8.5614,4.7817>,USE THEO=YES
MOVE/CIRCULAR
HIT/BASIC,NORMAL,<2.9066,-8.0994,4.7401>,<0.6124523,0.453895,0.6472105>,<2.8 97,-8.1022,4.7508>,USE THEO=YES
MOVE/CIRCULAR
              (CODE REMOVED TO SAFE SPACE FOR FORUM---WAS REST OF SPHERE-CAL CODING)
ENDMEAS/
​
Parents
  • Okay....if this helps anybody help me solve this problem, I might be onto something? So, I had to draw 2 different cal-spheres in the program to get each probe change to work properly. I don't know why, but if I tried using the same sphere for both single tip calibrations, it just wouldn't work. So I drew 2 different cal spheres when I first made this program a few weeks ago. But its confusing me because when I open the second single tip calibration command in the program it's using the first sphere for both calibrations, not 1 each. So it might be getting screwed up somehow that way...
  • @R2ah1ze1I I'm not exactly sure what I did (I made this program a few weeks ago and am just now adapting it for the loops). I know that I copied the sphere...and then just pasted it for the second calibration. I'm thinking that my problem should have been probing it the second time with the second probe. (I prob created the 2nd sphere or did the second autocal box with the first probe still selected). I am NOT breaking the tools down at all, but I am manually swapping them out (I don't have a tool changer). Even if I did have a tool changer, I was under the impression that I would still have to do an autocal or a single tip calibration for whatever probe I just changed, correct? I'm pretty sure I copied and pasted the sphere and didn't change the name at all.
Reply
  • @R2ah1ze1I I'm not exactly sure what I did (I made this program a few weeks ago and am just now adapting it for the loops). I know that I copied the sphere...and then just pasted it for the second calibration. I'm thinking that my problem should have been probing it the second time with the second probe. (I prob created the 2nd sphere or did the second autocal box with the first probe still selected). I am NOT breaking the tools down at all, but I am manually swapping them out (I don't have a tool changer). Even if I did have a tool changer, I was under the impression that I would still have to do an autocal or a single tip calibration for whatever probe I just changed, correct? I'm pretty sure I copied and pasted the sphere and didn't change the name at all.
Children
No Data