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:

Drill Cycle names...


Recommended Posts

Hello everyone,
   I've been using nearly all the drill cycles in the drill taps and I would like to put a notation next to it but somehow it does not work right.  Would you guys please let me know what I've done wrong?  Appreciate for your time to read this.

ps: Please see image for illustration.

 


Best regards,
   S.Luong

 

#Region pCustomDrillCycle
pCustomDrillCycle
		if nextdc$ = 2, no_spc$, "(CHIP BREAK)", e$
		if nextdc$ = 3, no_spc$, "(REGULAR TAP)", e$
		if nextdc$ = 4, no_spc$, "(REAMING CYCLE)", e$
		if nextdc$ = 5, no_spc$, "(BORING BAR CYCLE)", e$
		if nextdc$ = 6, no_spc$, "(FINE BORE SHIFT)", e$
		if nextdc$ = 7, no_spc$, "(PICH TAP)", e$
		if nextdc$ = 8, no_spc$, "(RIDGID TAP)", e$
		if nextdc$ = 9, no_spc$, "(AKIRA SEIKI TAP)", e$
		if nextdc$ = 10, no_spc$, "(MAZAK TAP)", e$
		if nextdc$ = 11, no_spc$, "(FADAL TAP)", e$
		if nextdc$ = 12, no_spc$, "(GUN DRILL)", e$
		if nextdc$ = 13, no_spc$, "(G1 DRILL)", e$
		if nextdc$ = 14, no_spc$, "(AIRCRAFT DRILL)", e$
		if nextdc$ = 15, no_spc$, "(OTHER FUN DRILL)", e$
		if nextdc$ = 18, no_spc$, "(MACRO ENGRAVINGS)", e$
		if nextdc$ = 19, no_spc$, "(GERMAN PROBE)", e$
#EndRegion

#Region pdrill$ 
pdrill$          #Canned Drill Cycle
      pdrlcommonb
      pcan1, pbld, *sgdrlref, *sgdrill, pdrlxy, pfzout, pcout, pindexdrl,
        prdrlout, [if dwell$, *dwell$], *feed, strcantext, pCustomDrillCycle, e$ =========> #pCustomDrillCycle Call out here
      pcom_movea
#EndRegion

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

