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:

Okuma Tool Change Help - MB-46VAE w/OSP-E100M Control


Rotary Ninja
 Share

Recommended Posts

We just got a seat of Mastercam and a post processor for our Okuma mill. I have the stage tool setting turned on in the post. The first tool in the program is tool #1. And the last tool in the program is tool #1. The machining process requires this. Anyway, the machine alarms out if you start the program and a tool change calls for the same tool that is in the spindle. And at the end of the program the stage tool call is alarming out the machine since it is staging the tool already in the spindle.

 

I am unfamiliar with Okuma mills. Is there a setting in the machine parameters to ignore these redundant tool calls? Or what other options do I have to fix this? Currently I have to hand edit the code before I send to the machine and I am trying to avoid this.

 

Thanks!

Link to comment
Share on other sites

Ah, the old tool is in the spindle and I can not handle that Okuma error.

I post edit is in store need to add the VATOL logic.

            [
            #Skip tool call if tool is in spindle, can have at sof or for every change
            tno = t$
            stooln = no2str(n$)
            stooln = strn + stooln + str1
            pbld, "IF[VATOL EQ ", *tno, no_spc$, "]", *stooln, e$
            pbld, *n$, *t$, "M06", ptoolcomm, e$
            pbld, *stooln, *sm01, e$    #Skip tool call if tool is in spindle, can have at sof or for every change                    
            ] 

This code will have the machine check if the tool you are calling up is in the spindle or not, if it is then it skips ahead to the line after the M06.

 

It could be worse, I've seen a Mitsubishi control that would ignore a toolchange if the syntax was out of order and just use the tool in the spindle and lenght offset for the real tool and go on its merry way.

 

  • Like 1
Link to comment
Share on other sites

Try putting a G116 before the initial tool call. That code runs an internal macro that checks whether the tool called up is in the spindle or not. It will change if it is not, and will skip if it is. So, if your first tool is T1, you should have a line like this in the header:

 

G116 T1

 

You can modify your post to draw the initial tool in the header and use that code instead of an M6

 

EDIT: G116 works on our machines which the earliest control is a P100. If it doesn't work on yours you might try what Allan just posted ^^

Link to comment
Share on other sites

Holy crap!

 

That is what I was thinking it was. But our post editor guru at Cad Cam Technologies is away on vacation so i was trying to resolve this in other ways. I am a bit rusty on post altering. I can flip the switches. So can you tell me where I need to paste that into the post?

 

Thanks a bunch Allan!

Link to comment
Share on other sites

The G116 only works if you have the "tool change macro", I've seen very few machines with the macro.

The macro is nothing more than a .sub file with the VATOL logic.

 

There are switches in our master based posts, not sure what you are using as a base post.

 

To add this in is fairly easy.

 

You need to initilize the variables we are using:

tno     : "0"
stooln : ""
strn     : "N" 

str1     : "1"

 

 

The code I attached earlier will replace your M06 call out, could be in ptlchg, psof ect... depending on base post.

 

 

 

Link to comment
Share on other sites

The G116 only works if you have the "tool change macro", I've seen very few machines with the macro.

The macro is nothing more than a .sub file with the VATOL logic.

 

There are switches in our master based posts, not sure what you are using as a base post.

 

To add this in is fairly easy.

 

You need to initilize the variables we are using:

tno     : "0"

stooln : ""

strn     : "N" 

str1     : "1"

 

 

The code I attached earlier will replace your M06 call out, could be in ptlchg, psof ect... depending on base post.

I requested we use In-House for our posts. But our reseller gave us the Okuma post for free so the owner went with that.

[post_VERSION] #DO NOT MOVE OR ALTER THIS LINE# V18.00 P0 E1 W18.00 T1435330500 M18.00 I0 O0

Link to comment
Share on other sites

Ok. I would like to try what you initially recommended Allan. I saved a backup of my post. I found the tool change section...

 
ptlchg0$         #Call from NCI null tool change (tool number repeats)                        
      pcuttype
      pcom_moveb
      c_mmlt$ #Multiple tool subprogram call
      #if gcode = 0, result = force(maxfeedpm, maxfeedpm)
      #if gcode = 0, result = force(machtol, machtol)
      comment$
      pcan
      pbld, n$, sgplane, e$
      pspindchng
      pbld, n$, scoolant, e$
      if vmc < 2 & (fmtrnd(cabs) <> fmtrnd(prv_cabs)), p_up_rot
      if wcstype > one & workofs$ <> prv_workofs$,
        [
        sav_absinc = absinc$
        absinc$ = zero
        pbld, n$, pwcs, e$
        pbld, n$, sgabsinc, pfxout, pfyout, pfzout, pfcout, e$
        pe_inc_calc
        ps_inc_calc
        absinc$ = sav_absinc
        ]
      if cuttype = zero, ppos_cax_lin
      if gcode$ = one, plinout
      else, prapidout
      pcom_movea
      c_msng$ #Single tool subprogram call
 
