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:

MPMaster editing question:


ret5hd
 Share

Recommended Posts

Fanuc, X4, MPMaster

 

One of the programming conventions at the shop where I am employed is to fomat a G43 line like this:

G43 H[#599]

 

rather than:

G43 Hxxx

 

What this does is set the length offset # to the current tool #. We do this because tool numbers are often (always?) edited at the machine and it insures that a length offset is not forgotten.

 

In the post, I edited this line:

pbld, n$, "G43", *tlngno$, pfzout, scoolant, next_tool$, e$

 

to this:

pbld, n$, "G43", "H["35"599]", pfzout, next_tool$, e$

 

info: 35 is the ascii character #

 

The output then looks like this:

G43 H[ # 599] (with a space on each side of the #)

 

Surprisingly (to me, anyway) this doesn't seem to affect how the code runs. BUT, is there a more elegant way to accomplish this? Also, the way MPMaster sets diameter offsets (G41 and G42) is more complex and it seems the best I can do is to get something like "G42 D0 Xx.xxx Yx.xxx as my output then do a global search and replace in a text editor to get this:

G42 D[#599] Xx.xxx Yx.xxx).

 

Thank you.

Link to comment
Share on other sites

Thank you Tim, that worked exactly as I wished. I had tried this exact thing on an X2 MPFan post and it treated the # as the start of a comment, so I just lived with the ascii workaround (complete with spaces).

 

We recently got X4, and I was tidying things up and thought I would ask here, and now it works. I didn't even re-try that option till you said it.

 

Now, got a fix for the G41 D[#599] prob? I think I will go try a variant of the above solution first.

Link to comment
Share on other sites

For cutter comp. you may need this

 

Code

-----------------------------------

# Cutter compensation G code selection

scc0 : "G40" #Cancel cutter compensation

scc1 : "G41 D[#599]" #Cutter compensation left

scc2 : "G42 D[#599]" #Cutter compensation right

sccomp : "" #Target for string

-------------------------------------

 

and find cutter comp. section

 

code

-------------------------------------

 

pccdia #Cutter Compensation

#Force Dxx#

if prv_cc_pos$ <> cc_pos$ & cc_pos$, prv_tloffno$ = c9k

sccomp

if cc_pos$,#tloffno$

--------------------------------------

 

and just "Post and Go"

Hope it helps.

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