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:

Custom Tap


Recommended Posts

Hello everyone,

   I defined tap codes for Mitsubishi control and I did not get the second point out put, suppose I have two points to be tapped.  I think I did something wrong and I tried for the last 2 days but didn't work.  Please help, thank you.

pdrlcst$         #Custom drill cycles 8 - 19 (user option)      pdrlcommonb      #RH/LH based on spindle direction      #if rigid_tap, pbld, no_spc$, *sm29, *speed, e$           #Rigid Tapping      if depth$ < zero & refht$ < zero,        [        tdoc = depth$ + abs(refht$) #Calculate total cutting depth        ]      else, tdoc = depth$ + refht$ #Calculate total cutting depth      if tdoc <> min_depth, "(", no_spc$, *tdoc, no_spc$, ")", e$      if drillcyc$ = 8, prigid_tap      if drillcyc$ = 9, pdrlcst10 #Mitsubishi tap codes      if drillcyc$ = 10, pdrilldeep      pcom_moveapdrlcst10         #Akira Seiki custom tap      #RH/LH based on spindle direction      #"DEBUG: metvals: ", ~metvals, e$      if met_tool$,        [        if metvals, pitch = n_tap_thds$  #Metric NC Code - Metric Tap        else, pitch = (1/n_tap_thds$) * 25.4  #Metric NC Code - English Tap        ]      else, #Inch mode        [        if metvals,  pitch = (1/n_tap_thds$) * 25.4  #Metric NC Code - English Tap        else, pitch = n_tap_thds$           #English NC Code - English Tap        ]      result = nwadrs("E", pitch) #Assign 'pitch' to use letter E      if dwell$,        [        result = newfs(4, dwell$)        ]      if shftdrl$,        [        result = newfs(2, dwell$)        dwell$ = shftdrl$        ]     # if retr$, #Used for "Before Mcode"      #  [     #   result = newfs(4, retr$) #Output as Integer      #  result = nwadrs("M",retr$) #Change output string to "M"      #  ]      #pbld, no_spc$, *retr$, *speed, "(RIGID TAP)", e$      retr$ = zero      speed = sav_speed #Restore speed value, saved in ptlchg_com      pcan1, pbld, no_spc$, *sgdrlref, *sg84, pxout, pyout, pfzout,        prdrlout, *pitch, *speed, !feed, [if dwell$, *dwell$], ptapr, strcantext, e$      pcom_moveaptapr  # "R" output for Akira Seiki tap      if met_tool$, #Metric NC Code        [        if metvals, ",R1"  #Metric NC Code - Metric Tap        else, ",R1"             #Metric NC Code - English Tap        ]      else, #Inch NC Code        [        if metvals, ",R1_metric"  #English NC Code - Metric Tap        else, ",R1"             #English NC Code - English Tap        ] 

 pdrlcst_2$ #Custom drill cycles 8 - 19, additional points (user option)     

      #Use this postblock to customize drilling cycles 8 - 19      if drillcyc$ = 8, pdrill_2$      if drillcyc$ = 9, pdrlcst10 # Mitsuibishi Tap Second Point      if drillcyc$ = 10, pdrilldeep	  
pdrlcst$         #Custom drill cycles 8 - 19 (user option)      pdrlcommonb      #RH/LH based on spindle direction      #if rigid_tap, pbld, no_spc$, *sm29, *speed, e$           #Rigid Tapping      if depth$ < zero & refht$ < zero,        [        tdoc = depth$ + abs(refht$) #Calculate total cutting depth        ]      else, tdoc = depth$ + refht$ #Calculate total cutting depth      if tdoc <> min_depth, "(", no_spc$, *tdoc, no_spc$, ")", e$      if drillcyc$ = 8, prigid_tap      if drillcyc$ = 9, pdrlcst10 #Mitsubishi tap codes      if drillcyc$ = 10, pdrilldeep      pcom_movea
 
=========== G-CODES==================
N16(.3200, 1/8-27 NPT CUT TAP, FLAT BOTTOM, HSS,)
(4FLTS .775LOC, 1.25LOH)
G0 G17 G40 G49 G80 G90
G53 Z0. M19
T16 M6(TAP 2X 1/8-27 PIPE THREAD, CUT#69)
G90 G54 M45(MIST BUSTER ON)
X.8 Y-1.1125  ==========> This location is GOOD
G43 H16 Z1. /M8(DOC= Z-.625)
(TDOC= -.5938)
G98 G84 Z-.625 R.0313 E27. S269 ,R1
G98 G84 Z-.625 E27. S269 ,R1 ==========> This should be another location of X and Y value instead of "G98 G84 Z-.625 E27. S269 ,R1"
G80 M9
G90 G53 Z0.
G53 Y0.
G54 X0.
M30
%
  • Like 1
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...