Sign in to follow this  
odessa

custom cycle for probe

Recommended Posts

Hello.

How to use custom drill cycle for renishaw probe.

Thanks in a forward.

Share this post


Link to post
Share on other sites
9 minutes ago, odessa said:

Hello.

How to use custom drill cycle for renishaw probe.

Thanks in a forward.

Do you have HAAS or FANUC?  I just completed the ENTIRE probing in the drill cycle$ 19, let me know. I will paste my codes for you.  I have HAAS and FANUC.

Share this post


Link to post
Share on other sites

What is your email?  I will send you the codes

Share this post


Link to post
Share on other sites
On 8/2/2019 at 3:54 PM, odessa said:

Here it is...

#Region pdrlcst$         # First hole
pdrlcst$         # First hole
   if loop_var,
   [
      pdrlcommonb
      #if depth$ < zero & refht$ < zero,
        #[
        #prntdd = depth$ + abs(refht$) #Calculate total cutting depth
        #]
      #else, prntdd = depth$ + refht$ #Calculate total cutting depth

      #if prntdd <> min_depth, "(", no_spc$, *prntdd no_spc$, ")", e$ #prntdd= .XXXX)
      if drillcyc$ = 8, prigid_tap  #Rigid Tap
      if drillcyc$ = 9, pdrlcst10   #Pitch Tap
      if drillcyc$ = 10, pdrlcst12  #Mazak Tap
      if drillcyc$ = 11, pdrlcst11  #Fadal Tap
      if drillcyc$ = 12, pGunDrill #Gun Drilling Mode
      if drillcyc$ = 13, PG1Drill  #G1 Feed In/Out Drill Mode
      if drillcyc$ = 14, pAircraftDrill #Aircraft Drilling
      if drillcyc$ = 15, pOtherGunDrillMode #
      if drillcyc$ = 19, Probings
      pcom_movea
   ]

 

#Region pdrlcst_2$
pdrlcst_2$       #Custom drill cycles 8 - 19, additional points (user option)
   if loop_var,
   [
      #Use this postblock to customize drilling cycles 8 - 19
      if drillcyc$ = 8, pdrill_2$
      if drillcyc$ = 9, pAkiraSeiki #Mitsuibishi Tap Second Point
      if drillcyc$ = 10, PMazakTapCode
      if drillcyc$ = 11, pFadalTapCode
      if drillcyc$ = 12, pGunDrill
      if drillcyc$ = 13, PG1Drill
      if drillcyc$ = 14, pAircraftDrill
      if drillcyc$ = 15, pOtherGunDrillMode #
     if drillcyc$ = 19, ProbingsTOOL.thumb.png.2f50b097fd919c40c3119216d07c2125.png451835201_HAASPROBE.thumb.png.d026255cfc396b36b3973b43af644d4a.png
      pcom_movea
   ]
   else, pncoutput_drl

 


