585,575 active members*
3,839 visitors online*
Register for free
Login
Page 1 of 3 123
Results 1 to 20 of 51
  1. #1
    Join Date
    Apr 2004
    Posts
    353

    Fanuc OM, lost tool change macro

    I aquired a used VMC with 21 tool drum ATC. The toolchanger works fine mechanically as I can jog it in all ways that it should. However with a M06 command I get nothing. So I have learned that it is looking for a macro program, in this case it seems to be O9000. I've read on here about some of the M-codes that will activate different functions of a toolchange sequence but can only get M19 to work in MDI or in O9000 program.

    Do I require a fully written macro program to have all the different M codes to work properly? I do not have the proper operating manuals from the MTB for the mill so I am a little lost. I have found some macro examples on here and will be trying then out soon to see if I can get any results. But I am mainly curious as to why I can only get a response from M19 currently and nothing else.

    Machine is a Cincinnati Sabre 750

    Thanks for any input

  2. #2
    Join Date
    Feb 2006
    Posts
    338
    Well first check parameter 6080 thru 6089 Those specify what M code calls O9020 thru O9029 If one of those is not set to 6 then it is not expecting a macro.

    Also if there is one, change it back to 0 and it will no longer need a macro, but you will have to program what would be in the macro in your normal program instead.

    Somewhere here I posted some sample tool change macros. Probably more than you want, but I think there are some other samples if you search.

  3. #3
    Join Date
    Jun 2008
    Posts
    1511
    For the O series you also need to check more parameters then that.

    230-239 calls programs 9020-9029
    240-242 calls programs 9001-9003
    40.5 calls program 9000 when a T() is specified

    Check all these parameters. If any of the first 2 sets are =6 then it is calling a macro in accordance with the specific parameter related to the program. If none are set to 6 then look at parameter 40 bit 5 to see if it is set to 1 or 0.

    Now as for programming that is needed from a macro it is very basic but can written to use more complex features. If your tool change was written into the ladder and no macro is needed then you can simply program a
    G91G28Z0
    T()M6
    But it may also depend on the MTB if they want the T() in a line before the M6. I write macros even if the tool change is programmed in the ladder. So if you find that you want to use a macro or your parameters above are set to use a specific program then I would start real basic with the code and you can add from there if you need to or want to.

    So as an example if parameter 240=6 then program 9001 will be called every time an M6 is programmed. So now create program 9001 in your machine memory and start real basic with the code.

    O9001(TOOL CHANGE MACRO)
    G40G80—(tool dia cancel & canned cycle cancel)
    G91G28Z0M9—(tool change position in Z & coolant off)
    M19--(tool orientation)
    G28Y0—(tool change position in Y)
    M6—(tool call of modal T value)
    M99

    Stevo

  4. #4
    Join Date
    Sep 2010
    Posts
    1230
    Further to Steve's advice, if your machine has both G28 and G30 (most machining centers do) you should check which is used to obtain the Z tool change position.

    To check this do as follows:
    1. Place a tool holder in the tool gripper of the tool change arm.
    2. Using a height gauge, or what ever you have available, measure from the machine table to the underside of the tool change flange of the tool holder.
    3. Place the same tool in the spindle and make the same measurement after executing G91 G28 Z0.0 and then after executing G91 G30 Z0.0
    4. Compare the results of point 3 with that of point 2
    5. The compared values have to be very close to being the same so that the tool change arm can engage the spindle tool safely and without causing damage. If both are incorrect, I'd suggest using G30 in your Macro program and adjust the G30 position with its corresponding parameter.

    Regards,

    Bill

  5. #5
    Join Date
    Apr 2004
    Posts
    353
    Thanks for the info Steve.

    So I've tried what you suggested and here's where I stand:

    P40 B5 was set to 1, and P230-242 were all 0's

    So from what you've mentioned, my TC macro will be program O9000. Which the machine is pulling up once I enter a T#M06 command.

    I've entered your program you gave me into my O9000 program and it stops at the M6 line with Alarm 1054: Program Err T Without M06

    Any idea how to get around this? I've tried entering a T3 after the M06 and in O9000 as a test and I received the same alarm. I've been fighting with this thing for two weeks now with no luck.

    Thanks for the advice so far!

  6. #6
    Join Date
    Feb 2006
    Posts
    338
    Personally (and what I am used to) I would change 40.5=0 and 240=6 then change the macro back to O9001 as posted. Usage would then be T# M6 or possibly you will have to split them into 2 lines.

    If you want to leave the parameters as they are, your normal program will not include any M6 commands, just the T# and that alone fires off the macro which includes the M6 but I am not that familiar with usage that way.

  7. #7
    Join Date
    Apr 2004
    Posts
    353
    I set my 40.5=0, and 240=6

    Now when I program (or MDI) T#M06 or T#;M06 the machine alarms out even before it pulls up the macro program. Giving me the same alarm, T# without M06?

  8. #8
    Join Date
    Sep 2010
    Posts
    1230
    Quote Originally Posted by laka View Post
    Thanks for the info Steve.

    So I've tried what you suggested and here's where I stand:

    P40 B5 was set to 1, and P230-242 were all 0's

    So from what you've mentioned, my TC macro will be program O9000. Which the machine is pulling up once I enter a T#M06 command.

    I've entered your program you gave me into my O9000 program and it stops at the M6 line with Alarm 1054: Program Err T Without M06

    Any idea how to get around this? I've tried entering a T3 after the M06 and in O9000 as a test and I received the same alarm. I've been fighting with this thing for two weeks now with no luck.

    Thanks for the advice so far!
    As a test, set #40.5 to 0 then either via a short program or MDI launch the following.

    G91 G28 Z0.0
    M19
    T1
    M06

    If the tool change occurs, drop the M19 and try again. If that still works, combine the T1 and M06 on one line to see if that still works.

    In your original post, you stated that you get nothing when M06 is executed. I first thought that your tool change program must have been called by M6(M06), and that it was calling an empty program. But as you have determined that 6 is not included in any of the Macro Call parameters, M06 should be treated as a normal M function by the control. As you get no response from executing M06, look for other conditions that may inhibit the tool change. Check that the Z axis is in the correct position as suggested in Post #4. There may also be a proximity switch to check the in position of the Z axis for tool change. I attended a service call recently regarding such a limit switch. The switch was faulty, and therefore the correct state was not being seen by the PLC, but no error message was being generated.

    Most machines with drum type tool magazines allow for preselection of the next tool in the program. For this to happen, and with #40.5 set to 1, I would think that M6 would have to be programmed first, otherwise, as soon as the T was read to preselect the next tool, program 9000 would be launched. But the order of T(number) and M06, as Steve mentioned, can be dependent on the MTB

    A typical example of the program format to preselect a tool is as follows:
    (FIRST TOOL)
    T1 M6
    T2
    -------
    -------
    -------
    -------
    -------
    -------
    (NEXT TOOL)
    T2 M6
    T3
    and so on

  9. #9
    Join Date
    Sep 2010
    Posts
    1230
    Quote Originally Posted by laka View Post
    I set my 40.5=0, and 240=6

    Now when I program (or MDI) T#M06 or T#;M06 the machine alarms out even before it pulls up the macro program. Giving me the same alarm, T# without M06?
    Following on from my last post, and I apologize to dpuch, I was still typing when you made your post, 1054: Program Err T Without M06 is a MTB's error. If you have a viewable ladder program on you machine, or if not and you have a hard copy of same, you may have to trace trough to see what conditions have to be met for a successful tool change and what conditions make the rung for the error you're getting, test true.

    Regards,

    Bill

  10. #10
    Join Date
    Apr 2004
    Posts
    353
    With 40.5 set to 0 and no other Macro parameters set to 6 I still receive the alarm "T without M06" no matter how I enter the code (T#M06, M06T#, T#;M06, etc)

    The machine does have a viewable ladder, but I may as well be reading japanese since I am totally lost when I go to that screen

  11. #11
    Join Date
    Sep 2010
    Posts
    1230
    Quote Originally Posted by laka View Post
    With 40.5 set to 0 and no other Macro parameters set to 6 I still receive the alarm "T without M06" no matter how I enter the code (T#M06, M06T#, T#;M06, etc)

    The machine does have a viewable ladder, but I may as well be reading japanese since I am totally lost when I go to that screen
    What happens now if only M06 is executed with all the associated parameters set to 0? Before you try this, make sure that the spindle is at the correct height for a tool change to occur. I have worked on many machines that sit and do nothing, and without an alarm message, until the Z axis is in the correct position. If you get no response, and in view of the missing M06 error that you have been getting, it would seem that an M finish signal is not being processed.

    Post back the result of executing M06 only. If launching via MDI, make sure you include an EOB in the command before pressing cycle start.

    Regards,

    Bill

  12. #12
    Join Date
    Apr 2004
    Posts
    353
    With all parameters at 0, If I enter simply M06 in MDI, I receive a "M06 without T" error. If I enter T#M06, I receive "059 P/S Alarm"

    If I enter M06 in a program and run, it quickly flashes alarm and then finishes the program.

    The above scenarios happen regardless of where my Z is positioned.

    However, I cannot manually jog the tool drum to the spindle unless my Z is at G28 position.

  13. #13
    Join Date
    Sep 2010
    Posts
    1230
    Quote Originally Posted by laka View Post
    With all parameters at 0, If I enter simply M06 in MDI, I receive a "M06 without T" error. If I enter T#M06, I receive "059 P/S Alarm"

    If I enter M06 in a program and run, it quickly flashes alarm and then finishes the program.

    The above scenarios happen regardless of where my Z is positioned.

    However, I cannot manually jog the tool drum to the spindle unless my Z is at G28 position.
    Laka,
    When you say you can't jog the tool drum to the spindle, is the tool magazine one that is mounted on the side of the machine with its axis in the horizontal plane, or one that is mounted beside the spindle with the tools pointing down towards the table?

    Regards,

    Bill

  14. #14
    Join Date
    Apr 2004
    Posts
    353
    It is the latter type, where the entire tool drum full of tools moves to the spindle for a tool change. Tools cannot be pre-called and they always return to the pocket they came from.

  15. #15
    Join Date
    Sep 2010
    Posts
    1230
    Quote Originally Posted by laka View Post
    It is the latter type, where the entire tool drum full of tools moves to the spindle for a tool change. Tools cannot be pre-called and they always return to the pocket they came from.
    Laka,
    Confusion on my part. My service colleagues and I refer to that as a carousel type and the side mounted magazine a drum type.

    Do you know if the carousel drops down, or the spindle goes to a higher position to clear the tool from the spindle? As you have not been able to do a tool change, you may have to look at the mechanical construction of the tool change mechanism to answer that.

    If the spindle is raised, you will have to find out if that function is carried out by the PMC program or by your tool change macro. Most machines I've seen that lift the spindle to clear the tool, do so by executing G91 G30 Z0.0 with the G30 position set to clear the tool holder and pull stud, while those that lower the carousel do so via the PLC program, normally just driveing it down to a stop using a pneumatic cylinder. You need to get this information for when you get past the M06 issue, as it will determine what has to go in your tool change Macro program.

    You need to determine what the tool change sequence is, and how much is carried out by the PLC program and how much by NC code. Reinstate your parameters as they were, and I'm afraid that you will probably have to become acquainted with Ladder Logic. Its not all that hard once you make a start and identify the changing state of switches in the ladder. But it will surely tell you whats going on with your machine; it just takes a bit of patience.

    The 59 p/s alarm you referred to in one of your previous post relates to the searching of a program. Not quite sure why that should occur if all reference to program numbers called by M and T codes have been removed.

    Regards,

    Bill

  16. #16
    Join Date
    Sep 2010
    Posts
    1230
    Quote Originally Posted by laka View Post
    It is the latter type, where the entire tool drum full of tools moves to the spindle for a tool change. Tools cannot be pre-called and they always return to the pocket they came from.
    Hi Laka,
    I've gone back over notes from jobs long ago dealing with a machine with a carousel magazine tool changer and a lost tool change Macro.

    It greatly depends on the MTB, and how much work is done by the PLC, but Macro programs for that type of tool change system can be quite complex. A copy of the one in my notes contains approximately 60 blocks and there is no padding, its a very efficient Macro. Unfortunately, I don't have a digital copy now and the hard copy is almost illegible. However, I will check on some of my older PC's to see if I can find a digital copy.

    There is a sequence of events that have to be communicated between the PLC and the Macro program. For example, that the tool changer has advanced to the spindle and is in position ready for the Z axis to raise. The PLC is made aware by proximity switches changing state, but the Macro program has to be held up until this event also. In the case of this Macro, it was achieved by reading the state of the system variables relating to the Interface Input Signals. But, all of this is very dependent on how the MTB went about their business.

    There are also cases where special M functions are used in the Macro that are significant to the PLC. In this Macro, it uses a different M code other than M06 to initiate the tool change sequence in the PLC. It may be something like this that's giving you the missing M06 error message.

    My advice would be to contact the machine builder, supplying all details of the machine, including the serial number, and see if you can get a copy of the Tool Change Macro. If its anything like the machine I've been referring to here, you will need the Macro program to make sense of the PLC program and the PLC program to make sense of the Macro.

    Stevo Its amazing, but we were only talking about this issue and program backup a few days ago.

    Regards,

    Bill

  17. #17
    Join Date
    Jun 2008
    Posts
    1511
    It could be that the M6 in the tool change macro needs to have a T() value. #20 should be your modal T when you program a T()M6. So in your macro program try by putting a T#20 in with the M6 line.

    O9001(TOOL CHANGE MACRO)
    G40G80
    G91G28Z0M9
    M19
    G28Y0
    T#20M6
    M99

    PS059 alarm will occur when you are trying to call a program that is not in memory. IOW if you set parameter 240=6 it is going to try and call program 9001 and if that program is not in memory you will get the alarm. You will also get the alarm if parameter 40.5 is set to call program 9000 with the T() and program 9000 is not in memory.

    EDIT:
    Sorry guys I missed the second page of this thread. A lot of action since last night when I first posted.

    Bill…yes we were just talking about that. Backup, Backup, Backup. It’s the first thing I do when I put power to a machine for the first time. Along with making sure I have some kind of backup from the seller. Even then I have been burned, more so by programming. At my last place I was writing some extensive macros for a new product line we were about to launch. I had spent about 2 months on the programming using an offline machine that no one runs. Even though I did have the majority of what I was working on backed up I spent the last 2weeks or so doing all the fine tuning proveout and edits right at the machine. Well one night on the offshift my maintenance department had the same machine go down at the other plant and in order to troubleshoot it they came and stripped some boards out of it to try. Needless to say I lost the last 2weeks of work. My general manager was laughing at me because he knows how anal I am about backing up the machines in the plant and he could not believe that I didn’t have the most up to date one. I am sure his attitude would have been a bit different if I was not ahead of schedule on the project.

    Steve

  18. #18
    Join Date
    Apr 2004
    Posts
    353
    Wow, lots of info here for me to work with! I may have a lead on getting a set of parameters and macro programs from the same machine, I will play with it some more and keep you posted. Thanks for all the help thus far!

  19. #19
    Join Date
    Jun 2008
    Posts
    1511
    Your welcome and please do keep us posted. I am very curious on this one. Keep in mind what bill said about things being MTB specific as you may get a program from a similar machine but it may not work. IOW don’t just go throwing all the parameters you get in to your machine.

    Stevo

  20. #20
    Join Date
    Apr 2004
    Posts
    353
    Donor machine is same make/control just a couple years difference. I will backup all my parameters and go thru the donors and compare.

    I've been fighting with this one for two weeks and would love to see the T/C work finally

Page 1 of 3 123

Similar Threads

  1. Sample Fanuc Tool change macro
    By dpuch in forum G-Code Programing
    Replies: 22
    Last Post: 06-19-2023, 11:49 PM
  2. Replies: 19
    Last Post: 11-07-2019, 08:16 PM
  3. Replies: 3
    Last Post: 03-20-2017, 01:21 PM
  4. EDIT O9000 tool change macro fanuc 0M
    By mikul in forum Fanuc
    Replies: 3
    Last Post: 11-27-2012, 08:48 PM
  5. Replies: 6
    Last Post: 09-16-2011, 01:33 AM

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
  •