What's new
What's new

Tool change M6 problem Fanuc OM

Dustydude

Plastic
Joined
Nov 19, 2022
All
I have a 90s fanuc om controlled mill tmv400 having recently upgraded from a desk top mill. I am no expert.
I am having trouble getting m6 to work.

If I mdi m6 t1 I get a carousel error

I have attached the error screen and the data about them from my manual.

My tool change is a robodrill type 10 Station

OK I can get round this by going
M16
G28 z0
G30 z0 lifts spindle to second ref
Then press my carousel button to the right station or
M6 t1

Then

G28 zo

So if in the G30 z0 position m6 works in terms of indexing to the correct position but it won't unload or load a tool.

I have also attached 9001 program that I think is something to do with tool change.

Any ideas or things to try appreciated. I'm pretty green.

Cheers
Dusty

1c53a55d727f116e44f99de29b6481c0.jpg
04a11b224344e73e987483cbe94f8419.jpg
f32f1c02baec7c1c18b55c45b1152e29.jpg
635052e6e42236247b3d47709be58d52.jpg
b9b328229a8189e39087994e63a5af55.jpg
 
If I mdi m6 t1 I get a carousel error
Have you tried executing a Tool Change from within a program? Program O9001 is a User Macro Program that will be called by an M Code, M06 in your case. Macro Programs can only be executed in specific cases via MDI and will usually result in an error when you do so. If you haven't already done so, execute a Tool Change from a short program before chasing this issue any further down a Rabbit Hole.

Regards,
Bill
 
Hi Bill,

No i was still finding my way round the controller so not tried in a program yet. Thanks I will try that.
 
No i was still finding my way round the controller so not tried in a program yet. Thanks I will try that.
Hello Dusty,
Further to my previous Post, take a look at the value registered in Parameter 0240. For Macro Subprogram O9001 to be called with M06 (or M6), the numeral "6" must be registered.

If program O9001 is called by M06 (M6), breaking the tool change sequence down, including the elements of the Tool Change in the Main Program, such as G30 etc., followed by M6, is still going to call the O9001 program. Therefore. nothing will be gained by doing so if program O9001 is being executed.

Via the Macro Subprogram, Common, Nonvolatile Variable #502 is storing the current Spindle Tool number, so that if the Spindle Tool Number is commanded, no action will be taken.

What you have Posted thus far doesn't show how Common, Nonvolatile Variable #500 is allocated a value. Look also at the value of parameter bit 40.5 and for the existance of a O9000 program. If this bit is "1", then Variable #500 may be being set in program O9000. If not, I can't see how program O9001 can work as it is.

Regards,

Bill
 
All
I have a 90s fanuc om controlled mill tmv400 having recently upgraded from a desk top mill. I am no expert.
I am having trouble getting m6 to work.

If I mdi m6 t1 I get a carousel error

I have attached the error screen and the data about them from my manual.

My tool change is a robodrill type 10 Station

OK I can get round this by going
M16
G28 z0
G30 z0 lifts spindle to second ref
Then press my carousel button to the right station or
M6 t1

Then

G28 zo

So if in the G30 z0 position m6 works in terms of indexing to the correct position but it won't unload or load a tool.

I have also attached 9001 program that I think is something to do with tool change.

Any ideas or things to try appreciated. I'm pretty green.

Cheers
Dusty

1c53a55d727f116e44f99de29b6481c0.jpg
04a11b224344e73e987483cbe94f8419.jpg
f32f1c02baec7c1c18b55c45b1152e29.jpg
635052e6e42236247b3d47709be58d52.jpg
b9b328229a8189e39087994e63a5af55.jpg
"If I mdi m6 t1 I get a carousel error"
try
T1 M6;
or
T1;
M6;
some machines picky want tool number before M6 or even want on 2 separate lines
.... also if tool in pocket 1 is T10000008 it might prefer T10000008;M6; instead of T1
just guessing, just things to try
 
Some machines with the drum style toolchanger do not use M6 for changing tools. Mori Seiki TV30 is an example. It would be best to read through your machine builder’s programming manual to learn how they expect the toolchanger to operate.
 
Bill 240 does have 6 allocated
Hello Dusty,
As Kevin suggests, machines that have either Caraselle, or Drum Type Tool Changer, or any system where the Tool can only be retrieved from and replaced to the same Tool Pot, don't need an M06 in the Tool Call command. However, because your machine has "6" registered in parameter 240, it does use M6 (M06) in the Tool Change. Also, as "6" is registered in parameter 240, program O9001 is going to be called for sure, and M6 is also present in this program. When an "M" code is executed in a program called by a G,M or T Code, it will be treated as a normal "M" and processed by the PMC; it won't call another iteration of the O9001 program.

