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:

G95 output for tapping


Recommended Posts

I have this section:

# Feed mode G code selection
sg94    : "G94"      #UPM
sg94d   : "G94"      #DPM, See pfcalc_deg if you use another gcode
sg93    : "G93"      #Inverse
sgfeed  : ""         #Target string

fstrsel sg94 ipr_type sgfeed 3 -1

 

I tried modifying it like this:

# Feed mode G code selection
sg94    : "G94"      #UPM
sg94d   : "G94"      #DPM, See pfcalc_deg if you use another gcode
sg93    : "G93"      #Inverse
sg95    : "G95"      #UPR        #set with mi9$
sgfeed  : ""         #Target string

fstrsel sg94 ipr_type sgfeed 4 -1

 

But that gave me errors on the lines that I changed.

Link to comment
Share on other sites

I am curious why you wouldn't just use the MPMaster post that's written for mill's? I am pretty sure it is already setup to do tapping in IPR..

 

If there is some reason you don't want to use the mill version.. you could probably download it and use it for a reference for the logic you need.. 

Link to comment
Share on other sites

I am curious why you wouldn't just use the MPMaster post that's written for mill's? I am pretty sure it is already setup to do tapping in IPR..

 

If there is some reason you don't want to use the mill version.. you could probably download it and use it for a reference for the logic you need.. 

Because our seat is a router seat.

I might try the mill master for reference if I can't get this working.

 

Thanks

Zeke

Link to comment
Share on other sites

I copied and pasted the entire drill section from one of our mill posts into a router post for use with an angle head.  It required a number of other edits to get it to work but it now posts without errors.  I have not had a change to cut anything with it yet but the code looks like it should work.  Its for an Okuma but it might be useful in pointing you in the right direction.  I can email it to you if you think it will help.

Link to comment
Share on other sites
  • 3 months later...

Straight out of the generic 4 Axis Fanuc

pmisc2$          #Canned Rigid Tapping Cycle
      pdrlcommonb
      #RH/LH based on spindle direction
      if met_tool$,
        [
        if toolismetric, pitch = n_tap_thds$  #Metric NC Code - Metric Tap
        else, pitch = (1/n_tap_thds$) * 25.4  #Metric NC Code - English Tap
        ]
      else,
        [
        if toolismetric, pitch = n_tap_thds$ * (1/25.4)  #English NC Code - Metric Tap
        else, pitch = 1/n_tap_thds$           #English NC Code - English Tap
        ]
      if tap_feedtype = 0,
        [
        pitch = pitch * speed
        pbld, n$, sg94, e$
        ]
      else, pbld, n$, sg95, e$
      pbld, n$, sm29, *speed, e$
      pcan1, pbld, n$, *sgdrlref, *sgdrill, pxout, pyout, pfzout,
        prdrlout, *pitch, !feed, strcantext, e$
      pcom_movea

Choosing Misc 2 it should be labeled as Rigid Tapping

 

 

 


[misc2]
1. "Rigid Tapping Cycle"
3. ""
7. ""
8. ""
9. ""
10. ""
11. ""
Link to comment
Share on other sites

I'm so lost now

 

 

Straight out of the generic 4 Axis Fanuc

pmisc2$          #Canned Rigid Tapping Cycle
      pdrlcommonb
      #RH/LH based on spindle direction
      if met_tool$,
        [
        if toolismetric, pitch = n_tap_thds$  #Metric NC Code - Metric Tap
        else, pitch = (1/n_tap_thds$) * 25.4  #Metric NC Code - English Tap
        ]
      else,
        [
        if toolismetric, pitch = n_tap_thds$ * (1/25.4)  #English NC Code - Metric Tap
        else, pitch = 1/n_tap_thds$           #English NC Code - English Tap
        ]
      if tap_feedtype = 0,
        [
        pitch = pitch * speed
        pbld, n$, sg94, e$
        ]
      else, pbld, n$, sg95, e$
      pbld, n$, sm29, *speed, e$
      pcan1, pbld, n$, *sgdrlref, *sgdrill, pxout, pyout, pfzout,
        prdrlout, *pitch, !feed, strcantext, e$
      pcom_movea

Choosing Misc 2 it should be labeled as Rigid Tapping

 

 

 

[misc2]
1. "Rigid Tapping Cycle"
3. ""
7. ""
8. ""
9. ""
10. ""
11. ""

This is the misc2 in my post

"pmisc2$          #Canned Misc #2 Cycle (User Option)
      pdrill$"

 

