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:

Inserting a Line of Code when posting


Recommended Posts

I have very limited experience working with a post.  I am doing some machining with a saw blade.  When the program completes the saw blade continues to rotate for another minute or so after the M05 until it comes to a stop.  I did find by entering these two lines in the code before the M05 it stopped with no problem (M03 S1000)(G04 P10).  So by reducing the RPM and putting a slight delay in there I solved one problem.  Now my second problem is being able to do this automatically without having to enter this code in every time.  Is there a way to make this happen if I just choose a specific tool?  Any help would be greatly appreciated.  Thank You

 

Here is the end of the program the two lines I would like to insert are right before line "N290 M05"

 

 
N280 G01 X7.598034 Z12.7938
N282 G00 Y.5
N284 (TCP)
N286 (UIO,Z(L370))
N288 G00 X7.598034 Y.5 Z12.7938
N290 M05
N292 G00 G79 Z(@ZPARKP1)
N294 G00 G79 A0. C0.
N296 G500
N298 M30
  • Like 1
Link to comment
Share on other sites

In your pretract post block, you should see the output for M05

 

      pbld, n$, sccomp, scoolant, psub_end_mny, e$
      pbld, n$, *sg90, sg49, "Z0.", "M05", e$
 
You will want to add logic so that if the current t$ is your saw then it would output the commands you are looking for.
 
     if t$ = 15, [
      pbld, n$, "M03","S1000", "(SLOW DOWN THE SPINDLE)" e$
      pbld, n$, "G04", "P10", e$
      ]
      pbld, n$, sccomp, scoolant, psub_end_mny, e$
      pbld, n$, *sg90, sg49, "Z0.", "M05", e$

 

The real issue here is that the VFD (Variable Frequency Drive) parameters are a bit messed up.

You can program the parameters of the VFD so that the spindle stops dead on an M05.

The machine builder likely has this set conservative to prolong spindle motor life.

 

Allan 

Link to comment
Share on other sites

Here is the end of the program the two lines I would like to insert are right before line "N290 M05"

 

 
N280 G01 X7.598034 Z12.7938
N282 G00 Y.5
N284 (TCP)
N286 (UIO,Z(L370))
N288 G00 X7.598034 Y.5 Z12.7938
N290 M05
N292 G00 G79 Z(@ZPARKP1)
N294 G00 G79 A0. C0.
N296 G500
N298 M30
Link to comment
Share on other sites

In your pretract post block, you should see the output for M05

 

      pbld, n$, sccomp, scoolant, psub_end_mny, e$
      pbld, n$, *sg90, sg49, "Z0.", "M05", e$
 
You will want to add logic so that if the current t$ is your saw then it would output the commands you are looking for.
 
     if t$ = 15, [
      pbld, n$, "M03","S1000", "(SLOW DOWN THE SPINDLE)" e$
      pbld, n$, "G04", "P10", e$
      ]
      pbld, n$, sccomp, scoolant, psub_end_mny, e$
      pbld, n$, *sg90, sg49, "Z0.", "M05", e$

 

My logic is showing that if Tool #15 was the tool you wanted to slow down before stopping, it would output it.

To make the logic easier to use picking a specific tool is the easiest way; there are other methods as well.

 

 

The output you show appears to be 5axis; so your post provider can add this logic for you.

 

Allan

 

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