hexagon logo

Ttp prehit speed trick

PREHIT/0.08
            RETRACT/0.08
            FORMAT/TEXT,OPTIONS, ,HEADINGS,SYMBOLS, ;NOM,TOL,MEAS,DEV,OUTTOL, , 
CCV_AFT_WS_P5=FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN
            THEO/<-3.5471,-0.8887,5.0756>,<-0.962246,0.1736482,-0.2095924>
            ACTL/<-3.5348,-0.8909,5.0783>,<-0.962246,0.1736482,-0.2095924>
            TARG/<-3.5471,-0.8887,5.0756>,<-0.962246,0.1736482,-0.2095924>
            SNAP=NO
            SHOW FEATURE PARAMETERS=NO
            SHOW CONTACT PARAMETERS=YES
              AVOIDANCE MOVE=BEFORE,DISTANCE=0.5
            SHOW HITS=NO
ASSIGN/VPHTAG=DOT(CCV_AFT_WS_P5.XYZ-CCV_AFT_WS_P5.TXYZ,CCV_AFT_WS_P5.IJK)
            PREHIT/.04+VPHTAG
            RETRACT/.04+VPHTAG


I was messing around with ways to make my production programs faster and came up with this little idea. The above code starts out with an .08" prehit/retract value. The first point in a set of points on a surface is taken, and the t-value is calculated. The measured t-value is then added to a .040" prehit/retract. (If the t-value is negative it works the same way)

This allows the probe to be .04" away from the part even if the surface is heavy or light with stock. For larger surfaces, I pick another point in the set and do the same thing so the probe position will always be the same relative distance away from the part.

Dunno if this will help anybody, and I'm sure there are some out there that are already way ahead of me on this one. Just thought I'd share it for those interested.
  • That's pretty awesome, I'm having a hard time dropping my probe into an oring groove, so I'll try this tonight!
  • If you are reporting the features AS YOU GO (as in the DIM/LOC follows the point in the program) you can simply add the DIM1.MEAS.T to your 0.04 for your prehit/retract values.

    C1         =AUTO/EDGE POINT,SHOWALLPARAMS = YES
                THEO/0,308,0,1,0,0
                ACTL/0,308,0,1,0,0
                TARG/0,308,0,1,0,0
                THEO_THICKNESS = 0,RECT,EDGE THEO_THICKNESS = 0,ONERROR = NO,$
                AUTO MOVE = BOTH,DISTANCE = 7,RMEAS = None,None,A5,MEASURE ORDER = SURFACE,$
                SURFACE NORMAL = 0,0,1,$
                INIT = 0,PERM = 0,SPACER = 3,INDENT = 3,DEPTH = 0.3
    DIM D001= LOCATION OF POINT C1  UNITS=MM ,$
    GRAPH=OFF  TEXT=OFF  MULT=1.00  OUTPUT=BOTH
    AX   NOMINAL     +TOL       -TOL       MEAS        DEV      OUTTOL   
    X       0.000      2.000      2.000      0.000      0.000      0.000 ----#----
    Y     308.000      2.000      2.000    308.000      0.000      0.000 ----#----
    Z       0.000      2.000      2.000      0.000      0.000      0.000 ----#----
    T       0.000      2.000      2.000      0.000      0.000      0.000 ----#----
    END OF DIMENSION D001
                ASSIGN/V1 = D001.T.MEAS+0.04
                PREHIT/ V1
                RETRACT/ V1
    


    Then, for large areas, simply copy those 3 lines (assign/prehit/retract) and just change the D001 to the latest dimension ID.
  • Yea, I was just looking for a way to save code length too. That's why I used the DOT product function. Our programs can get EXTREMELY long, so any line savings helps.