While there is a "6" registered in parameter 240, using some of the elements used in the Macro Subprogram, such as G30 etc. in the Main Program, as in the following:

T1 G30 Z0
M6
isn't going to gain much, other than a bit more up and down movement of the Z axis and you would need to ensure the control is in G91 Mode, otherwise in G90 Mode, it may scare the crap out of you when the Spindle Rapids to Absolute Z Zero when you weren't expecting it. In program O9001, it does ensure that G91 Mode is selected.

T1 G30 Z0 will take the Z Axis to the Second Z Reference Return Position, then when M06 on the next line is executed, program O9001 will be called, wherein, a movement of the Z Axis back to the First Z Reference Return Position (G28 Z0), followed by another movement of the Z Axis back to the Second Z Reference Return Position (G30 Z0), if the Spindle Tool is other than the T1 as in this example.

So, its confirmed by "6" being registered in parameter 240, that your machine does use M6 in the Tool Change, but for me, the question remains, how is the Tool Number specified in the Tool Change Command, being allocated to Variable #500, because as it is, program O9001 makes no reference, other than Variable #500, to a Tool Number being called. Therefore, check for the existence of Program O9000 and if parameter bit 40.5 is set to "1". This will also confirm whether the Tool Call command needs to have the T address specified before the M6. My bet is that it does, as the "T" number can't be passed to your O9001 Tool Change Macro Subprogram as an argument. The reason for this, is that the Tool Change Macro Subprogram is written using User Macro System "A".

Regards,

Bill
 
Last edited:
I am working on the idea that possibly the 9001 and registration of 6 in parameter 240, may not be the builder’s doing, but that of a prior user. Thus my advice to consult the machine builder’s programming manual.

My Mori Seiki uses discrete commands to move to the toolchange position and then a T command to rotate the drum to the new tool. Discrete commands then move back to the G28 Z0. The official Mori toolchange commands are instructed to be…..

G91 G28 Z0
M138 (disables soft overtravel protection)
G0 Z4.
Tx (rotates drum to commanded tool)
G28Z0
M139 (enables soft overtravel limits)
continuation of part processing.

I added a 9001 macro program and have registered 6 so that now the machine programs more similarly to other machining centers with a TxM6 command to change tools. This macro also eliminates the “false toolchange” moves that would occur if the program commanded the tool already in the spindle using the Mori recommended method. It also allows easy MDI entry of a toolchange. Using Mori’s method in MDI required keying in all the above mentioned commands rather than the much more simple TxM6 as I can now do.

If someone were to try to use my machine and have looked at existing programs compared to the programming manual instructions there would be some confusion for an inexperienced user.
 
I am working on the idea that possibly the 9001 and registration of 6 in parameter 240, may not be the builder’s doing, but that of a prior user.
Hello Kevin,
That may be the case, as the OP's O9001 Program, using #500 to hold the data of the required Tool to be Tool Changed to the spindle, would not work as it is, on its own. If a Macro Subprogram called by a "T" Code (O9000), is being used to allocate the Tool Number to #500, I can't imagine the factory being so inept to do that, when the whole Tool Change could easily be carried out by either a Macro Subprogram called by a "T" Code (program O9000), or by "M6" (program O9001).

As program O9001 is a Subprogram, not a Macro Program, how are you identifying the Tool Number of the required tool in O9001? Are you simply doing something like the following:

T#4120 M06

Regards,

Bill
 
…….
As program O9001 is a Subprogram, not a Macro Program, how are you identifying the Tool Number of the required tool in O9001? Are you simply doing something like the following:

T#4120 M06

Regards,

Bill
I mis-stated in my previous post, the format is M6 Tx. Then in my toolchange macro I just state T#20. On Mitsu controls, there are choices for M-code macro calls. I have mine set to G65 type call so the variable for T is passed.
 
Last edited:
Yes,
6001#5 needed to set to 1
With the Op's Control it would be parameter bit 40.5, but you would normally only use a "T" Code to call the Tool Change for machines that can't pre-stage the tool, cuch as a machine with a Carousal Type Tool Magazine. In this case, no M06 need be specified in the Main Program, but for most machines, the M06 would still be executed in the Tool Change Program as a normal "M" Code.

