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:

Output G99 with every toolpath?


Recommended Posts

Hello all,

 

We have 3 Mazak lathes here and for some reason, if the operator stops the program in the middle of an eia/iso program, it reverts back to g98 instead of g99. I was wondering if there is a way to have the post out put g99 for every tool path? I'm using a lightly altered copy of the generic 2 axis post.

 

Thanks.

Link to comment
Share on other sites

Find the ltlchg$ postblock in your post, it should look something like this.

 

ltlchg$          #Toolchange, lathe
     toolchng = one
     gcode$ = zero
     copy_x = vequ(x$)
     pcc_capture   #Capture LCC ends, stop output RLCC
     c_rcc_setup$  #Setup LCC on first 60000
     plcc_lead_begin  #Save original in sav_xa and shift copy_x for LCC comp.
     pcom_moveb    #Get machine position, set inc. from c1_xh
     c_mmlt$        #Position multi-tool sub, sets inc. current if G54...
     ptoolcomment
     comment$
     if home_type < two, #Toolchange G50/home/reference position
       [
       sav_xh = vequ(copy_x)
       sav_absinc = absinc$
       absinc$ = zero
       pmap_home   #Get home position, xabs
       ps_inc_calc #Set start position, not incremental
       #Toolchange home position
       if home_type = one,
         pbld, n$, *sgcode, pfxout, pfzout, e$
       else,
         [
         #Toolchange g50 position
         pbld, n$, *sg28ref, "U0.", "W0.", e$
         toolno = t$ * 100 + zero
         if home_type = m_one, pbld, n$, *sgcode, *toolno, e$
         else, pbld, n$, *sg50, pfxout, pfzout, e$                            
         ]

 

 

The lines that look like this..

pbld, n$, *sgcode, pfxout, pfzout, e$

or,

pbld, n$, *sg28ref, "U0.", "W0.", e$

or

else, pbld, n$, *sg50, pfxout, pfzout, e$

 

 

add >>>>> *sgfeed,

so they look like...

pbld, n$, *sgfeed, *sgcode, pfxout, pfzout, e$

or,

pbld, n$, *sgfeed, *sg28ref, "U0.", "W0.", e$

or

else, pbld, n$, *sgfeed, *sg50, pfxout, pfzout, e$

Link to comment
Share on other sites

At the end of the lsof, ltlchg$ post blocks you can add in the line:

 

result = force(ipr_actv$)

 

This will force out the G98/G99 at the start of every tool.

 

If you want it to be output at the first line of every operation (including when both operations use the same tool), you need to do a little more work. At the end of lsof$ and ltlchg$ you'll need to add:

 

!op_id$

 

Then at the end of ltlchg0$ you will need to add the following code:

 

if op_id$ <> prv_op_id$, result = force(ipr_actv$)
!op_id$

Link to comment
Share on other sites
  • 1 month later...

There is a built in switch in the mplmaster and mpmaster posts called tseqno. Set this variable to 1 or 2 (depending on whether you want the sequence number to indicate the tool change number or the tool number) and you should get what you're looking for.

 

If you aren't using an mplmaster/mpmaster based post, you can download the post and follow the logic in the post by searching for tseqno. Then just apply the logic to your post.

Link to comment
Share on other sites

There is a built in switch in the mplmaster and mpmaster posts called tseqno. Set this variable to 1 or 2 (depending on whether you want the sequence number to indicate the tool change number or the tool number) and you should get what you're looking for.

 

If you aren't using an mplmaster/mpmaster based post, you can download the post and follow the logic in the post by searching for tseqno. Then just apply the logic to your post.

 

 

So with that, if I check the "force tool change" box, it will output a sequence number even if the machine isn't actually going to change tools?

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