#Region Probings
Probings
 #Z SURFACE FIND, A20.,
 #"DRILL TOP OF STOCK: ", ~tosz$, e$
 #"DRILL CLEARANCE: ", ~zdrl$, e$
 #"DRILL CLEARANCE: ", ~initht$, e$
 #"DRILL RETRACT: ", ~refht$, e$
 #sDrillHalfClearance = zdrl$/2
 [
  if initht$ > 0 & refht$ > 0 & (tosz$ > operation_depth) & old_mr7  = 1, #HAAS Probe
   if drillcyc$ = 19 & peck2$ > 0 & peckclr$ = 0 & retr$ = 0 & dwell$ = 0 & shftdrl$ = 0,
   [
    [
     sDrillTopOfStock = tosz$ + depth$ + TipCompAmountProbe
     pbld, *refht$, no_spc$, "(Z SURFACE FIND)", e$
     "G4 P5.(5S SAFETY STOP)", e$
     #pbld, *sDrillTopOfStock, e$
     pbld, "G1", *sDrillTopOfStock, *feed, e$
     *tosz$, no_spc$, "(PROBE LIGHT MUST TURN ON)", e$
     [
      if OriginNumber > 0 & OriginNumber < 6,
       g_wcs = workofs$ + 54 + UserOrigin
       sHaasProbeWorkOffsetNumber = g_wcs
      ]
      sProbeProgramnumber = peck2$
      if g_wcs = 54, sG10ProbeWorkOffsetNumber = 1
      if g_wcs = 55, sG10ProbeWorkOffsetNumber = 2
      if g_wcs = 56, sG10ProbeWorkOffsetNumber = 3
      if g_wcs = 57, sG10ProbeWorkOffsetNumber = 4
      if g_wcs = 58, sG10ProbeWorkOffsetNumber = 5
      if g_wcs = 59, sG10ProbeWorkOffsetNumber = 6
      if TipCompAmount > 0 & TipCompFeature = 1, sHaasProbeDepth = (depth$ + TipCompAmount) * (-1)
      if TipCompFeature = 0, sHaasProbeDepth = depth$ * (-1)
      if TipCompFeature = 1, sHaasProbeDepth = depth$ * (-1) - TipCompAmount
      sHaasProbeDepth = (operation_depth * (-1) - (tldia$/2)) - tosz$
      TipCompAmountProbe = TipCompAmount * (-1)
      QCWorkOffSetNumber = peck1$
      "G65", *sProbeProgramnumber, [if peck1$ > 0 & drillcyc$ = 19, *QCWorkOffSetNumber, else, *sHaasProbeWorkOffsetNumber], "A20.", *sHaasProbeDepth, e$
      if TipCompFeature = 1, "G91 G10 L2", *sG10ProbeWorkOffsetNumber, no_spc$, "(", no_spc$, *g_wcs, no_spc$, ")", *TipCompAmountProbe, no_spc$, "(INCREMENTAL)", e$
      "G0 G90", *initht$, e$
      TipCompAmountProbe = TipCompAmount * (-1) * (-1)
    ]
    !old_mr7
   ]

  #Rectagnle Block - A13.
  #"DRILL TOP OF STOCK: ", ~tosz$, e$
  #"DRILL CLEARANCE: ", ~zdrl$, e$
  #"DRILL CLEARANCE: ", ~initht$, e$
  #"DRILL RETRACT: ", ~refht$, e$
  #sDrillHalfClearance = zdrl$/2
  if initht$ > 0 & refht$ > 0 & tosz$ > 0 & depth$ <> 0 & old_mr7  = 1, #HAAS Probe
   if drillcyc$ = 19 & peck2$ > 0 & peckclr$ = 0 & dwell$ > 0 & shftdrl$ = 0,
   [
    if retr$ > 0 & dwell$ > 0  | (refht$ > 0 & retr$ > 0 & dwell$ > 0 | retr$ = dwell$),
    [
     sDrillTopOfStock = tosz$
     pbld, *refht$, no_spc$, "(RECTANGLE BLOCK)", e$
     "G4 P5.(5S SAFETY STOP)", e$
     pbld, "G1", *sDrillTopOfStock, *feed, "(PROBE LIGHT MUST TURN ON)", e$
     [
      if OriginNumber > 0 & OriginNumber < 6,
       g_wcs = workofs$ + 54 + UserOrigin
       sHaasProbeWorkOffsetNumber = g_wcs
      ]
      sProbeProgramnumber = peck2$
      sXProbeValue = retr$
      sYProbeValue = dwell$
      if depth$ > 0, sHaasProbeDepth = tosz$ + depth$
      if depth$ < 0, sHaasProbeDepth = (tosz$ * -1) + depth$
      QCWorkOffSetNumber = peck1$
      "G65", *sProbeProgramnumber, [if peck1$ > 0 & drillcyc$ = 19, *QCWorkOffSetNumber, else, *sHaasProbeWorkOffsetNumber], "A13.", *sXProbeValue, *sYProbeValue, *sHaasProbeDepth, e$
      "G0 G90", *initht$, e$
      "M0(COMPARE 10188 MACRO - PRINT VALUE)", e$
    ]
    !old_mr7
   ]

  #Rectangle Pocket - A12.
  sProbeDepth = tosz$ - operation_depth
  #"DRILL TOP OF STOCK: ", ~tosz$, e$
  #"DRILL CLEARANCE: ", ~zdrl$, e$
  #"DRILL CLEARANCE: ", ~initht$, e$
  #"DRILL RETRACT: ", ~refht$, e$
  #sDrillHalfClearance = zdrl$/2
  if initht$ > 0 & refht$ > 0 & tosz$ = 0 & old_mr7  = 1, #HAAS Probe
   if drillcyc$ = 19 & peck2$ > 0,
    if peckclr$ = 0 & dwell$ > 0, shftdrl$ = 0 | (retr$ = 0 & dwell$ > 0 | retr$ = dwell$),
    [
     if depth$ <> 0,
     [
      sDrillTopOfStock = tosz$
      sDrillHalfClearance = initht$ - 2
      sProbeRectangularPocketDepth = (initht$/2) - depth$
      "G65 P9832(PROBE ON)", e$
      pbld, *refht$, no_spc$, "(RECTANGLE POCKET)", e$
      pbld, "G1", *sDrillHalfClearance, *feed, no_spc$, "(SAFETY APPROACH)", e$
      "G4 P5.(5S SAFETY STOP)", e$
      pbld, "G1", *depth$, *feed, no_spc$, "(PROBE LIGHT MUST TURN ON)", e$
      "G4 P5.(5S SAFETY STOP AGAIN)", e$
      [
      if OriginNumber > 0 & OriginNumber < 6,
       g_wcs = workofs$ + 54 + UserOrigin
       sHaasProbeWorkOffsetNumber = g_wcs
      ]
      sProbeProgramnumber = peck2$
      sXProbeValue = retr$
      sYProbeValue = dwell$
      QCWorkOffSetNumber = peck1$
      "G65", *sProbeProgramnumber, [if peck1$ > 0 & drillcyc$ = 19, *QCWorkOffSetNumber, else, *sHaasProbeWorkOffsetNumber], "A12.", *sXProbeValue, *sYProbeValue, e$
      "G0 G90", *initht$, e$
      "M0(COMPARE 10188 MACRO - PRINT VALUE)", e$
    ]
    !old_mr7
   ]

  #X Pocket - A15.
  #"DRILL TOP OF STOCK: ", ~tosz$, e$
  #"DRILL CLEARANCE: ", ~zdrl$, e$
  #"DRILL CLEARANCE: ", ~initht$, e$
  #"DRILL RETRACT: ", ~refht$, e$
  #sDrillHalfClearance = zdrl$/2
  if initht$ > 0 & refht$ > 0 & tosz$ = 0 & depth$ <> 0 & drillcyc$ = 19 & peck2$ > 0 & old_mr7  = 1, #HAAS Probe
   if peckclr$ = 0 & dwell$ = 0 & shftdrl$ = 0,
   [
    if retr$ > 0,
    [
     sDrillTopOfStock = tosz$
     "G65 P9832(PROBE ON)", e$
     pbld, *refht$, no_spc$, "(X POCKET)", e$
     "G4 P5.(5S SAFETY STOP)", e$
     pbld, "G1", *depth$, *feed, e$
     [
      if OriginNumber > 0 & OriginNumber < 6,
       g_wcs = workofs$ + 54 + UserOrigin
       sHaasProbeWorkOffsetNumber = g_wcs
      ]
      sProbeProgramnumber = peck2$
      sXProbeValue = retr$
      sYProbeValue = dwell$
      QCWorkOffSetNumber = peck1$
      "G65", *sProbeProgramnumber, [if peck1$ > 0 & drillcyc$ = 19, *QCWorkOffSetNumber, else, *sHaasProbeWorkOffsetNumber], "A15.", *sXProbeValue, e$
      "G0 G90", *initht$, e$
      "M0(COMPARE 10188 MACRO - PRINT VALUE)", e$
    ]
    !old_mr7
   ]

  #Y Pocket - A17.
  #X Pocket - A15.
  #"DRILL TOP OF STOCK: ", ~tosz$, e$
  #"DRILL CLEARANCE: ", ~zdrl$, e$
  #"DRILL CLEARANCE: ", ~initht$, e$
  #"DRILL RETRACT: ", ~refht$, e$
  #sDrillHalfClearance = zdrl$/2
  if initht$ > 0 & refht$ > 0 & tosz$ = 0 & depth$ <> 0 & drillcyc$ = 19 & peck2$ > 0 & old_mr7  = 1, #HAAS Probe
   if peckclr$ = 0 & retr$ = 0 & shftdrl$ = 0,
   [
    if dwell$ > 0,
    [
     sDrillTopOfStock = tosz$
     pbld, *refht$, no_spc$, "(Y POCKET)", e$
     "G4 P5.(5S SAFETY STOP)", e$
     pbld, "G1", *depth$, *feed, e$
     [
      if OriginNumber > 0 & OriginNumber < 6,
       sHaasProbeWorkOffsetNumber = g_wcs + 1
       else,
        sHaasProbeWorkOffsetNumber = g_wcs
      ]
      sProbeProgramnumber = peck2$
      sXProbeValue = retr$
      sYProbeValue = dwell$
      QCWorkOffSetNumber = peck1$
      "G65", *sProbeProgramnumber, [if peck1$ > 0 & drillcyc$ = 19, *QCWorkOffSetNumber, else, *sHaasProbeWorkOffsetNumber], "A17.", *sYProbeValue, e$
      "G0 G90", *initht$, e$
      "M0(COMPARE 10188 MACRO - PRINT VALUE)", e$
    ]
    !old_mr7
   ]

  #Web X Axis - A14.
  #"DRILL TOP OF STOCK: ", ~tosz$, e$
  #"DRILL CLEARANCE: ", ~zdrl$, e$
  #"DRILL CLEARANCE: ", ~initht$, e$
  #"DRILL RETRACT: ", ~refht$, e$
  #sDrillHalfClearance = zdrl$/2
  if initht$ > 0 & refht$ > 0 & tosz$ > 0 & depth$ <> 0 & drillcyc$ = 19 & peck2$ > 0 & old_mr7  = 1, #HAAS Probe
   if peckclr$ = 0 & dwell$ = 0 & shftdrl$ = 0,
   [
    if retr$ > 0 & tosz$ > 0,
    [
     sDrillTopOfStock = tosz$
     pbld, *refht$, no_spc$, "(WEB X-AXIS)", e$
     "G4 P5.(5S SAFETY STOP)", e$
     pbld, "G1", *sDrillTopOfStock, *feed, e$
     [
      if OriginNumber > 0 & OriginNumber < 6,
       g_wcs = workofs$ + 54 + UserOrigin
       sHaasProbeWorkOffsetNumber = g_wcs
      ]
      sProbeProgramnumber = peck2$
      sXProbeValue = retr$
      sYProbeValue = dwell$
      if depth$ < 0, sHaasProbeDepth = (tosz$ + depth$)
      if depth$ > 0, sHaasProbeDepth = (tosz$ - depth$)
      QCWorkOffSetNumber = peck1$
      "G65", *sProbeProgramnumber, [if peck1$ > 0 & drillcyc$ = 19, *QCWorkOffSetNumber, else, *sHaasProbeWorkOffsetNumber], "A14.", *sXProbeValue, sHaasProbeDepth, e$
      "G0 G90", *initht$, e$
      "M0(COMPARE 10188 MACRO - PRINT VALUE)", e$
    ]
    !old_mr7
   ]

  #Web Y Axis - A16.
  #"DRILL TOP OF STOCK: ", ~tosz$, e$
  #"DRILL CLEARANCE: ", ~zdrl$, e$
  #"DRILL CLEARANCE: ", ~initht$, e$
  #"DRILL RETRACT: ", ~refht$, e$
  #sDrillHalfClearance = zdrl$/2
  if initht$ > 0 & refht$ > 0 & tosz$ > 0 & depth$ <> 0 & drillcyc$ = 19 & peck2$ > 0 & old_mr7  = 1,
   if peckclr$ = 0 & retr$ = 0 & shftdrl$ = 0,
   [
    if dwell$ > 0 & tosz$ > 0 & old_mr7 = 1, #HAAS Probe
    [
     sDrillTopOfStock = tosz$
     pbld, *refht$, no_spc$, "(WEB Y-AXIS)", e$
     "G4 P5.(5S SAFETY STOP)", e$
     pbld, "G1", *sDrillTopOfStock, *feed, e$
     [
      if OriginNumber > 0 & OriginNumber < 6,
       g_wcs = workofs$ + 54 + UserOrigin
       sHaasProbeWorkOffsetNumber = g_wcs
      ]
      sProbeProgramnumber = peck2$
      sXProbeValue = retr$
      sYProbeValue = dwell$
      if depth$ > 0, sHaasProbeDepth = tosz$ - depth$
      if depth$ < 0, sHaasProbeDepth = (tosz$ + depth$) * -1
      QCWorkOffSetNumber = peck1$
      "G65", *sProbeProgramnumber, [if peck1$ > 0 & drillcyc$ = 19, *QCWorkOffSetNumber, else, *sHaasProbeWorkOffsetNumber], "A16.", *sYProbeValue, sHaasProbeDepth, e$
      "G0 G90", *initht$, e$
      "M0(COMPARE 10188 MACRO - PRINT VALUE)", e$
    ]
    !old_mr7
   ]

  #Bore - A10.
  #"DRILL TOP OF STOCK: ", ~tosz$, e$
  #"DRILL CLEARANCE: ", ~zdrl$, e$
  #"DRILL CLEARANCE: ", ~initht$, e$
  #"DRILL RETRACT: ", ~refht$, e$
  #sDrillHalfClearance = zdrl$/2
  if initht$ > 0 & refht$ > 0 & (tosz$ = depth$ |tosz$ < depth$) & old_mr7  = 1,
   if drillcyc$ = 19 & peck2$ > 0 & peckclr$ = 0 & retr$ = 0 & dwell$ = 0,
   [
    if shftdrl$ > 0,
    [
     sDrillTopOfStock = tosz$
     sDrillHalfClearance = initht$/2
     "G65 P9832(PROBE ON)", e$
     pbld, *refht$, no_spc$, "(BORE)", e$
     "G4 P5.(5S SAFETY STOP)", e$
     pbld, "G1", *depth$, *feed, e$
     [
      if OriginNumber > 0 & OriginNumber < 6,
       g_wcs = workofs$ + 54 + UserOrigin
       sHaasProbeWorkOffsetNumber = g_wcs
      ]
      sProbeProgramnumber = peck2$
      sXProbeValue = retr$
      sYProbeValue = dwell$
      sProbeDiameterValue = shftdrl$
      QCWorkOffSetNumber = peck1$
      "G65", *sProbeProgramnumber, [if peck1$ > 0 & drillcyc$ = 19, *QCWorkOffSetNumber, else, *sHaasProbeWorkOffsetNumber], "A10.", *sProbeDiameterValue, e$
      "G0 G90", *initht$, e$
      "M0(COMPARE 10188 MACRO - PRINT VALUE)", e$
    ]
    !old_mr7
   ]

  #Boss - A11.
  #"DRILL TOP OF STOCK: ", ~tosz$, e$
  #"DRILL CLEARANCE: ", ~zdrl$, e$
  #"DRILL CLEARANCE: ", ~initht$, e$
  #"DRILL RETRACT: ", ~refht$, e$
  #sDrillHalfClearance = zdrl$/2
  if initht$ > 0 & refht$ > 0 & tosz$ > depth$ & old_mr7  = 1, #HAAS Probe
   if drillcyc$ = 19 & peck2$ > 0 & peckclr$ = 0 & retr$ = 0 & dwell$ = 0,
   [
    if shftdrl$ > 0,
    [
     pbld, *refht$, no_spc$, "(BOSS)", e$
     "G4 P5.(5S SAFETY STOP)", e$
     pbld, "G1", *tosz$, *feed, e$
     [
      if OriginNumber > 0 & OriginNumber < 6,
       g_wcs = workofs$ + 54 + UserOrigin
       sHaasProbeWorkOffsetNumber = g_wcs
      ]
      sProbeProgramnumber = peck2$
      sXProbeValue = retr$
      sYProbeValue = dwell$
      sProbeDiameterValue = shftdrl$
      if depth$ < 0, sHaasProbeBossDepth = ((tosz$*-1) + depth$)
      if depth$ > 0, sHaasProbeBossDepth = (tosz$ - depth$)*-1
      sDrillTopOfStock = tosz$
      QCWorkOffSetNumber = peck1$
      "G65", *sProbeProgramnumber, [if peck1$ > 0 & drillcyc$ = 19, *QCWorkOffSetNumber, else, *sHaasProbeWorkOffsetNumber], "A11.", *sProbeDiameterValue, *sHaasProbeBossDepth, e$
      "G0 G90", *initht$, e$
      "M0(COMPARE 10188 MACRO - PRINT VALUE)", e$
    ]
   ]
   !old_mr7
  ]
      pdrlcommonb
      pbld, pdrlxy, e$
      pcom_movea
