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 tool change question


gms1
 Share

Recommended Posts

I wrote a post a few years ago based off mpmaster post and I had to get rid of the tool change at the beginning of the program in the psof$ section of the post so I could put it at the end of the file. To do that I had to copy ptlchg_com to the psof section and removed the call to ptlchg_com in order to remove it (Thanks J Paris!). I tried it today on a new post i'm making with the new version of mpmaster and this doesn't work probably due to all the changes and what have ya.

I didn't like doing it that way, and I would like to make this post more universal for our machines so i'm wondering if there is a more elegant way of handling this? Is it possible to add some variable to check [if psof$ then skip ptlchg_com] and output the tool comment only? If I comment out pltchg_com in the psof section, it skips all the startup code for the cycle startup all the way past the g43 line.

Link to comment
Share on other sites

You can try this;

 

Add a variable,

code:

psof_flg   : 0      #Flag to cancel first tool change

insert the variable;

code:

psof$            #Start of file for non-zero tool number

psof_flg = 1 #<<<<<<<<<<<<

ptravel

edit tool change from;

code:

      if stagetool >= zero,

[

if omitseq$ = 1 & tseqno > 0,

[

if tseqno = 2, n$ = t$

pbld, *n$, *t$, "M06", ptoolcomm, e$

]

else, pbld, n$, *t$, "M06", ptoolcomm, e$

]

to;

code:

      if stagetool >= zero,

[

if omitseq$ = 1 & tseqno > 0,

[

if tseqno = 2, n$ = t$

if psof_flg = 1, pbld, *n$, ptoolcomm, e$

else, pbld, *n$, *t$, "M06", ptoolcomm, e$

]

else,

[

if psof_flg = 1, pbld, n$, ptoolcomm, e$

else, pbld, n$, *t$, "M06", ptoolcomm, e$

]

]

psof_flg = c9k

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