G-Code out put....
N20( .3906,25/64 STUB DRILL, HSS, 118.DEGS,)
(2FLTS 1.875LOC, 2.00STO)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19
G28 Y0
T20 M6(DRILL 30X HOLD DOWN HOLES FOR 3/8-16 SCREWS, CUT#2)
G90 G54 X-18.9402 Y8.6574
G43 H20 Z.375 T21 M8(DOC= Z-.23)
G98 G81 Z-.23 R.025 F44. (REAMING CYCLE)=====> It should show (REAMING CYCLE) here, right now it is not showing.
X-16.071 Y5.7883
X-8.2326 Y4.4953
X-16.071 Y-5.7883
G80
M9
G91 G28 Z0.
/G28 Y0.

Untitled.png

Link to comment
Share on other sites

'pdrill$' is only called for 'drillcyc$' = 0. Your Post Block to output a Comment is missing "if drillcyc$ = 0", which is the only case where 'pdrill$' will output anything.

pdrill$ = drillcyc$ 0

ppeck$ = drillcyc$ 1

pchpbrk$ = drillcyc$ 2

ptap$ = drillcyc$ 3

pbore1$ = drillcyc$ 4

pbore2$ = drillcyc$ 5

pmisc1$ = drillcyc$ 6

pmisc2$ = drillcyc$ 7

------------------------------------

You can only use "nextdc$" at a Tool Change Event. (psof$, ptlchg$, ptlchg0$, ptlchg_com).

If you are "in the Drill Post Blocks", then you should be using 'drillcyc$'. Do not mix the use of these variables. Use 'nextdc$' in Tool Change logic (you are "looking ahead" to see "wha the next Drill Cycle value is".)

The reason you aren't seeing any output, is because you are using 'drillcyc$ = 4'. This always calls 'pbore1$' for the 1st hole in the Operation. Every "additional hole" in that Operation is output through 'pbore1_2$'.

---------------------------------------------------------------------

pdrill_debug  #Output debug statements for drilling

     *e$
     if debug_drill, "DEBUG DRILLING - ", ~drillcyc$, e$


prdrlout        #R drill position
      if absinc$ = zero, refht_a, !refht_i
      else, refht_i, !refht_a

pdrlxy          #Drill XY coordinates
      if force_dpts, pfxout, pfyout
      else, pxout, pyout

pdrill$          #Canned Drill Cycle
      pdrlcommonb
      
      pdrill_debug
      
      pcan1, pbld, n$, *sgdrlref, *sgdrill, pdrlxy, pfzout, pcout, pindexdrl,
        prdrlout, [if dwell$, *dwell$], *feed, strcantext, "(PDRILL IS DRILLCYC$ 0)", e$
      pcom_movea

ppeck$           #Canned Peck Drill Cycle
      pdrlcommonb
      
      pdrill_debug
      
      pcan1, pbld, n$, *sgdrlref, *sgdrill, pdrlxy, pfzout, pcout, pindexdrl,
        prdrlout, *peck1$, [if haas, *peck2$, *peckclr$], *feed, strcantext, "(PPECK IS DRILLCYC$ 1)",  e$
      pcom_movea

pchpbrk$         #Canned Chip Break Cycle
      pdrlcommonb
            
      pdrill_debug
      
      pcan1, pbld, n$, *sgdrlref, *sgdrill, pdrlxy, pfzout, pcout, pindexdrl,
        prdrlout, *peck1$, *feed, strcantext, "(PCHPBRK IS DRILLCYC$ 2)",  e$
      pcom_movea

ptap$            #Canned Tap Cycle
      pdrlcommonb
            
      pdrill_debug
      
      #RH/LH based on spindle direction
      if rigid_tap, pbld, n$, *sm29, *speed, e$           #Rigid Tapping
      if use_pitch = 0,
        [
        pcan1, pbld, n$, *sgdrlref, *sgdrill, pdrlxy, pfzout, pcout, pindexdrl,
          prdrlout, [if peck1$, *peck1$], *feed, strcantext,  "(PTAP IS DRILLCYC$ 3)",  e$
        ]
      else,
        [
        if metvals, pitch = n_tap_thds$  # Tap pitch (mm  per thread)
        else, pitch = 1/n_tap_thds$       # Tap pitch (inches per thread)
        pcan1, pbld, n$, *sgdrlref, *sgdrill, pdrlxy, pfzout, pcout, pindexdrl,
          prdrlout, [if peck1$, *peck1$], *pitch, !feed, strcantext, "(PTAP IS DRILLCYC$ 3)",   e$
        ]
      pcom_movea

pbore1$          #Canned Bore #1 Cycle
      pdrlcommonb
            
      pdrill_debug
      
      pcan1, pbld, n$, *sgdrlref, *sgdrill, pdrlxy, pfzout, pcout, pindexdrl,
        prdrlout, [if dwell$, *dwell$], *feed, strcantext, "(PBORE1 IS DRILLCYC$ 4)",   e$
      pcom_movea

pbore2$          #Canned Bore #2 Cycle
      pdrlcommonb
            
      pdrill_debug
      
      pcan1, pbld, n$, *sgdrlref, *sgdrill, pdrlxy, pfzout, pcout, pindexdrl,
        prdrlout, *feed, strcantext,  "(PBORE2 IS DRILLCYC$ 5)",  e$
      pcom_movea

pmisc1$          #Canned Misc #1 Cycle
      pdrlcommonb
            
      pdrill_debug
      
      pcan1, pbld, n$, *sgdrlref, *sgdrill, pdrlxy, pfzout, pcout, pindexdrl,
        prdrlout, shftdrl$, [if dwell$, *dwell$], *feed, strcantext, "(PMISC1 IS DRILLCYC$ 6)",  e$
      pcom_movea

pmisc2$          #Canned Misc #2 Cycle (User Option)
      pdrlcommonb
      
      pdrill_debug
      
      pcan1, pbld, n$, *sgdrlref, *sgdrill, pdrlxy, pfzout, pcout, pindexdrl,
        prdrlout, [if dwell$, *dwell$], *feed, strcantext, "(PMISC2 IS DRILLCYC$ 7)", e$
      pcom_movea
      

 

  • Like 2
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...