ptlchg$          #Tool change                                        
      pcuttype
      toolchng = one
      if wcstype = one, #Work coordinate system
        [
        pbld, n$, *xh$, *yh$, *zh$, e$
        ]
      pbld, n$, "M01", e$
      pcom_moveb
      c_mmlt$ #Multiple tool subprogram call
      pchecktool
      pbld, *natnum, ptoolcomment, e$
      comment$
      pcan
      pbld, n$, "G80", *sgabsinc, "G40", *sgplane, pwcs, e$
      if toolcheck = 0, pbld, n$, *t$, "M6", e$
                  else, ptoolout
      pindex
      sav_absinc = absinc$
      if wcstype > one, absinc$ = zero
      pcan1, pbld, n$, *sgcode, *sgabsinc, pfxout, pfyout,
        pfcout, *speed, *spindle, pgear, strcantext, e$
      if use_vtlcn, pbld, n$, "G56=VTLCN", pfzout, scoolant, pstagecheck, !tlngno$, e$
            else, pbld, n$, "G56", *tlngno$, pfzout, scoolant, pstagecheck, e$
      absinc$ = sav_absinc
      pcom_movea
      toolchng = zero
      c_msng$ #Single tool subprogram call
      feedhs = feed
 
So I need to replace what part of that with this?:
 
[
#Skip tool call if tool is in spindle, can have at sof or for every change
tno = t$
stooln = no2str(n$)
stooln = strn + stooln + str1
pbld, "IF[VATOL EQ ", *tno, no_spc$, "]", *stooln, e$
pbld, *n$, *t$, "M06", ptoolcomm, e$
pbld, *stooln, *sm01, e$ #Skip tool call if tool is in spindle, can have at sof or for every change
 
Thanks a bunch!
Link to comment
Share on other sites
toolcheck   : 0     # Runs the "G111" macro and stages tools, Stagetool must be set to 1

                    # 0=Off, 1=VC1 VC2 output, 2=G111 A R output

 

So set this to 2? I think I tried 1 already and it alarmed out. The machine is running right now but I will try this tomorrow.

Link to comment
Share on other sites

The G116 only works if you have the "tool change macro", I've seen very few machines with the macro.

The macro is nothing more than a .sub file with the VATOL logic.

 

There are switches in our master based posts, not sure what you are using as a base post.

 

To add this in is fairly easy.

 

You need to initilize the variables we are using:

tno     : "0"

stooln : ""

strn     : "N" 

str1     : "1"

 

 

The code I attached earlier will replace your M06 call out, could be in ptlchg, psof ect... depending on base post.

 

I would suggest using VTLCN instead of VATOL. VATOL is a system variable that is a 16 bit binary that includes tool data besides the tool number. Bit 0-9 are for tool number. Bit 10-15 are for attributes, large tool, etc. VTLCN is just the tool number only.

Link to comment
Share on other sites
  • 5 weeks later...

Typically you will want to install the tool change macro into your machine so that it can be used in MDI or from any program and it will always be memory resident. Some use G116, some use G111. You will need to go to your G/M code macro page and set the G111/G116 to OTCHK.

 

Then you will need to register the following library program: (TOOL.LIB)

 

 

OTCHK
( SET GCODE PARAM. G111 TO OTCHK )
( AT TOOL CHANGE KEY IN G111 T= TOOL NO. Q = NEXT TOOL  EX: G111 T1 Q2)
IF [ VTLCN EQ PT ]NST1 (ACTIVE TOOL)
IF [ VTLNN EQ PT ]NRT1 (NEXT TOOL)
IF [ VTLNN EQ 0 ]NOT1  (NEXT TOOL) 
M64
NOT1 T=PT
NRT1 M06
NST1
IF [ PQ EQ EMPTY ]NEND (IF READY TOOL EMPTY/JUMP )
IF [ VTLNN EQ PQ ]NEND (IF PREP TOOL IS AT NEXT TOOL POS./JUMP)
IF [ VTLNN EQ 0 ]NTT1  (IF NEXT TOOL HAS NO VALUE)
M64  (NEXT TOOL POT RETURN)
NTT1
T=PQ    
M356 (NEXT POT ADVANCE)
NEND G56 H=VTLCN
D=VTLCN
RTS
PQ DEF: WHEN P IS ATTACHED TO A LETTER IT BECOMES READABLE
 
Once registered, it will be available to all programs and even MDI upon power up. This will save you lots of headaches and errors/alarms by making your tool change macro "intelligent".
 
 
Best regards,
  • Like 1
Link to comment
Share on other sites

Hi okumawiz; Is there some reason that the M06 call cannot and currently does not do the checking.

Is the M06 a macro call itself? If it is then the check should be done there.

In what situation would not having the check preformed be desired?

Can the M06 command be mapped to this special macro? 

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