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:

Problem generating Gcode


panchus
 Share

Recommended Posts

Hi, I'm relatively new in the world of Mastercam and I'm having a problem that I can not solve.
When generating the G-Code, mastercam includes, at the end, these lines of code:

 G91 G30 Z0.
 G30 X0. Y0 A0.

The problem is that in my CNC it goes back to zero and it ruins my work.
If I delete it manually it works fine, but if I forget to remove it, disaster happens.

Is there any way that Mastercam does not include those lines?

 

Thanks

Link to comment
Share on other sites
11 minutes ago, panchus said:

Helo Leon82. Thanks for the reply.

it only appears at the end of the gCode example:

N790 X225.917 Y365.745
N792 X29.716
N794 G3 X26.716 Y362.745 I0. J-3.
N796 G1 Y31.464
N798 G0 Z25.
N800 M5
N802 G91 G30 Z0.
N804 G30 X0. Y0. A0.

N806 M30

 

 

 

Do you have any experience editing your post?

Link to comment
Share on other sites

looks like it's hard coded text  i.e . written "as is" in your post processor  in a section called peof$ (program end of file ) 

peof$

.......

      n$,  "G91 G30 Z0.". e$
     n$, " G30 X0. Y0. A0.", e$

.........

just add # in front of  these two lines  to change them  into comments like this :

 #n$,  "G91 G30 Z0.". e$ 
 #n$, " G30 X0. Y0. A0.", e$

 

Gracjan

Link to comment
Share on other sites
4 hours ago, pullo said:

looks like it's hard coded text  i.e . written "as is" in your post processor  in a section called peof$ (program end of file ) 

peof$

.......

      n$,  "G91 G30 Z0.". e$
     n$, " G30 X0. Y0. A0.", e$

.........

just add # in front of  these two lines  to change them  into comments like this :

 #n$,  "G91 G30 Z0.". e$ 
 #n$, " G30 X0. Y0. A0.", e$

 

Gracjan

Sir I would not recommend that approach. At the end of every program I have written for the last 30 years there has been some code to send the machine home to be safe 99% of the time. Yes been times when I was running production at 11 seconds a part run time I was not sending the machine home, but that was 25+ years ago.  I was ruining one tool and I was bring it up 1.0 inch and back 6.0 inch behind the vice and swapping parts every 11 seconds. Maybe I can count on my finger the others. A g28 or a G30 should always be a good code on just about any machine I have ever run. If not one then the other.

Link to comment
Share on other sites
On 3/8/2018 at 3:48 PM, panchus said:

Hi, I'm relatively new in the world of Mastercam and I'm having a problem that I can not solve.
When generating the G-Code, mastercam includes, at the end, these lines of code:

 G91 G30 Z0.
 G30 X0. Y0 A0.

The problem is that in my CNC it goes back to zero and it ruins my work.
If I delete it manually it works fine, but if I forget to remove it, disaster happens.

Is there any way that Mastercam does not include those lines?

 

Thanks

I believe  that  panchus wanted to get rid of those  lines  instead of deleting them manually (IF HE REMEMBERS TO DO THAT ).  

I did  not comment as to what should be at the end of an NC-program....

Gracjan

Link to comment
Share on other sites
On 3/8/2018 at 6:13 AM, panchus said:

Helo Leon82. Thanks for the reply.

it only appears at the end of the gCode example:

N790 X225.917 Y365.745
N792 X29.716
N794 G3 X26.716 Y362.745 I0. J-3.
N796 G1 Y31.464
N798 G0 Z25.
N800 M5
N802 G91 G30 Z0.
N804 G30 X0. Y0. A0.

N806 M30

 

 

Here he says at the end so where I made my comment from. I see an M30 and that is the end of most programs so I also used that to determine my answer. 🤓🤓

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