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 and Misc.Integers


Recommended Posts

I'm using MPMaster and I can't get the Misc.Integers to come out at the right time. I have mi2$ setup for "Tool Breakage Detection" and I want it to output in pretract. This works fine as long as there is no tool change

 

Let's say I have 3 op's using the same tool number and I want to force a toolchange at Op3 and I also want to do tool breakage after Op3. The problem is Op2 and Op3 outputs the mi2$.

 

For the life of me I can't figure this out!

 

Thanks,

 

Josh-

Link to comment
Share on other sites

i have this in my post, at end of pretract and also ptlchg blocks

 

if mi7$ = 1,

[

pbld, n$, "G325H#148(TOOL BREAKAGE DETECTION,FORCED2)", e$

]

 

This works but if you force a tool change it outputs it on the previous op. Let's say I'm Milling with an end mill and then I want to force a tool change and drill with an endmill but initiate tool breakage afterwards. It outputs it at the retract of both ops. It works fine if you don't force the toolchange.

 

 

You can use the ptoolend$ postblock;

 

ptoolend$        #End of tool path, before reading new tool data
     !speed, !spdir2
     if nextop$ = 1002,
       [
       if mi2$,  add your breakage code (or goto breakage code)
       ]

 

I couldn't get this to work by itself.

 

I know what I'm doing is overkill but I try to make sure every scenario is covered....

 

Thanks guys,

 

Josh-

Link to comment
Share on other sites

Initialize a numeric variable, load it with the value from mi7$ in pmiscint$ and check that variable in pretract instead of mi7$. The problem you are seeing is that pretarct is called by ptlchg1002$ which means the mi7$ value is the value from the next operation when there is a tool change.

 

Alternately, you could update the previous value of mi7$ (using !mi7$) in pmiscint$ or at the end of psof$, ptlchg$ and ptlchg0$ and then check prv_mi7$ in pretract.

Link to comment
Share on other sites

Thanks Paul!

 

I put the following at the end of ptoolend

 

!mi2$

 

Then put the following at the end of pretract and pretract0

 

if prv_mi2$ = 1, ptoolcheck

 

And finally I created a post block

 

ptoolcheck

       if mr2$ = 0,
       [
       pbld, n$, "G325 Q.005 (TOOL BREAKAGE DETECTION)", e$
       ]
       if mr2$ = 1,
       [
       pbld, n$, "G325 Q.005 N9999 (TOOL BREAKAGE DETECTION - ABORT)", e$
       ]

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