585,778 active members*
4,330 visitors online*
Register for free
Login
IndustryArena Forum > MetalWorking Machines > Okuma > G116 tool change macro reordering
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2014
    Posts
    44

    G116 tool change macro reordering

    we are using the macro typed out below to handle the tool changes in our okuma mb56va mills and there's a certain behavior i would like to change.
    when we run a program (cycle start) and the tool needed is currently in the spindle, the spindle will first drive all the way up "G0Z5000" and THEN check if the correct tool is in the spindle and THEN go back down and start the operation. what i would like to change is have to machine FIRST check if the tool is the spindle and if it's not then use "G0Z5000". and if called tool IS currently in the spindle then start operation. seems like a simple change in the code but i'm not very fluent at this kind of stuff so if anybody could do it for me i would thank you in advance

    OATC1
    (TOOL CHANGE MACRO)
    (COMMAND IS G116 T?? Q??)
    (T=DESIRED TOOL #, Q=NEXT TOOL #)
    (G116 T0 WILL CLEAR TOOL FROM SPINDLE)
    (FEB 5, 2004)
    M329
    M5
    G0Z5000
    IF[PT EQ 0]NMT
    IF[VTLCN EQ PT] NFIN
    IF[VNTOL EQ PT] NCH
    IF[VNTOL EQ 0] NCHG
    M64
    NCHG T=PT M6
    NFIN IF[VNTOL EQ 0] NTL
    IF[VNTOL NE PQ] NCLR
    GOTO NEND
    NCH M6
    GOTO NFIN
    NCLR M64
    NTL T=PQ
    GOTO NEND
    NMT IF[VNTOL EQ 0]NRID
    M64
    NRID M63
    M6
    NEND RTS

  2. #2
    Join Date
    Apr 2014
    Posts
    44

    Re: G116 tool change macro reordering

    got the answer to my question. good thing my brother understands coding language cause i hardly expected any answer from this forum within a day....or week. so here goes, for those of you who might wanna use it as well.
    all you need to do is add this line of code IF[VTLCN EQ PT] NEND right before G0Z5000 so what it does now is first check if the tool called from the G116 macro is in the spindle, and if it is the code will go directly to NEND which is RTS which is the end of the macro which means the operation will continue. And if it's not, the macro will just skip along checking all the switches, changing tools till it's happy...

    good luck and have fun...

Similar Threads

  1. Need help with Macro for checking tool length before tool change
    By mioduz in forum Tormach Personal CNC Mill
    Replies: 11
    Last Post: 04-18-2014, 08:43 PM
  2. tool change and measure tool lenght, macro?
    By Charon in forum Mach Wizards, Macros, & Addons
    Replies: 3
    Last Post: 03-20-2012, 06:56 PM
  3. Replies: 0
    Last Post: 02-14-2010, 07:26 PM
  4. M6 tool change macro
    By at6c in forum Mach Mill
    Replies: 0
    Last Post: 08-08-2009, 01:41 PM
  5. Tool Change Macro
    By cncdiag in forum Mazak, Mitsubishi, Mazatrol
    Replies: 0
    Last Post: 03-26-2007, 08:20 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •