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:

end of file


Recommended Posts

So I want to build in some logic to my post that says: at the end of the file, instead of the usual pretract do something else.

 

 What would my if line look like and what if word would I use?

 

I want to change this:

pbld, n$, sg90, sg00, "G53", "Z0.", scoolant, e$

pbld, n$, "G58", "X0.", "Y0.", protretinc, e$

 

To this:

pbld, n$, sg90, sg00, "G53", "Z0.",  scoolant, e$

pbld, n$, "G59", "X0.", "Y0.", protretinc, e$

 

G58 is a safe tool change position

G59 is a pallet change location for different machines with the same controller(cant use g53)

  • Like 1
Link to comment
Share on other sites

Different controls use different work offset numbers. For example, Okuma's use G15 Hxx

 

Ahaslam, anything in " " is output exactly the way you type in. If you change it to G59, it will output G59. If you change it to "Woo!Alright!" that's how it will come out. If you're looking for some logic to try to determine which code to output, you're going to have to 1) create a variable to hold what code you want, 2) decide how you want to determine, whether it be machine definition or mi$.

Link to comment
Share on other sites

sound be pretty easy. Just add whatever code you want in the peof$ section of the post....

 

pbld, n$, "G59", "X0.", "Y0.", protretinc, e$

n$, "M30", e$

 

This works as along as you will always use your G59 position. Otherwise what Cathedral said rings true.

 

That was the first thing I tried. but you get this.

 

G90 G00 G53 Z0.

G59 X0. Y0.

G90 G00 G53 Z0.

G58 X0. Y0.

 

It wants to output all of it.

 

 

This is simple to do. If you look in 'peof$' (end of file), there should be a call to 'pretract'.

 

Just add a pound sign (#) in front of the call to 'pretract', and add your new lines of code just below that line. Then you will get the output you want, but it will only be output at 'peof$'...

 

yep :thumbsup: ... that should work. Hold please.

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