Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Universial Probe Post


Recommended Posts

Hello everyone,
   I guess I asked a bunch of questions and I think it is time for me to give back to the community.  I recently just added FANUC PROBING and HAAS Probing through out Renishaw.   

   Fanuc probing is pretty much straight forward but the HAAS kind of hard to use in the interface and I will improve from time to time, I'll update ever 2 months if you guys have any questions.

 Enjoy (as I already did)

 

===============================

Under...

HaasProbeNumber: 0
sProbeNumber: 0
sBossOD: 0
sIDPocket: 0

XPosEdgeFindValue: 0
YNegEdgeFindValue: 0
XNegEdgeFindValue: 0
YPosEdgeFindValue: 0
UniversialProbeProgramNumber: 0

XDistanceValue: 0

HaasXDistanceValue: 0
HaasYDistanceValue: 0

HaasXPosCornerValue: 0

YDistanceValue: 0
ThreePointsAngleBValue: 0
HaasInsideCorners:0
ZOffSetValue: 0
HaasProbeHeight: 0

ApplyCustomdRillParameter: 0
fmt "W" 4       sHaasProbeNumber
fmt "S" 4		SProbeNumber
fmt "D" 2		sBossOD 
fmt "D" 2		sIDPocket

fmt "X" 2		XPosEdgeFindValue
fmt "X" 2		YNegEdgeFindValue
fmt "X" 2		XNegEdgeFindValue
fmt "X" 2		YPosEdgeFindValue
fmt "P" 4       UniversialProbeProgramNumber
fmt "X" 2		XDistanceValue
fmt "D" 2       HaasXDistanceValue
fmt "D" 2       HaasXPosCornerValue
fmt "D" 2       HaasYDistanceValue
fmt "Y" 2		YDistanceValue

fmt "Z"  2       OpRtrPlane

fmt "B" 2		ShiftB_AnglesValue
fmt "B" 2		ThreePointsAngleBValue
fmt "Z" 2		ZOffSetValue
fmt "H" 2       HaasProbeHeight
fmt "E" 2       HaasProbeSurfaceHeight
fmt     4       HaasInsideCorners
fmt     4       ApplyCustomdRillParameter

fmt "D" 2		IDProbing
fmt "D" 2		ODProbing
pparameter$ # Run parameter table
          if prmcode$ = 15071, XPosEdgeFindValue = rpar(sparameter$,1)
          if prmcode$ = 15072, YNegEdgeFindValue = rpar(sparameter$,1)
          if prmcode$ = 15073, UniversialProbeProgramNumber = rpar(sparameter$,1)
          if prmcode$ = 15074, XNegEdgeFindValue = rpar(sparameter$,1)
          if prmcode$ = 15075, YPosEdgeFindValue = rpar(sparameter$,1)
          if prmcode$ = 15076, XDistanceValue = rpar(sparameter$,1)
          if prmcode$ = 15077, YDistanceValue = rpar(sparameter$,1)
          if prmcode$ = 15078, ShiftB_AnglesValue = rpar(sparameter$,1)
          if prmcode$ = 15079, ThreePointsAngleBValue = rpar(sparameter$,1)
          if prmcode$ = 15080, ZOffSetValue = rpar(sparameter$,1)
          if prmcode$ = 15081, ApplyCustomdRillParameter = rpar(sparameter$,1)
#Region Fanuc Probe Secions
#Region PFanucProbeIDPOCKET A1.
PFanucProbeIDPOCKET
    if nextdc$ = 17 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0, #OD BORE
	  if ZOffSetValue = 0 & ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
	   if YDistanceValue > 0 & XDistanceValue > 0 & (YDistanceValue = XDistanceValue),
        if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,
         [
	      *OpRtrPlane, no_spc$, "(INSIDE DIAMETER SET)", e$
	      pbld, "G1", *operation_depth, *feed, no_spc$, e$
	      [
		   if OriginNumber > -1, 
		   sProbeNumber = UserOrigin + 1
          ]
         sIDPocket = XDistanceValue
		 "G65", *UniversialProbeProgramNumber, "A1.", *sIDPocket, *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
         "G0 G90", pfzout, e$
         ]
#EndRegion

#Region PFanucProbeODBOSS A2.
PFanucProbeODBOSS
  if nextdc$ = 17 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0, #OD BOSS
   if ZOffSetValue <> 0 & ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
    if YDistanceValue > 0 & XDistanceValue > 0 & (YDistanceValue = XDistanceValue),
     if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,	   
       [
	    *OpRtrPlane, no_spc$, "(OUTSIDE DIAMETER SET)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sBossOD = XDistanceValue
		 "G65", *UniversialProbeProgramNumber, "A2.", *sBossOD, *ZOffSetValue, *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
		 "G0 G90", pfzout, e$
		]
#EndRegion

#Region PFanucProbeXYMidPointPocket A3.
PFanucProbeXYMidPointPocket #X Mid Pocket
  if drillcyc$ = 17 & operation_depth <> 0 & (ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0), 
   if ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0 & ZOffSetValue = 0,
    if XDistanceValue > 0 & YDistanceValue = 0 & not(YDistanceValue = XDistanceValue),
     if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,
       [
	    *OpRtrPlane, no_spc$, "(INSIDE X MIDDLE SET)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 "G65", *UniversialProbeProgramNumber, "A3.", *XDistanceValue, *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
		 "G0 G90", pfzout, e$
		]
		
  if drillcyc$ = 17 & operation_depth <> 0 & (ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0), 
   if ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0 & ZOffSetValue = 0,
    if XDistanceValue = 0 & YDistanceValue <> 0 & not(YDistanceValue = XDistanceValue),
     if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,
        [
	     *OpRtrPlane, no_spc$, "(INSIDE Y MIDDLE SET)", e$
         pbld, "G1", *operation_depth, *feed, no_spc$, e$
	      [
		   if OriginNumber > -1, 
		   sProbeNumber = UserOrigin + 1
          ]
		  "G65", *UniversialProbeProgramNumber, "A3.", *YDistanceValue, *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
		  "G0 G90", pfzout, e$
		 ]	 
#EndRegion

#Region PFanucProbeXYMidPointBoss A4.
PFanucProbeXYMidPointBoss #XY MID BOSS
  if drillcyc$ = 17 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0, #OD BOSS
   if ApplyCustomdRillParameter = 1 & ZOffSetValue <> 0 & ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
    if XDistanceValue > 0 & YDistanceValue = 0 & not(YDistanceValue = XDistanceValue),
     if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,	   
       [
	    *OpRtrPlane, no_spc$, "(OUTSIDE X MIDDLE SET)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 "G65", *UniversialProbeProgramNumber, "A4.", *XDistanceValue, *ZOffSetValue, *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
		 "G0 G90", pfzout, e$
		]
		
      if drillcyc$ = 17 & XDistanceValue = 0 & YDistanceValue > 0 & ZOffSetValue <> 0 & not(YDistanceValue = XDistanceValue),
	   if ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
	    if ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
        [
	     *OpRtrPlane, no_spc$, "(OUTSIDE Y MIDDLE SET)", e$
         pbld, "G1", *operation_depth, *feed, no_spc$, e$
	      [
		   if OriginNumber > -1, 
		   sProbeNumber = UserOrigin + 1
          ]
		  "G65", *UniversialProbeProgramNumber, "A4.", *YDistanceValue, *ZOffSetValue, *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
		  "G0 G90", pfzout, e$
		 ]
#EndRegion

#Region PFanucProbeXPosEdgeFindValue A5.
PFanucProbeXPosEdgeFindValue #X+ Edge Find
  if nextdc$ = 17 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
   if XPosEdgeFindValue = 1 & YNegEdgeFindValue = 0,
    if XNegEdgeFindValue = 0 & YPosEdgeFindValue = 0,
     if XDistanceValue = 0 & YDistanceValue = 0  & ZOffSetValue = 0,
	  if ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
       [
	    *OpRtrPlane, no_spc$, "(X+ DIRECTION EDGE FIND)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 "G65", *UniversialProbeProgramNumber, "A5.", "X0.", *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
		 "G0 G90", pfzout, e$
		]
#EndRegion

#Region PFanucProbeXNegativeEdgeFind A6.
PFanucProbeXNegativeEdgeFind #X- Edge Find
  if nextdc$ = 17 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
   if XPosEdgeFindValue = 0 & YNegEdgeFindValue = 0,
    if XNegEdgeFindValue = 1 & YPosEdgeFindValue = 0,
     if XDistanceValue = 0 & YDistanceValue = 0  & ZOffSetValue = 0,
	  if ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
       [
	    *OpRtrPlane, no_spc$, "(X- DIRECTION EDGE FIND)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 "G65", *UniversialProbeProgramNumber, "A6.", "X0.", *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
		 "G0 G90", pfzout, e$
		]
#EndRegion

#Region PFanucProbeYPosEdgeFindValue A7.
PFanucProbeYPosEdgeFindValue #Y+ Edge Find
  if nextdc$ = 17 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
   if XPosEdgeFindValue = 0 & YNegEdgeFindValue = 0,
    if XNegEdgeFindValue = 0 & YPosEdgeFindValue = 1,
     if XDistanceValue = 0 & YDistanceValue = 0  & ZOffSetValue = 0,
	  if ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
       [
	    *OpRtrPlane, no_spc$, "(Y+ DIRECTION EDGE FIND)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 "G65", *UniversialProbeProgramNumber, "A7.", "Y0.", *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
		 "G0 G90", pfzout, e$
		]
#EndRegion

#Region PFanucProbeYNegativeEdgeFind A8.
PFanucProbeYNegativeEdgeFind #Y- Edge Find
  if nextdc$ = 17 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
   if XPosEdgeFindValue = 0 & YNegEdgeFindValue = 1,
    if XNegEdgeFindValue = 0 & YPosEdgeFindValue = 0,
     if XDistanceValue = 0 & YDistanceValue = 0  & ZOffSetValue = 0,
	  if ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
       [
	    *OpRtrPlane, no_spc$, "(Y- DIRECTION EDGE FIND)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 "G65", *UniversialProbeProgramNumber, "A8.", "Y0.", *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
		 "G0 G90", pfzout, e$
		]
#EndRegion

#Region pFanucProbeSurfaceFind A9.
pFanucProbeSurfaceFind
  if nextdc$ = 17 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
   if XPosEdgeFindValue = 0 & YNegEdgeFindValue = 0,
    if XNegEdgeFindValue = 0 & YPosEdgeFindValue = 0,
     if XDistanceValue = 0 & YDistanceValue = 0  & ZOffSetValue = 0,
	  if ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
       [
	    *OpRtrPlane, no_spc$, "(Z SURFACE FIND)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 "G65", *UniversialProbeProgramNumber, "A9.", *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
		 "G0 G90", pfzout, e$
		]
#EndRegion

#Region PFanucProbeXYThreeePointsAngle A11.
PFanucProbeShiftBAngle 
  if nextdc$ = 17 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
   if ApplyCustomdRillParameter = 1 & ZOffSetValue = 0 & ShiftB_AnglesValue > 0 & ThreePointsAngleBValue = 0,
    if XDistanceValue > 0 & YDistanceValue > 0 & (YDistanceValue = XDistanceValue),
     if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,	   
       [
	    *OpRtrPlane, no_spc$, "(INSIDE DIAMETER SET = 3-POINT TOUCH)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sBossOD = XDistanceValue
		 "G65", *UniversialProbeProgramNumber, "A11.", *sBossOD, *ShiftB_AnglesValue, *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
		 "G0 G90", pfzout, e$
		]
#EndRegion

#Region PFanucProbeXYThreeePointsAngle A12.
PFanucProbeXYThreeePointsAngle
   if nextdc$ = 17 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0 & ThreePointsAngleBValue > 0,
    if ZOffSetValue <> 0 & ShiftB_AnglesValue = 0 & ThreePointsAngleBValue > 0,
     if XDistanceValue > 0 & YDistanceValue > 0 & (YDistanceValue = XDistanceValue),
      if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,	   
       [
	    *OpRtrPlane, no_spc$, "(OUTSIDE DIAMETER SET = 3-POINT TOUCH)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sIDPocket = XDistanceValue
		 "G65", *UniversialProbeProgramNumber, "A12.", *sIDPocket, *ThreePointsAngleBValue, *ZOffSetValue, *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
		 "G0 G90", pfzout, e$
		]
#EndRegion
#EndRegion End Fanuc Probe Secions

