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:

last tool post question


Tim Johnson
 Share

Recommended Posts

Is there a specific code that can be used to designate the last tool or last operation that's being posted?

 

In my post I'm calling certain macro styles to be posted with the toolpaths. The styles are at the beginning, sometimes middle and at the end. To get the macro to work where I want it and not on the first tool I use;

 

code:

             if mi2 = 23 & toolcount <> 1,

[

"IF", 91, no_spc, 35, no_spc, "914EQ1", no_spc, 93, no_spc, "(OPERATION TO BE MACHINED)GOTO6(END PROGRAM)", no_spc, e

"G91G30X0Y0Z0", e

"G91G28B0", e

"M62", e

35, no_spc, "910=2", e

35, no_spc, "909=", no_spc, 35, no_spc, "912-8", e

35, no_spc, "903=", no_spc, 35, no_spc, "911", e

35, no_spc, "920=160", e

"N5(START OPERATION 2)", e

" ", e

]

My problem is at the end is I use the same mi2 = 23 callout I get the code listed above at the end

of my program. what I'm looking for is;

code:

      if mi2 = 23,  [b]& (something to tell the post this is the last tool)[/b] 

[

"IF", 91, no_spc, 35, no_spc, "914EQ2", no_spc, 93, no_spc, "(OPERATION TO BE MACHINED)GOTO6(END PROGRAM)", no_spc, e

"M06", *first_tool, e

"/M30", e

"M99P1", e

"N6M30(END PROGRAM)", e

]

else,

[

"M06", *first_tool, e

"/M30", e

"M99P1", e

]

Link to comment
Share on other sites

Roger,

I got the "else" and the first set of code listed. The only bldnxtool is(mpmaster);

code:

pq              #Setup post based on switch settings

sav_spc = spaces

if stagetool = one, bldnxtool = one

the only ntools other than what I added is;

code:

psof            #Start of file for non-zero tool number

#prouting

ptravel

pwritbuf5

pcuttype

toolchng = one

if ntools = one,

[

#skip single tool outputs, stagetool must be on

#stagetool = m_one

!next_tool

]

Should I add these next to the toolcount variables and if so what should they be initialized at?

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