#EndRegion Probings

 

# --------------------------------------------------------------------------
# Start of File and Toolchange Setup
# --------------------------------------------------------------------------
psof0$           #Start of file for tool zero
      psof$

old_tloffno : 0
old_mr7     : 0
old_mr9     : 0
old_mr10    : 0

pmisc_to_old      #
     old_tloffno = tloffno$
     old_mr7     = mr7$
     old_mr9     = mr9$
     old_mr10    = mr10$
     g10tl_len   = mr9$
     g10tl_dia   = mr10$

pdump$        #
     #"pdump$", ~prmcode$, ~sparameter$, e$

2.png

Mode.png

  • Thanks 1

Share this post


Link to post
Share on other sites

If I can offer a critique...

I hope it's taken in the way I mean it...

Sharing your work is awesome....no doubt....

The big problem I see with what you've done in this work, you've tied too much into one custom cycle....it's going to be confusing to someone else, other than the person who wrote it. That person understands what they were trying to do and how they went about it.

When you're editing posts, I try to remember that it might not be me that's using something in 3 years....if I leave a company with good, proven posts but the next person has no clue how to use it....in their eyes, since they cannot get good code out, it's a crappy post that doesn't work.

So simplify, assume it's not for you. Make it easy for the next person to understand, document, document, document.