Is this refering to misc integers or misc reals?

Link to comment
Share on other sites

I have this in my post text sectton:

 

# --------------------------------------------------------------------------
# POST TEXT
# --------------------------------------------------------------------------
[CTRL_ROUTER|MPROUTER]
[misc integers]
1. "Work Coordinates [0-1=G92, 2=G54's]"//2
2. "Absolute/Incremental, top level [0=ABS, 1=INC]"
3. "Reference Return [0=G28, 1=G30]"
4. "Table Selection [0=Both,1=Right,2=Left]"
5. "Contour Mode [0=G642,1=G64]"
6. "Brush Height [1-16]"//1
7. "Program to be called from Main? [0=No,1=Yes]"

Link to comment
Share on other sites

I am no expert but looking at the router post I modified I think you will have to make changes in three places.  Below are the three areas with what I think needs to be changed.  I am not sure what the !feed does but it was in my post so it may or may not be needed.   If you want to control it by the misc values there will be a little more required to make it work.

 

 

 

 

# General Output Settings
# --------------------------------------------------------------------------
use_pitch    : 1     #0 = Use feed for tapping, 1 = Use pitch for tapping         <-------------------------  Add this line

 

 

 

 

 

 

 

 

 

# --------------------------------------------------------------------------
fmt  "Q" 2  peck1$      #First peck increment (positive)
fmt  "Q" 2  shftdrl$    #Fine bore tool shift
fmt  "R" 2  refht_a     #Reference height
fmt  "R" 2  refht_i     #Reference height

fmt  "F" 2  pitch       #Tap pitch (inches per thread)          <-------------------------------------------------------------------  Add this line
fmt  "N" 4  n_tap_thds$ #Number of threads per inch (tpi) / Pitch (mm)             <----------------------------------------  Add this line

 

 

 

 

 

 

 

 

ptap$            #Canned Tap Cycle
      pdrlcommonb

    if use_pitch = 0,            <-------------------------------------------------------------------------------------------------  Add this line
      [            <-------------------------------------------------------------------------------------------------  Add this line

      result = newfs(17, feed)  # Set for tapping Feedrate format
      pcan1, pbld, n$, *sgplane, *sgdrlref, *sgdrill, prdrlout,
        prdrlout, *feed, strcantext, e$

      ]            <-------------------------------------------------------------------------------------------------  Add this line

   else,          <-------------------------------------------------------------------------------------------------  Add this line
      [          <-------------------------------------------------------------------------------------------------  Add this line

      if met_tool$, pitch = n_tap_thds$  # Tap pitch (mm  per thread)          <-----------------------  Add this line
      else, pitch = 1/n_tap_thds$       # Tap pitch (inches per thread)          <-----------------------  Add this line
      pcan1, pbld, n$, *sgplane, *sgdrlref, *sgdrill, prdrlout,          <-----------------------  Add this line
      prdrlout, *pitch, !feed, strcantext, e$          <----------------------------------------  Add this line

      ]          <-------------------------------------------------------------------------------------------------  Add this line

 

      pcom_movea

 

# --------------------------------------------------------------------------

Link to comment
Share on other sites
  • 4 weeks later...

I gave this a shot and got a few errors as well as it failing to post out IPR. What am I missing?

 

#-----------------------------------------------------------------------------------

 

use_pitch    : 1     #0 = Use feed for tapping, 1 = Use pitch for tapping

 

#-----------------------------------------------------------------------------------

 

ptap$            #Canned Tap Cycle line number 1075
      pdrlcommonb
      if use_pitch = 0
      [                                                                                                       #line number (1078)
       result = newfs(17, feed)  # Set for tapping Feedrate format
       pcan1, pbld, n$, *sgdrlref, *sgdrill, pxout, pyout, pfzout,
       prdrlout, *feed, strcantext, e$
      ]
      else, 
      [
         if met_tool$, pitch = n_tap_thds$  # Tap pitch (mm  per thread)        
       else, pitch = 1/n_tap_thds$       # Tap pitch (inches per thread)        
       pcan1, pbld, n$, *sgplane, *sgdrlref, *sgdrill, prdrlout,        
       prdrlrout, *pitch, !feed, strcantext, e$        
      ]          

      pcom_movea

 

#-----------------------------------------------------------------------------------

 

<2> - PST LINE (1078) - Label was expected but was not found[7], Illegal character(s) encountered
<2> - PST LINE (1078) - The formula/boolean does not terminate properly
<2> - PST LINE (1075) - Missing a matching open bracket

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...