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:

Edit Post to output M29 at Tap operations


kkominiarek
 Share

Recommended Posts

I need to output M29 each time I tap with two machines/controls I have.

The spindle speed will change but M29 will be constant.

 

**This is output at present

T3 ( TOOL-3. - 1 1/8 -12 TAP )

( TAP HOLE )

M6

G0 G90 G54 X5.25 Y5. S240 M3

G43 H3 Z4.

G98 G84 Z-2. R.1 F20.

G80

M5

G91 G28 Z0.

 

****This is what I need****

T3 ( TOOL-3. - 1 1/8 -12 TAP )

( TAP HOLE )

M6

G0 G90 G54 X5.25 Y5. S240 M3

G43 H3 Z4.

M29 S240

G98 G84 Z-2. R.1 F20.

G80

M5

G91 G28 Z0.

 

Any help as to where to make the edit will be much appreciated.

Link to comment
Share on other sites

Use the debugger to find where the M03 is output from, then put a conditional statement around that to look for the tapping opcode & output the M29

 

i.e. (mpmaster)

 

 

pfspindleout     #Spindle speed and M code output forced    
     if not((opcode$ = 3 | opcode$ = 16) & nextdc$ = 3 & rigid_tap), *speed, *spindle

 

 

Change to

 

 


pfspindleout     #Spindle speed and M code output forced    
     if opcode$ = tapping, 
       [
       if not((opcode$ = 3 | opcode$ = 16) & nextdc$ = 3 & rigid_tap), *speed, "M29"
       ]
    else,
      [
     if not((opcode$ = 3 | opcode$ = 16) & nextdc$ = 3 & rigid_tap), *speed, *spindle
      ]

 

Just a guide, nothing concrete there (don't know the opcode for tapping off the top of my head).... and you may have to make the changes in multiple places depending on if it is the first tool in the program, if your calling the same tool twice....

 

 

 

Link to comment
Share on other sites

In the general output settings, I use pitch for tapping not feed. Then:

 

 

The ptap section:

 


ptap$            #Canned Tap Cycle
     pdrlcommonb
     #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, 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, e$
       ]
     pcom_movea


 

#Misc Gcode strings

 

sm29       : "M29"          #Rigid Tapping

Link to comment
Share on other sites

I didn't want to use a misc value.....just to keep it simple.

 

Using post debugger as a guide, I hard put the M29 in the tap cycle and added *speed

as well. Seems to do what I need.

 

Thanks for suggestions.

 

T3 ( TOOL-3. - 1 1/8 -12 TAP )

( TAP HOLE )

M6

G0 G90 G54 X5.25 Y5. S240 M3

G43 H3 Z4.

M29 S240

G98 G84 Z-2. R.1 F20.

G80

M5

G91 G28 Z0.

Link to comment
Share on other sites

this is what I have in my MpMaster ptap$ line:

 

if rigid_tap, pbld, n$, *sm29, *speed, e$ #Rigid Tapping

if use_pitch = 0,blah blah blah

 

 

the *sm29 is forcing the M29 code when Rigid Tapping is on (I always use Rigid Tapping)

 

 

edit:

nvm, didn't see Spade's post.

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