552,660 active members*
1,720 visitors online*
Register for free
Login
Page 1 of 2 12
Results 1 to 20 of 21
  1. #1
    Registered
    Join Date
    Mar 2010
    Posts
    0

    Tool change Macro 9020?

    I've been reading a lot about this macro, and I am really confused, was hoping someone can shed some light on this topic.... What exactly is the purpose of using a macro for a tool change? In all my yrs of cnc machining, I have never run across this. A simple T command with an M06 is all I ever needed to change tools. The ATC on this Funuc O-M will not work. There is a 9020 macro program in the memory. Do I need to call it up as a subprogram in order to change tools? That just doesn't make sense to me to use a separate program for a tool change... Can someone post an example of how the progrom should look to change tools? Any help is appreciated.

  2. #2
    Registered
    Join Date
    Aug 2009
    Posts
    682
    All controls use a 'background' program to perform a tool change, invoked by the M6 command, using the T value as an argument. The program should be full of obscure M-codes to check relays and work the ATC hydraulics/mechanisms. As machines vary, you will need to get in touch with the relevant machine tool builder to assist you with setting up a tool call macro.

    If 9020 is indeed the correct program to use, and is in the correct directory (system folder, for example), it should be a simple task to set up the controls system parameters to invoke this program at every M6 command.

    DP

  3. #3
    Registered
    Join Date
    Nov 2009
    Posts
    1
    i found myself in the same position about a year ago. we picked up a horizontal
    which needed to go to a set point in the x,y axii and up to that point i had been
    only dealing with vertical mills that only required to be sent home in the z axis
    ---G0 G91 G28 Z0;G90T1;M6;
    nice and simple
    in the case of the new(to me) horizontal i entered --T1;M6;--turned on the
    single block switch,put the rapid over-ride on "slow" and began pushing the cycle start button,after two pushes the screen was showing a 9000-series program which sent the spindle to the required G53 X,Y position and the z axis home, gives the control a couple m codes including M6 and the tool changed.
    the control on that machine is set up to run the 9000-series program to change the tool every time an M6 is read along with handling the M6 as a tool change
    in the 9000-series program---in the same way that a haas control can be asked
    to check for H+T code every time a G43 is read,this can also be done with the fanuc using a 9000 series program. so take a look in the 9020 program you mentioned and see what it's doing,i picked he one apart from the horizontal and used it in one of our verticals to avoid interference between
    tool and fixture during changes of long tools while tall fixtures are mounted on the table. hope this helped, and have a nice day

  4. #4
    Gold Member
    Join Date
    Mar 2003
    Posts
    2932
    It's done in a macro to eliminate you having to program the individual commands for each tool change.

    On your 0-M, parameter #0230 should be a 6. This parameter specifies the M-code that calls macro O9020. If #0230 isn't a 6 then when you program an M6 it won't call the macro.

  5. #5
    Registered
    Join Date
    Feb 2006
    Posts
    1770
    Another reason for using a tool-change macro is safety. Tool change has to be done is a safe position, say, at home position, to avoid a possible interference between moving parts (of ATC) and fixtures. A macro can be designed to automatically send the tool (spindle) to a safe position before changing the tool. If you need, you can also include spindle orientation in the macro, among other things.

  6. #6
    Gold Member
    Join Date
    Jun 2008
    Posts
    1511
    The macros in the 8000 and 9000 range can also be set so you do not see them running on the screen. So it could have been that some of the machines you were running did actually use a macro but you never noticed it because it was not visible. I would have to say that 98% of the machines that I have dealt with, setup, or installed have had macro programs for tool changes. If they didn't I would write one.

    To add to what Sinha has mentioned. I use the macro not just to move to a safe position but to skip the tool change if you are calling a tool that is already in the spindle. I also set my G43H() so that I do not have to program it after every tool change in the main program. I also set the S&F to the tools. The list can go on for the reasons to have a macro tool change.

    As you said all you needed was a T() command and an M6. Macros can be setup so that it is called every time a T() or a M6 are programmed just by setting the proper parameters as Dave specified. This is not the same thing as a subprogram call with M98 which I believe you are referring to. If 9020 was indeed your tool change program you do not need to call it. By setting #230 to 6 this will call program 9020 every time a M6 is programmed.

    Stevo

  7. #7
    Registered
    Join Date
    Mar 2008
    Posts
    150
    Anybody that have info on which parameter these Macro - as Stevo describes would call on the 3M control?
    I cant find the right parameter but i also dont know if its even possible on my old control....

    Thanks.
    Kitamura Mycenter 1 -83 with Fanuc 3M-C and Mycenter 1B -85 with 10M control.
    Yes, they are old..... but i still like them!

  8. #8
    Registered
    Join Date
    Mar 2005
    Posts
    816
    I need a much more defined M6. It's pretty good, but I don't know if there could be improvements. It's a sort of homebrew ATC w/20 station carousel, but the M6 macro runs so that it moves to X, Y and Z safe locations, and then snap, out comes the arm and flips around the tool meanhile replacing the tool in the carousel and the spindle at the same time. I do not remember which 8000 or 9000 program it is. I believe when Brent came over to build the ladder and the 9000 series programs for my 15-MA, he set the M6 they way it is standard on most machine tools.

    I remember that he and I talked at legth about how my other FANUC controls and machines were built and set up when he built the ladder and programs for this 15-MA like my 11M and 0M are.

    Greg

  9. #9
    Gold Member
    Join Date
    Jun 2008
    Posts
    1511
    Greg,
    Did he set it up via ladder or parameters? What is it that you would like to change or add? Can you post the code?

    Stevo

  10. #10
    Registered
    Join Date
    Mar 2005
    Posts
    816
    I think it is Parameters I need to call Brent anyhow so I will ask him.

  11. #11
    Gold Member
    Join Date
    Jun 2008
    Posts
    1511
    Quote Originally Posted by gbowne1 View Post
    I think it is Parameters I need to call Brent anyhow so I will ask him.
    This is a list of the parameters that will set the custom codes on the 15series.

    7050-7059 parameters calls programs 9010-9019 with a custom G-code
    7060-7069 parameters calls programs 9040-9049 with a custom G-code
    7071-7079 parameters calls programs 9001-9009 with a custom M-code
    7080-7089 parameters calls programs 9020-9029 with a custom M-code

    So as an example if you want to call program 9020 as your tool change macro with M6 then you have to set parameter 7080=6

    Stevo

  12. #12
    Registered
    Join Date
    Jan 2010
    Posts
    99
    in my experience, you never know...

    we have some machines with a macro tool change... from the factory (and ard copied in the manuals) which use m codes for each action of the toolchange (umbrella changer)

    some machines that needed a toolchange macro added to home the axis to the change position, but otherwise the m6 directly actuates the toolchange action sequence internally, without any NC code besides the m6


    some more modern fanuc's have other ways to "embedd" certain macros in the f-rom and you can't see them, but they are still NC driven, or at least home and orient with NC code and then internal drive the toolchange action by the ladder or macro executor via the m6

    also be aware o9001-09 toolchange macros handle the t# differently than o9020-29... o9020 toolchange will treat the t# passed in the same line as internal variable #20, while an o9001 macro (subprogram style) will allow the t# to be system-applied to variable #4120 before the macro is called, so you will have to handle this internally like:

    T#20

    to apply the system tool # before the machine's tool change action in most cases...


    - gwarble

  13. #13
    Registered
    Join Date
    Mar 2005
    Posts
    816
    I do not have very many custom G or M codes except a number of them use decimals in the code. I use pretty much all the standard G codes for machining centers.

    A long time before I learned that programming M6 was different in the T's from the M's, I thought you could do it the same on both types.

    I like playing with the spindle direction, coolant on/off, etc.

    Greg

  14. #14
    Registered
    Join Date
    Feb 2006
    Posts
    1770
    Yes. M06 is not needed for tool change on a lathe (somebody told me that on older control versions, it was needed). However, even on a lathe, you can define M06, to execute a tool-change macro (say, M06 T1234, which would call a macro with #20 set to 1234).

  15. #15
    Registered
    Join Date
    Aug 2009
    Posts
    682
    Quote Originally Posted by stevo1 View Post
    The macros in the 8000 and 9000 range can also be set so you do not see them running on the screen. So it could have been that some of the machines you were running did actually use a macro but you never noticed it because it was not visible.
    Stevo
    Hi all,

    Can Fanuc 31i be set to run this way? If so does the main program stay in the code window - or is a blank window displayed for the duration of the macro?

    DP

  16. #16
    Gold Member
    Join Date
    Jun 2008
    Posts
    1511
    I would ass u me so but I do not have a 31i manual to verify the parameters. On my 18i control I could not find such a parameter. It does list under locking of the programs that they are not displayed. I don’t know if that means displayed in memory or in operation.

    You will have to check your manual.

    Stevo

  17. #17
    Registered
    Join Date
    Aug 2009
    Posts
    682
    I'm pretty sure that I locked those programs and it made no difference during operation. Thought maybe there were other parameters involved on the display side of things...

    Cheers anyway,

    DP

  18. #18
    Registered
    Join Date
    Jan 2010
    Posts
    7
    Parameter 3202#6(PSR)=0 determines wether "protected" programs are displayed when running on control.

    ATB

    Alec

  19. #19
    Registered
    Join Date
    Aug 2009
    Posts
    682
    Thanks for that - the manual is misleading as it refers that bit to 'searching' for a program - not displaying.

    Was hoping the calling program would remain in the display - instead it comes up with a big fat 'PROTECTED PROGRAM' on a blank screen...not really what I was hoping for...

    Cheers,

    DP

    ps I used to work down the road AN Tools in Carlyon Road Ind. Est. How are work prospects in your neck of the woods?

  20. #20

    Re: Tool change Macro 9020?

    Hey gents, you all seem to be fairly knowledgeable on these tool change macros, I've accidentally deleted mine on my Fanuc oi-mf.
    Would any of you be able to assist in generating a new macro or where I could get one from?

    The T() command still turns the carousel to the correct tool, I just don't know the coding to actuate the arm etc.

    as far as I can tell I need
    Coolant off
    Spindle stop
    Z to ()
    Spindle orientation
    Arm actuate (not sure if this is timer driven but all arm movements are via a motor running in 1 direction)
    Pull stud pneumatic release
    Arm actuate (once again timer?)
    Pull stud grab
    Arm actuate
    End

    I'm happy to pay for your time if it results in my machine being operational again.

    Thanks

Page 1 of 2 12

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. Tool Change Macro Help Please
    By Ecmdrw5 in forum Fanuc
    Replies: 0
    Last Post: 04-08-2011, 12:46 PM
  4. Replies: 0
    Last Post: 02-14-2010, 07:26 PM
  5. Help for tool change macro on OM VMC
    By Namnp2007 in forum Fanuc
    Replies: 3
    Last Post: 08-12-2008, 05:18 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
  •