Again, please accept this in the manner meant  :cheers:

  • Like 1

Share this post


Link to post
Share on other sites
11 minutes ago, Old_Bear said:

If I can offer a critique...

I hope it's taken in the way I mean it...

Sharing your work is awesome....no doubt....

The big problem I see with what you've done in this work, you've tied too much into one custom cycle....it's going to be confusing to someone else, other than the person who wrote it. That person understands what they were trying to do and how they went about it.

When you're editing posts, I try to remember that it might not be me that's using something in 3 years....if I leave a company with good, proven posts but the next person has no clue how to use it....in their eyes, since they cannot get good code out, it's a crappy post that doesn't work.

So simplify, assume it's not for you. Make it easy for the next person to understand, document, document, document.

Again, please accept this in the manner meant  :cheers"

Good morning Old_Bear,
   I agree with you with certain points.  I've been running a lot of machines and that is why I am writing a UNIVERSAL POST.  I have worked with HAAS and FANUC closely to come up with a way that one post works for all.  I know it is very confusion but... but..., but I also have ALARM MESSAGE.  If people doing wrong it won't post, I haven't showing up in this forum for the alarm message yet since it it tool long but I think it is worth it to let the post double check my work, especially speaking of probings system.

 

 

Best regards,
   S.Luong

Share this post


Link to post
Share on other sites

Good Morning, Pc robotic.

Thank you very much

Could you email me your creation about custom drill cycle for probe.

Thank you again.

All the best

Share this post


Link to post
Share on other sites
19 hours ago, odessa said:

Good Morning, Pc robotic.

Thank you very much

Could you email me your creation about custom drill cycle for probe.

Thank you again.

All the best

Hi Odessa,
   I would be the same code as I pasted.  I am apologize for not sending the entire post since it is not allowed in this forum.  I think from this portion of these codes, they would pretty much help you to get you going with the HAAS probe because I successfully made it and ran it more than 6 months already.

 

PS: I am sorry that I have asked your email and not sending the codes thru your email since I got "warned" long time ago for given free .PST file to other members.

S.Luong

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • 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