#Region Haas Probe Secions
#Region PHaasProbeIDPOCKET A10. FINISHED
PHaasProbeIDPOCKET
    if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0, #OD BORE
	  if ZOffSetValue = 0 & ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
	   if YDistanceValue > 0 & XDistanceValue > 0 & (YDistanceValue = XDistanceValue),
        if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,
         [
	      *OpRtrPlane, no_spc$, "(BORE)", e$
	      pbld, "G1", *operation_depth, *feed, no_spc$, e$
	      [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sHaasProbeNumber = g_wcs
         sIDPocket = XDistanceValue
         "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A10.", *sIDPocket, e$
         "G0 G90", pfzout, e$
         ]
#EndRegion

#Region PHaasProbeODBOSS A11. FINISHED
PHaasProbeODBOSS
  if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0, #OD BOSS
   if ZOffSetValue <> 0 & ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
    if YDistanceValue > 0 & XDistanceValue > 0 & (YDistanceValue = XDistanceValue),
     if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,	   
       [
	    *OpRtrPlane, no_spc$, "(BOSS)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sBossOD = XDistanceValue
		 sHaasProbeNumber = g_wcs
		 HaasProbeSurfaceHeight = ZOffSetValue
		 "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A11.", *sBossOD, *HaasProbeSurfaceHeight, e$
		 "G0 G90", pfzout, e$
		]
#EndRegion

#Region PHaasProbeXYMidPointPocket A15. - A17. FINISHED
PHaasProbeXYMidPointPocket #X Mid Pocket
  if nextdc$ = 16 & operation_depth <> 0 & (ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0), 
   if ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0 & ZOffSetValue = 0,
    if XDistanceValue > 0 & YDistanceValue = 0 & not(YDistanceValue = XDistanceValue),
     if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,	   
       [
	    *OpRtrPlane, no_spc$, "(POCKET X AXIS)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sHaasProbeNumber = g_wcs
		 HaasXPosCornerValue = XDistanceValue
		 "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A15.", *HaasXPosCornerValue, e$
		 "G0 G90", pfzout, e$
		]
		
      if XDistanceValue = 0 & YDistanceValue > 0 & ZOffSetValue = 0 & not(YDistanceValue = XDistanceValue), #Y Mid Pocket
       if ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
        [
	     *OpRtrPlane, no_spc$, "(POCKET Y AXIS)", e$
         pbld, "G1", *operation_depth, *feed, no_spc$, e$
	      [
		   if OriginNumber > -1, 
		   sProbeNumber = UserOrigin + 1
          ]
		  sHaasProbeNumber = g_wcs
		  HaasYDistanceValue = YDistanceValue
		  "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A17.", *HaasYDistanceValue, e$
		  "G0 G90", pfzout, e$
		 ]	 
#EndRegion

#Region PHaasProbeXYMidPointBoss A16. FINISHED
PHaasProbeXYMidPointBoss #XY MID BOSS
  if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0, #OD BOSS
   if ApplyCustomdRillParameter = 1 & ZOffSetValue <> 0 & ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
    if XDistanceValue > 0 & YDistanceValue = 0 & not(YDistanceValue = XDistanceValue),
     if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,	   
       [
	    *OpRtrPlane, no_spc$, "(WEB X AXIS)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sHaasProbeNumber = g_wcs
		 HaasXDistanceValue = XDistanceValue
		 HaasProbeHeight = ZOffSetValue
         "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A13.", *HaasXDistanceValue, *HaasProbeHeight, e$
		 "G0 G90", pfzout, e$
		]
		
  if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0, #OD BOSS
   if ApplyCustomdRillParameter = 1 & ZOffSetValue <> 0 & ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
    if XDistanceValue = 0 & YDistanceValue > 0 & not(YDistanceValue = XDistanceValue),
     if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,	
        [
	     *OpRtrPlane, no_spc$, "(WEB Y AXIS)", e$
         pbld, "G1", *operation_depth, *feed, no_spc$, e$
	      [
		   if OriginNumber > -1, 
		   sProbeNumber = UserOrigin + 1
          ]
		 sHaasProbeNumber = g_wcs
		 HaasYDistanceValue = YDistanceValue
		 HaasProbeHeight = ZOffSetValue
         "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A16.", *HaasYDistanceValue, *HaasProbeHeight, e$
		 "G0 G90", pfzout, e$
		 ]
#EndRegion

#Region PHaasProbeXPosEdgeFindValue A18. - D4 FINISHED
PHaasProbeXPosEdgeFindValue #X+ Edge Find
  if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
   if XPosEdgeFindValue = 1 & YNegEdgeFindValue = 1,
    if XNegEdgeFindValue = 0 & YPosEdgeFindValue = 0 & ShiftB_AnglesValue = 0,
     if XDistanceValue = 0 & YDistanceValue = 0  & ZOffSetValue <> 0,
	  if ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
       [
	    *OpRtrPlane, no_spc$, "(BACK LEFT - OUTSIDE CORNER)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sHaasProbeNumber = g_wcs
		 HaasProbeSurfaceHeight = ZOffSetValue
         "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A18. D4", *HaasProbeSurfaceHeight, e$
		 "G0 G90", pfzout, e$
		]
#EndRegion

#Region PHaasProbeXNegativeEdgeFind A18. - D3 FINISH
PHaasProbeXNegativeEdgeFind #X- Edge Find
  if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
   if XPosEdgeFindValue = 0 & YNegEdgeFindValue = 0,
    if XNegEdgeFindValue = 1 & YPosEdgeFindValue = 1,
     if XDistanceValue = 0 & YDistanceValue = 0 & ZOffSetValue <> 0,
	  if ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
       [
	    *OpRtrPlane, no_spc$, "(BACK RIGHT - OUTSIDE CORNER)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sHaasProbeNumber = g_wcs
		 HaasProbeSurfaceHeight = ZOffSetValue
         "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A18. D3", *HaasProbeSurfaceHeight, e$
		 "G0 G90", pfzout, e$
		]
#EndRegion

#Region PHaasProbeYPosEdgeFindValue A18. - 1 FINISHED
PHaasProbeYPosEdgeFindValue #Y+ Edge Find
  if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
   if XPosEdgeFindValue = 1 & YNegEdgeFindValue = 1,
    if XNegEdgeFindValue = 0 & YPosEdgeFindValue = 0,
     if XDistanceValue = 0 & YDistanceValue = 0 & ZOffSetValue <> 0,
	  if ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
       [
	    *OpRtrPlane, no_spc$, "(FRONT LEFT - OUTSIDE CORNER)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sHaasProbeNumber = g_wcs
		 HaasProbeSurfaceHeight = ZOffSetValue
         "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A18. D1", *HaasProbeSurfaceHeight, e$
		 "G0 G90", pfzout, e$
		]
#EndRegion

#Region PHaasProbeYNegativeEdgeFind A18. - D2 FINISH
PHaasProbeYNegativeEdgeFind #Y- Edge Find
  if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
   if XPosEdgeFindValue = 0 & YNegEdgeFindValue = 0,
    if XNegEdgeFindValue = 1 & YPosEdgeFindValue = 1,
     if XDistanceValue = 0 & YDistanceValue = 0  & ZOffSetValue <> 0,
	  if ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
       [
	    *OpRtrPlane, no_spc$, "(FRONT RIGHT - OUTSIDE CORNER)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sHaasProbeNumber = g_wcs
		 HaasProbeSurfaceHeight = ZOffSetValue
         "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A18. D2", *HaasProbeSurfaceHeight, e$
		 "G0 G90", pfzout, e$
		]
#EndRegion

#Region pHaasProbeSurfaceFind A20.
pHaasProbeSurfaceFind
  if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
   if XPosEdgeFindValue = 0 & YNegEdgeFindValue = 0,
    if XNegEdgeFindValue = 0 & YPosEdgeFindValue = 0,
     if XDistanceValue = 0 & YDistanceValue = 0 & ZOffSetValue <> 0,
	  if ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
       [
	    *OpRtrPlane, no_spc$, "(SINGLE SURFACE)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sHaasProbeNumber = g_wcs
		 HaasProbeHeight = ZOffSetValue
		 "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A20.", *HaasProbeHeight, e$
		 "G0 G90", pfzout, e$
		]
#EndRegion

#Region PHaasProbeInnerCornerXNegYNeg A19. - D1, X- Y-
PHaasProbeInnerCornerXNegYNeg 
  if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
   if ApplyCustomdRillParameter = 1 & ZOffSetValue <> 0 & ShiftB_AnglesValue = 1 & ThreePointsAngleBValue = 0,
    if XDistanceValue = 0 & YDistanceValue = 0 & (YDistanceValue = XDistanceValue) & ZOffSetValue <> 0,
     if XNegEdgeFindValue = 1 & YNegEdgeFindValue = 1 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,	   
       [
	    *OpRtrPlane, no_spc$, "(FRONT LEFT - INNER CORNER)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sHaasProbeNumber = g_wcs
		 "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A19. D1", e$
		 "G0 G90", pfzout, e$
		]
#EndRegion

#Region PHaasProbeInnerCornerXPosYNeg A12. - D2, X+ Y-
PHaasProbeInnerCornerXPosYNeg
  if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
   if ApplyCustomdRillParameter = 1 & ZOffSetValue <> 0 & ShiftB_AnglesValue = 1 & ThreePointsAngleBValue = 0,
    if XDistanceValue = 0 & YDistanceValue = 0 & (YDistanceValue = XDistanceValue) & ZOffSetValue <> 0,
     if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 1 & XPosEdgeFindValue = 1 & YPosEdgeFindValue = 0,	   
       [
	    *OpRtrPlane, no_spc$, "(FRONT RIGHT - INNER CORNER)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sHaasProbeNumber = g_wcs
		 "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A19. D2", e$
		 "G0 G90", pfzout, e$
		]
#EndRegion

#Region PHaasProbeInnerCornerXPosYPos A12. - D3, X+ Y+
PHaasProbeInnerCornerXPosYPos
  if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
   if ApplyCustomdRillParameter = 1 & ZOffSetValue <> 0 & ShiftB_AnglesValue = 1 & ThreePointsAngleBValue = 0,
    if XDistanceValue = 0 & YDistanceValue = 0 & (YDistanceValue = XDistanceValue) & ZOffSetValue <> 0,
     if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 1 & YPosEdgeFindValue = 1,	   
       [
	    *OpRtrPlane, no_spc$, "(REAR RIGHT - INNER CORNER)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sHaasProbeNumber = g_wcs
		 "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A19. D3", e$
		 "G0 G90", pfzout, e$
		]
#EndRegion

#Region PHaasProbeInnerCornerXNegYPos A19. - D4, X- Y+
PHaasProbeInnerCornerXNegYPos 
  if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
   if ApplyCustomdRillParameter = 1 & ZOffSetValue <> 0 & ShiftB_AnglesValue = 1 & ThreePointsAngleBValue = 0,
    if XDistanceValue = 0 & YDistanceValue = 0 & (YDistanceValue = XDistanceValue) & ZOffSetValue <> 0,
     if XNegEdgeFindValue = 1 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 1,	   
       [
	    *OpRtrPlane, no_spc$, "(BACK LEFT - INNER CORNER)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sHaasProbeNumber = g_wcs
		 "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A19. D4", e$
		 "G0 G90", pfzout, e$
		]
#EndRegion
#EndRegion End Haas Probe Secions


ptlchg_com      #Tool change common blocks
	  pFanucProbeSurfaceFind
	  PFanucProbeODBOSS
	  PFanucProbeIDPOCKET
	  PFanucProbeXYMidPointPocket
	  PFanucProbeXYMidPointBoss
	  PFanucProbeXYThreeePointsAngle
	  PFanucProbeShiftBAngle
	  PFanucProbeXPosEdgeFindValue
	  PFanucProbeYPosEdgeFindValue
	  PFanucProbeXNegativeEdgeFind
	  PFanucProbeYNegativeEdgeFind

	  pHaasProbeSurfaceFind
	  PHaasProbeODBOSS
	  PHaasProbeIDPOCKET
	  PHaasProbeXYMidPointPocket
	  PHaasProbeXYMidPointBoss
	  PHaasProbeInnerCornerXNegYPos
	  PHaasProbeInnerCornerXPosYPos
	  PHaasProbeInnerCornerXPosYNeg
	  PHaasProbeInnerCornerXNegYNeg
	  PHaasProbeXPosEdgeFindValue
	  PHaasProbeYPosEdgeFindValue
	  PHaasProbeXNegativeEdgeFind
	  PHaasProbeYNegativeEdgeFind
ptlchg0$         #Call from NCI null tool change (tool number repeats)
  pFanucProbeSurfaceFind
  PFanucProbeODBOSS
  PFanucProbeIDPOCKET
  PFanucProbeXYMidPointPocket
  PFanucProbeXYMidPointBoss
  PFanucProbeXYThreeePointsAngle
  PFanucProbeShiftBAngle
  PFanucProbeXPosEdgeFindValue
  PFanucProbeYPosEdgeFindValue
  PFanucProbeXNegativeEdgeFind
  PFanucProbeYNegativeEdgeFind

  pHaasProbeSurfaceFind
  PHaasProbeODBOSS
  PHaasProbeIDPOCKET
  PHaasProbeXYMidPointPocket
  PHaasProbeXYMidPointBoss
  PHaasProbeInnerCornerXNegYPos
  PHaasProbeInnerCornerXPosYPos
  PHaasProbeInnerCornerXPosYNeg
  PHaasProbeInnerCornerXNegYNeg
  PHaasProbeXPosEdgeFindValue
  PHaasProbeYPosEdgeFindValue
  PHaasProbeXNegativeEdgeFind
  PHaasProbeYNegativeEdgeFind

Renishaw Probe.png

Haas Probe.png

Fanuc.png

  • Like 3
Link to comment
Share on other sites
3 hours ago, Leon82 said:

I went the opposite way and made a bunch of different cycles.

we have 2 diferent machines with fanuc and Renishaw and the probing is totally different. one was easy the other needed some extra work


Hello Leon,
   These post blocks as I made for UNIVERSIAL and the reason is I need to save the DRILL CYCLES as GUN DRILL, G1 DRILL, SIEMEN PROBES, MAZAK PROBE... etc.  I truly understand what you've recommended and I am falling under of "HAVING" too many kind of machines.  Therefore, I decided to write one UNIVERSIAL POST for all the machines.  The only differences are the TAP CODEs and PROBING.

 

 

Happy holiday. 

Link to comment
Share on other sites
On ‎1‎/‎4‎/‎2018 at 5:49 AM, jlw™ said:

Can you share a file with samples in it as well?

Hi JLW,
  I just cleaned it up and tested it.  Here it is and enjoy it.

 

PS: I created some ERROR MESSAGE, just incase they TURNED ON RPM, FEED = 0, NO PROBE SUB-PROGRAM#, RETRACT is <.250, DEPTH is < .125
=============================================

Create... 2x post blocks....
#Region Fanuc Probe Secions
PFanucProbe #Inside Diameter Set, A1.
    if nextdc$ = 17 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0, #OD BORE
	 if ZOffSetValue = 0 & ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
	  if YDistanceValue > 0 & XDistanceValue > 0 & (YDistanceValue = XDistanceValue),
       if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,
         [
	      *OpRtrPlane, no_spc$, "(INSIDE DIAMETER SET)", e$
	      pbld, "G1", *operation_depth, *feed, no_spc$, e$
	      [
		   if OriginNumber > -1, 
		   sProbeNumber = UserOrigin + 1
          ]
         sIDPocket = XDistanceValue
		 "G65", *UniversialProbeProgramNumber, "A1.", *sIDPocket, *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
         "G0 G90", pfzout, e$
         ]

    #Outside Diameter Set, A2.
    if nextdc$ = 17 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0, #OD BOSS
	 if ZOffSetValue <> 0 & ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
	  if YDistanceValue > 0 & XDistanceValue > 0 & (YDistanceValue = XDistanceValue),
       if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,	   
       [
	    *OpRtrPlane, no_spc$, "(OUTSIDE DIAMETER SET)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sBossOD = XDistanceValue
		 "G65", *UniversialProbeProgramNumber, "A2.", *sBossOD, *ZOffSetValue, *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
		 "G0 G90", pfzout, e$
		]

    #X Mid Pocket, A3.
    if drillcyc$ = 17 & operation_depth <> 0 & (ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0), 
     if ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0 & ZOffSetValue = 0,
      if XDistanceValue > 0 & YDistanceValue = 0 & not(YDistanceValue = XDistanceValue),
       if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,
       [
	    *OpRtrPlane, no_spc$, "(INSIDE X MIDDLE SET)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 "G65", *UniversialProbeProgramNumber, "A3.", *XDistanceValue, *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
		 "G0 G90", pfzout, e$
		]

    #Inside Y middle set, A3.
    if drillcyc$ = 17 & operation_depth <> 0 & (ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0), 
     if ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0 & ZOffSetValue = 0,
      if XDistanceValue = 0 & YDistanceValue <> 0 & not(YDistanceValue = XDistanceValue),
       if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,
        [
	     *OpRtrPlane, no_spc$, "(INSIDE Y MIDDLE SET)", e$
         pbld, "G1", *operation_depth, *feed, no_spc$, e$
	      [
		   if OriginNumber > -1, 
		   sProbeNumber = UserOrigin + 1
          ]
		  "G65", *UniversialProbeProgramNumber, "A3.", *YDistanceValue, *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
		  "G0 G90", pfzout, e$
		 ]	 

    #XY MID BOSS, A4.
    if drillcyc$ = 17 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
     if ApplyCustomdRillParameter = 1 & ZOffSetValue <> 0 & ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
      if XDistanceValue > 0 & YDistanceValue = 0 & not(YDistanceValue = XDistanceValue),
       if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,	   
       [
	    *OpRtrPlane, no_spc$, "(OUTSIDE X MIDDLE SET)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 "G65", *UniversialProbeProgramNumber, "A4.", *XDistanceValue, *ZOffSetValue, *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
		 "G0 G90", pfzout, e$
		]

    #Outside Y middle set, A4.
    if drillcyc$ = 17 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
     if ApplyCustomdRillParameter = 1 & ZOffSetValue <> 0 & ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
      if XDistanceValue = 0 & YDistanceValue > 0 & not(YDistanceValue = XDistanceValue),
       if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,
        [
	     *OpRtrPlane, no_spc$, "(OUTSIDE Y MIDDLE SET)", e$
         pbld, "G1", *operation_depth, *feed, no_spc$, e$
	      [
		   if OriginNumber > -1, 
		   sProbeNumber = UserOrigin + 1
          ]
		  "G65", *UniversialProbeProgramNumber, "A4.", *YDistanceValue, *ZOffSetValue, *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
		  "G0 G90", pfzout, e$
		 ]

    #X+ DIRECTION EDGE FIND, A5.
    if nextdc$ = 17 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
     if XPosEdgeFindValue = 1 & YNegEdgeFindValue = 0,
      if XNegEdgeFindValue = 0 & YPosEdgeFindValue = 0,
       if XDistanceValue = 0 & YDistanceValue = 0  & ZOffSetValue = 0,
        if ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
        [
	     *OpRtrPlane, no_spc$, "(X+ DIRECTION EDGE FIND)", e$
         pbld, "G1", *operation_depth, *feed, no_spc$, e$
	      [
		   if OriginNumber > -1, 
		   sProbeNumber = UserOrigin + 1
          ]
		 "G65", *UniversialProbeProgramNumber, "A5.", "X0.", *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
		 "G0 G90", pfzout, e$
        ]

    #X- DIRECTION EDGE FIND, A6.
    if nextdc$ = 17 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
     if XPosEdgeFindValue = 0 & YNegEdgeFindValue = 0,
      if XNegEdgeFindValue = 1 & YPosEdgeFindValue = 0,
       if XDistanceValue = 0 & YDistanceValue = 0  & ZOffSetValue = 0,
        if ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
         [
	      *OpRtrPlane, no_spc$, "(X- DIRECTION EDGE FIND)", e$
          pbld, "G1", *operation_depth, *feed, no_spc$, e$
	      [
		   if OriginNumber > -1, 
		   sProbeNumber = UserOrigin + 1
          ]
		 "G65", *UniversialProbeProgramNumber, "A6.", "X0.", *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
		 "G0 G90", pfzout, e$
         ]

    #Y+ DIRECTION EDGE FIND, A7.
    if nextdc$ = 17 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
     if XPosEdgeFindValue = 0 & YNegEdgeFindValue = 0,
      if XNegEdgeFindValue = 0 & YPosEdgeFindValue = 1,
       if XDistanceValue = 0 & YDistanceValue = 0  & ZOffSetValue = 0,
        if ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
         [
	      *OpRtrPlane, no_spc$, "(Y+ DIRECTION EDGE FIND)", e$
          pbld, "G1", *operation_depth, *feed, no_spc$, e$
	      [
		   if OriginNumber > -1, 
		   sProbeNumber = UserOrigin + 1
          ]
		 "G65", *UniversialProbeProgramNumber, "A7.", "Y0.", *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
		 "G0 G90", pfzout, e$
         ]

    #Y- DIRECTION EDGE FIND, A8.
    if nextdc$ = 17 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
     if XPosEdgeFindValue = 0 & YNegEdgeFindValue = 1,
      if XNegEdgeFindValue = 0 & YPosEdgeFindValue = 0,
       if XDistanceValue = 0 & YDistanceValue = 0  & ZOffSetValue = 0,
        if ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
         [
	      *OpRtrPlane, no_spc$, "(Y- DIRECTION EDGE FIND)", e$
          pbld, "G1", *operation_depth, *feed, no_spc$, e$
	      [
		   if OriginNumber > -1, 
		   sProbeNumber = UserOrigin + 1
          ]
		 "G65", *UniversialProbeProgramNumber, "A8.", "Y0.", *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
		 "G0 G90", pfzout, e$
         ]

    #Z SURFACE FIND, A9.
    if nextdc$ = 17 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
     if XPosEdgeFindValue = 0 & YNegEdgeFindValue = 0,
      if XNegEdgeFindValue = 0 & YPosEdgeFindValue = 0,
       if XDistanceValue = 0 & YDistanceValue = 0  & ZOffSetValue = 0,
        if ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
         [
	      *OpRtrPlane, no_spc$, "(Z SURFACE FIND)", e$
          pbld, "G1", *operation_depth, *feed, no_spc$, e$
	      [
		   if OriginNumber > -1, 
		   sProbeNumber = UserOrigin + 1
          ]
		 "G65", *UniversialProbeProgramNumber, "A9.", *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
		 "G0 G90", pfzout, e$
         ]

    #INSIDE DIAMETER SET = 3-POINT TOUCH, A11.
    if nextdc$ = 17 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
     if ApplyCustomdRillParameter = 1 & ZOffSetValue = 0 & ShiftB_AnglesValue > 0 & ThreePointsAngleBValue = 0,
      if XDistanceValue > 0 & YDistanceValue > 0 & (YDistanceValue = XDistanceValue),
       if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,	   
        [
	     *OpRtrPlane, no_spc$, "(INSIDE DIAMETER SET = 3-POINT TOUCH)", e$
         pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sBossOD = XDistanceValue
		 "G65", *UniversialProbeProgramNumber, "A11.", *sBossOD, *ShiftB_AnglesValue, *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
		 "G0 G90", pfzout, e$
        ]

    #OUTSIDE DIAMETER SET = 3-POINT TOUCH
    if nextdc$ = 17 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0 & ThreePointsAngleBValue > 0,
     if ZOffSetValue <> 0 & ShiftB_AnglesValue = 0 & ThreePointsAngleBValue > 0,
      if XDistanceValue > 0 & YDistanceValue > 0 & (YDistanceValue = XDistanceValue),
       if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,	   
        [
	     *OpRtrPlane, no_spc$, "(OUTSIDE DIAMETER SET = 3-POINT TOUCH)", e$
         pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sIDPocket = XDistanceValue
		 "G65", *UniversialProbeProgramNumber, "A12.", *sIDPocket, *ThreePointsAngleBValue, *ZOffSetValue, *sProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", no_spc$, e$
		 "G0 G90", pfzout, e$
        ]
#EndRegion End Fanuc Probe Secions

#Region Haas Probe Secions
PHaasProbe
    #BORE, A10.
    if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
     if ZOffSetValue = 0 & ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
      if YDistanceValue > 0 & XDistanceValue > 0 & (YDistanceValue = XDistanceValue),
       if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,
        [
	     *OpRtrPlane, no_spc$, "(BORE)", e$
	     pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sHaasProbeNumber = g_wcs
         sIDPocket = XDistanceValue
         "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A10.", *sIDPocket, e$
         "G0 G90", pfzout, e$
        ]

    #BOSS, A11.
    if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
     if ZOffSetValue <> 0 & ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
      if YDistanceValue > 0 & XDistanceValue > 0 & (YDistanceValue = XDistanceValue),
       if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,	   
       [
        *OpRtrPlane, no_spc$, "(BOSS)", e$
         pbld, "G1", *operation_depth, *feed, no_spc$, e$
         [
          if OriginNumber > -1, 
          sProbeNumber = UserOrigin + 1
         ]
         sBossOD = XDistanceValue
         sHaasProbeNumber = g_wcs
         HaasProbeSurfaceHeight = ZOffSetValue
         "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A11.", *sBossOD, *HaasProbeSurfaceHeight, e$
         "G0 G90", pfzout, e$
       ]
	   
    #POCKET X AXIS, A15.
    if nextdc$ = 16 & operation_depth <> 0 & (ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0), 
     if ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0 & ZOffSetValue = 0,
      if XDistanceValue > 0 & YDistanceValue = 0 & not(YDistanceValue = XDistanceValue),
       if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,	   
        [
         *OpRtrPlane, no_spc$, "(POCKET X AXIS)", e$
         pbld, "G1", *operation_depth, *feed, no_spc$, e$
         [
          if OriginNumber > -1, 
          sProbeNumber = UserOrigin + 1
         ]
         sHaasProbeNumber = g_wcs
         HaasXPosCornerValue = XDistanceValue
         "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A15.", *HaasXPosCornerValue, e$
         "G0 G90", pfzout, e$
        ]

    #POCKET Y AXIS, A17.
    if nextdc$ = 16 & operation_depth <> 0 & (ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0), 
     if ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0 & ZOffSetValue = 0,	
      if XDistanceValue = 0 & YDistanceValue > 0 & ZOffSetValue = 0 & not(YDistanceValue = XDistanceValue),
       if ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
        [
	     *OpRtrPlane, no_spc$, "(POCKET Y AXIS)", e$
         pbld, "G1", *operation_depth, *feed, no_spc$, e$
	      [
		   if OriginNumber > -1, 
		   sProbeNumber = UserOrigin + 1
          ]
		  sHaasProbeNumber = g_wcs
		  HaasYDistanceValue = YDistanceValue
		  "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A17.", *HaasYDistanceValue, e$
		  "G0 G90", pfzout, e$
		 ]	 

    #WEB X AXIS, A13.
    if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
     if ApplyCustomdRillParameter = 1 & ZOffSetValue <> 0 & ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
      if XDistanceValue > 0 & YDistanceValue = 0 & not(YDistanceValue = XDistanceValue),
       if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,	   
       [
	    *OpRtrPlane, no_spc$, "(WEB X AXIS)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sHaasProbeNumber = g_wcs
		 HaasXDistanceValue = XDistanceValue
		 HaasProbeHeight = ZOffSetValue
         "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A13.", *HaasXDistanceValue, *HaasProbeHeight, e$
		 "G0 G90", pfzout, e$
		]

    #WEB Y AXIS, A16.
    if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
     if ApplyCustomdRillParameter = 1 & ZOffSetValue <> 0 & ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
      if XDistanceValue = 0 & YDistanceValue > 0 & not(YDistanceValue = XDistanceValue),
       if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,	
        [
	     *OpRtrPlane, no_spc$, "(WEB Y AXIS)", e$
         pbld, "G1", *operation_depth, *feed, no_spc$, e$
	      [
		   if OriginNumber > -1, 
		   sProbeNumber = UserOrigin + 1
          ]
		 sHaasProbeNumber = g_wcs
		 HaasYDistanceValue = YDistanceValue
		 HaasProbeHeight = ZOffSetValue
         "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A16.", *HaasYDistanceValue, *HaasProbeHeight, e$
		 "G0 G90", pfzout, e$
        ]
		
    #BACK LEFT - OUTSIDE CORNER, A18.
    if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
     if XPosEdgeFindValue = 1 & YNegEdgeFindValue = 1,
      if XNegEdgeFindValue = 0 & YPosEdgeFindValue = 0 & ShiftB_AnglesValue = 0,
       if XDistanceValue = 0 & YDistanceValue = 0  & ZOffSetValue <> 0,
        if ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
        [
	     *OpRtrPlane, no_spc$, "(BACK LEFT - OUTSIDE CORNER)", e$
         pbld, "G1", *operation_depth, *feed, no_spc$, e$
	      [
		   if OriginNumber > -1, 
		   sProbeNumber = UserOrigin + 1
          ]
		 sHaasProbeNumber = g_wcs
		 HaasProbeSurfaceHeight = ZOffSetValue
         "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A18. D4", *HaasProbeSurfaceHeight, e$
		 "G0 G90", pfzout, e$
        ]

    #BACK RIGHT - OUTSIDE CORNER, 18.
    if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
     if XPosEdgeFindValue = 0 & YNegEdgeFindValue = 0,
      if XNegEdgeFindValue = 1 & YPosEdgeFindValue = 1,
       if XDistanceValue = 0 & YDistanceValue = 0 & ZOffSetValue <> 0,
        if ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
        [
	     *OpRtrPlane, no_spc$, "(BACK RIGHT - OUTSIDE CORNER)", e$
         pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sHaasProbeNumber = g_wcs
		 HaasProbeSurfaceHeight = ZOffSetValue
         "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A18. D3", *HaasProbeSurfaceHeight, e$
		 "G0 G90", pfzout, e$
        ]

    #FRONT LEFT - OUTSIDE CORNER, A18.
    if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
     if XPosEdgeFindValue = 1 & YNegEdgeFindValue = 1,
      if XNegEdgeFindValue = 0 & YPosEdgeFindValue = 0,
       if XDistanceValue = 0 & YDistanceValue = 0 & ZOffSetValue <> 0,
        if ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
        [
         *OpRtrPlane, no_spc$, "(FRONT LEFT - OUTSIDE CORNER)", e$
         pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sHaasProbeNumber = g_wcs
		 HaasProbeSurfaceHeight = ZOffSetValue
         "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A18. D1", *HaasProbeSurfaceHeight, e$
		 "G0 G90", pfzout, e$
        ]

    #FRONT RIGHT - OUTSIDE CORNER, A18.
    if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
     if XPosEdgeFindValue = 0 & YNegEdgeFindValue = 0,
      if XNegEdgeFindValue = 1 & YPosEdgeFindValue = 1,
       if XDistanceValue = 0 & YDistanceValue = 0  & ZOffSetValue <> 0,
        if ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
        [
         *OpRtrPlane, no_spc$, "(FRONT RIGHT - OUTSIDE CORNER)", e$
         pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sHaasProbeNumber = g_wcs
		 HaasProbeSurfaceHeight = ZOffSetValue
         "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A18. D2", *HaasProbeSurfaceHeight, e$
		 "G0 G90", pfzout, e$
		]

    #SINGLE SURFACE, A20.
    if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
     if XPosEdgeFindValue = 0 & YNegEdgeFindValue = 0,
      if XNegEdgeFindValue = 0 & YPosEdgeFindValue = 0,
       if XDistanceValue = 0 & YDistanceValue = 0 & ZOffSetValue <> 0,
        if ShiftB_AnglesValue = 0 & ThreePointsAngleBValue = 0,
        [
         *OpRtrPlane, no_spc$, "(SINGLE SURFACE)", e$
         pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sHaasProbeNumber = g_wcs
		 HaasProbeHeight = ZOffSetValue
		 "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A20.", *HaasProbeHeight, e$
		 "G0 G90", pfzout, e$
        ]

    #FRONT LEFT - INNER CORNER
    if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
     if ApplyCustomdRillParameter = 1 & ZOffSetValue <> 0 & ShiftB_AnglesValue = 1 & ThreePointsAngleBValue = 0,
      if XDistanceValue = 0 & YDistanceValue = 0 & (YDistanceValue = XDistanceValue) & ZOffSetValue <> 0,
       if XNegEdgeFindValue = 1 & YNegEdgeFindValue = 1 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 0,	   
       [
        *OpRtrPlane, no_spc$, "(FRONT LEFT - INNER CORNER)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sHaasProbeNumber = g_wcs
		 "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A19. D1", e$
		 "G0 G90", pfzout, e$
       ]

    #FRONT RIGHT - INNER CORNER
    if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
     if ApplyCustomdRillParameter = 1 & ZOffSetValue <> 0 & ShiftB_AnglesValue = 1 & ThreePointsAngleBValue = 0,
      if XDistanceValue = 0 & YDistanceValue = 0 & (YDistanceValue = XDistanceValue) & ZOffSetValue <> 0,
       if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 1 & XPosEdgeFindValue = 1 & YPosEdgeFindValue = 0,	   
       [
	    *OpRtrPlane, no_spc$, "(FRONT RIGHT - INNER CORNER)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sHaasProbeNumber = g_wcs
		 "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A19. D2", e$
		 "G0 G90", pfzout, e$
		]

    #REAR RIGHT - INNER CORNER, A19.
    if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
     if ApplyCustomdRillParameter = 1 & ZOffSetValue <> 0 & ShiftB_AnglesValue = 1 & ThreePointsAngleBValue = 0,
      if XDistanceValue = 0 & YDistanceValue = 0 & (YDistanceValue = XDistanceValue) & ZOffSetValue <> 0,
       if XNegEdgeFindValue = 0 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 1 & YPosEdgeFindValue = 1,	   
       [
	    *OpRtrPlane, no_spc$, "(REAR RIGHT - INNER CORNER)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sHaasProbeNumber = g_wcs
		 "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A19. D3", e$
		 "G0 G90", pfzout, e$
		]

    #BACK LEFT - INNER CORNER, A19.
    if nextdc$ = 16 & operation_depth <> 0 & ApplyCustomdRillParameter = 1 & UniversialProbeProgramNumber > 0,
     if ApplyCustomdRillParameter = 1 & ZOffSetValue <> 0 & ShiftB_AnglesValue = 1 & ThreePointsAngleBValue = 0,
      if XDistanceValue = 0 & YDistanceValue = 0 & (YDistanceValue = XDistanceValue) & ZOffSetValue <> 0,
       if XNegEdgeFindValue = 1 & YNegEdgeFindValue = 0 & XPosEdgeFindValue = 0 & YPosEdgeFindValue = 1,	   
       [
	    *OpRtrPlane, no_spc$, "(BACK LEFT - INNER CORNER)", e$
        pbld, "G1", *operation_depth, *feed, no_spc$, e$
	     [
		  if OriginNumber > -1, 
		  sProbeNumber = UserOrigin + 1
         ]
		 sHaasProbeNumber = g_wcs
		 "G65", *UniversialProbeProgramNumber, *sHaasProbeNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", "A19. D4", e$
		 "G0 G90", pfzout, e$
		]
#EndRegion End Haas Probe Secions

#Region CUSTOMED STRINGS
sHaasProbeNumber: 0
sProbeNumber: 0
sBossOD: 0
sIDPocket: 0

XPosEdgeFindValue: 0
YNegEdgeFindValue: 0
XNegEdgeFindValue: 0
YPosEdgeFindValue: 0
UniversialProbeProgramNumber: 0

XDistanceValue: 0

HaasXDistanceValue: 0
HaasYDistanceValue: 0

HaasXPosCornerValue: 0

YDistanceValue: 0
ThreePointsAngleBValue: 0
HaasInsideCorners:0
ZOffSetValue: 0
HaasProbeHeight: 0
#EndRegion End Customed Strings

#Region Custom FMT
# --------------------------------------------------------------------------
# Custom FMT
# --------------------------------------------------------------------------
fmt "W" 4       sHaasProbeNumber
fmt "S" 4       SProbeNumber
fmt "D" 2       sBossOD 
fmt "D" 2       sIDPocket

fmt "X" 2       XPosEdgeFindValue
fmt "X" 2       YNegEdgeFindValue
fmt "X" 2       XNegEdgeFindValue
fmt "X" 2       YPosEdgeFindValue
fmt "P" 4       UniversialProbeProgramNumber
fmt "X" 2       XDistanceValue
fmt "D" 2       HaasXDistanceValue
fmt "D" 2       HaasXPosCornerValue
fmt "D" 2       HaasYDistanceValue
fmt "Y" 2       YDistanceValue

fmt "Z"  2       OpRtrPlane

fmt "B" 2       ShiftB_AnglesValue
fmt "B" 2       ThreePointsAngleBValue
fmt "Z" 2       ZOffSetValue
fmt "H" 2       HaasProbeHeight
fmt "E" 2       HaasProbeSurfaceHeight
fmt     4       HaasInsideCorners
fmt     4       ApplyCustomdRillParameter

fmt "D" 2       IDProbing
fmt "D" 2       ODProbing

#End Custom FMT

#Region pparameter
pparameter$ # Run parameter table
           if prmcode$ = 15071, XPosEdgeFindValue = rpar(sparameter$,1)
           if prmcode$ = 15072, YNegEdgeFindValue = rpar(sparameter$,1)
           if prmcode$ = 15073, UniversialProbeProgramNumber = rpar(sparameter$,1)
           if prmcode$ = 15074, XNegEdgeFindValue = rpar(sparameter$,1)
           if prmcode$ = 15075, YPosEdgeFindValue = rpar(sparameter$,1)
           if prmcode$ = 15076, XDistanceValue = rpar(sparameter$,1)
           if prmcode$ = 15077, YDistanceValue = rpar(sparameter$,1)
           if prmcode$ = 15078, ShiftB_AnglesValue = rpar(sparameter$,1)
           if prmcode$ = 15079, ThreePointsAngleBValue = rpar(sparameter$,1)
           if prmcode$ = 15080, ZOffSetValue = rpar(sparameter$,1)
           if prmcode$ = 15081, ApplyCustomdRillParameter = rpar(sparameter$,1)
#EndRegion
ptlchg$          #Tool change
  pFanucProbe
  PHaasProbe


ptlchg0$         #Call from NCI null tool change (tool number repeats)
  pFanucProbe
  PHaasProbe
pdrlcommonb     #Canned Drill Cycle common call, before
        if (drillcyc$ = 16 | drillcyc$ = 17 | drillcyc$ = 18 | drillcyc$ = 19) & speed > 0, [if mprint(sProbingRPMErrorCheck, 1) = 1, exitpost$]

        if (drillcyc$ = 16 | drillcyc$ = 17 | drillcyc$ = 18 | drillcyc$ = 19) & (UniversialProbeProgramNumber = 0 | ApplyCustomdRillParameter = 0), [if mprint(sProbeProgramnumber, 1) = 1, exitpost$]

        if (drillcyc$ = 16 | drillcyc$ = 17 | drillcyc$ = 18 | drillcyc$ = 19) & feed = 0 & tool_typ$ = 18, [if mprint(sProbingFeedErrorCheck, 1) = 1, exitpost$]

        if (drillcyc$ = 16 | drillcyc$ = 17 | drillcyc$ = 18 | drillcyc$ = 19) & operation_depth < .125 & tool_typ$ = 18, [if mprint(sProbingDepthErrorCheck, 1) = 1, exitpost$]

        if (drillcyc$ = 16 | drillcyc$ = 17 | drillcyc$ = 18 | drillcyc$ = 19) & OpRtrPlane < .25 & tool_typ$ = 18, [if mprint(sProbingRetractErrorCheck, 1) = 1, exitpost$]
#Region CUSTOMED Error Checks
# --------------------------------------------------------------------------
# Error Checks
# --------------------------------------------------------------------------
#Region sProbingRetractErrorCheck
sProbingRetractErrorCheck = "CUT# "+sToolPathNumber+", RETRACT... must have at least .250 to .750 above the part"
                            +no2asc(13)+"TOOL#"
                            +no2str(t$)+" ("+no2str(tldia$)+", "+s20001+")"
                            +no2asc(13)
                            +no2asc(13)
                            +no2asc(13)+"You currently have Z"+no2str(OpRtrPlane)
                            +no2asc(13)+"This will cause probe slam into the part."
                            +no2asc(13)
                            +no2asc(13)
                            +no2asc(13)+"                                                              OK to proceed posting."
                            +no2asc(13)+"                                                              CANCEL to abort posting."
#EndRegion

#Region sProbingDepthErrorCheck
sProbingDepthErrorCheck = "CUT# "+sToolPathNumber+", DEPTH... must have at least .125 to .500 above the part"
                         +no2asc(13)+"TOOL#"
                         +no2str(t$)+" ("+no2str(tldia$)+", "+s20001+")"
                         +no2asc(13)
                         +no2asc(13)
                         +no2asc(13)+"You have Z"+no2str(operation_depth)
                         +no2asc(13)+"This will cause probe slam into the part."
                         +no2asc(13)
                         +no2asc(13)
                         +no2asc(13)+"                                                              OK to proceed posting."
                         +no2asc(13)+"                                                              CANCEL to abort posting."
#EndRegion

#Region sProbingFeedErrorCheck
sProbingFeedErrorCheck = "CUT# "+sToolPathNumber+", FeedRate MUST NOT equal ZERO on while using PROBE"
                         +no2asc(13)+"TOOL#"
                         +no2str(t$)+" ("+no2str(tldia$)+", "+s20001+")"
                         +no2asc(13)
                         +no2asc(13)
                         +no2asc(13)+"You have "+no2str(feed)+" RPM"
                         +no2asc(13)+"This will cause probe becomes NON-FUNCTIONING."
                         +no2asc(13)
                         +no2asc(13)
                         +no2asc(13)+"                                                              OK to proceed posting."
                         +no2asc(13)+"                                                              CANCEL to abort posting."
#EndRegion

#Region sProbingRPMErrorCheck
sProbingRPMErrorCheck = "CUT# "+sToolPathNumber+", RPM MUST BE ZERO when you are using PROBE"
                        +no2asc(13)+"TOOL#"
                        +no2str(t$)+" ("+no2str(tldia$)+", "+s20001+")"
                        +no2asc(13)
                        +no2asc(13)
                        +no2asc(13)+"You have "+no2str(speed)+" RPM"
						+no2asc(13)+"This will cause probe out of balance from time to time."
					    +no2asc(13)
                        +no2asc(13)
                        +no2asc(13)+"                                                              OK to proceed posting."
                        +no2asc(13)+"                                                              CANCEL to abort posting."
#EndRegion

subprogram.png

parameter.png

FeedRate - RPM.png

Link to comment
Share on other sites
12 minutes ago, jlw™ said:

Cool, I will definitely play with it.

I would still like to see it used in a file to make sure I get how it works.  Can you upload or email me a file?

Thanks!

 

One time, the ADMIN warned me that I sent a post file.  Not sure they will caught me this time.  hiihihihih  

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...