The OP's machine as it is now, will call Program O9001 with M6 (M06); that has been confirmed by the registration of "6" in the parameter 240, that is associated with program O9001. The issue is, program O9001, as it is and by itself, can't execute a Tool Change successfully, as there is nothing in that program that will allocate a Tool Number to Common Variable #500. The only way I can see to allocate a Tool Number to #500, in a not so clumsy manner, would be to have Program O9000 called with a "T" code, prior to M6 being executed. The content of O9000 could be something like the following:

O9000
G65 H01 P#500 Q#149
M99

There is no reason why Program O9001 couldn't have the following included:

G65 H01 P#500 Q#4120
or simply
T#4120 M06

Regards,

Bill




.
 
Last edited:
Even if a machine can pre-stage a tool, this function is disabled in the main program if the T code is used to call a subprogram.
For example, if tool 2 is needed, the main program will have T2, and the subprogram (O9000) will have T#149 M06.
On a lathe, the main program will have T0202 and the subprogram will have T#149
 
Even if a machine can pre-stage a tool, this function is disabled in the main program if the T code is used to call a subprogram.
For example, if tool 2 is needed, the main program will have T2, and the subprogram (O9000) will have T#149 M06.
On a lathe, the main program will have T0202 and the subprogram will have T#149
Yes, I understand that and it would be rather illogical to have a Tool Change Program called with a "T:" code on a machine that is able to pre-stage the the next tool. Its good programing practice to include the Tool that was pre-staged in the actual Tool Change call. For example:


M6 T01 (where T01 was pre-staged)
T02 (Next Tool Pre-staged)
---------------
---------------
---------------
---------------
G91 G28 Z0.0 M09
G28 X0.0 Y0.0 M05
M01
(NEXT TOOL)
N2 G91 G28 Z0.0 M09
G28 X0.0 Y0.0 M05
M6 T02 (where T02 was pre-staged)
T03 (Next Tool Pre-staged)
---------------
---------------
---------------
---------------
G91 G28 Z0.0 M09
G28 X0.0 Y0.0 M05
M01

The above is reasonably typical of a machine that can pre-stage the Next Tool. Using a "T" Code to call a program in the above syntax would be rather messy.

The only logical time to use a Tool Change Program called with a "T" Code is where the Next Tool can't be pre-staged. In this case, the Main Program only needs to have a "T" Code and no M6 is required; I have clients, who prefer to have only a "T" code and no M6 to execute a Tool Change. In the majority of cases, M6 is still required in the Tool Change Program, where it is treated as a normal "M" Code.

But getting back to the OP's issue and the O9001 program he has. His machine can't pre-stage the Next Tool and his O9001 program can't, by itself, successfully execute a Tool Change. With the limited information the OP has supplied, there seems only one logical method to allocate a Tool Number to #500 for use in program O9001 and that is to call program O9000 with a "T" Code. To call two programs when one would have been more than adequate, is illogical in itself.

Regards,

Bill
 
@ Dusty
Late to the party again...sorry if this is a redundant suggestion.

Do you know if your machine needs a tool assignment program before using a tool changer? The old FNC Makinos we had required a tool assignment program to be run once to assign tool numbers to pockets so it knows what's where, otherwise it was lost. These were really old machines and had 0m, 11m and 6m controls and the tool assignment programs were not interchangeable. Also, when running the program you could tell it what you wanted to use for T numbers, not simply T1 to T30, you could assign 3-digit numbers as well. I wish I had my notes with me, I'd post them for you. If you need a program let us know.

It might look something like this and I'm not sure if M57 is code for 0m or 11m/6m but you get the idea. I also recall one of the tool programs having two addresses on each line but I cannot recall it at the moment.
O7000;
M57;
T1;
T2;
T3;
T4;
Etc...
M30;

Also, and this may be for Pre-0m controls and you probably don't need to do this but...those older Makinos also needed to have the tool in the spindle specified in the beginning of the program after hitting an M30.
 
The OP's machine has a 10 tool magazine mounted just forward of the face of the Spindle Housing. Tools can only be returned to the same Pot from which they were retrieved; no pre-staging of the Next Tool is possible. There are only two parameters relating to the tool numbers and they are, one for the total number of tools and one for the current Spindle Tool. When there are 10 tools loaded in the machine, one tool will always be in the spindle, with the empty Tool Change Gripper positioned just in front of the face of Spindle Housing and at the Z Reference Return position. The only way the Spindle can be empty is by removing a tool from the magazine and then calling the Tool Number of the empty pocket.

Without further information from the OP, we may never know what the issue is.

Regards,

Bill
 








 
Back
Top