What's new
What's new

Tool change M6 problem Fanuc OM

sinha

Stainless
Joined
Sep 25, 2010
Location
india
If
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
If tool 1, for example, is already pre-staged, we just need M06 to have it in the spindle; M06 T01 not needed, I think.
 

dandrummerman21

Stainless
Joined
Feb 5, 2008
Location
MI, USA
There's no tool to pre-stage, I googled and see that the machine has a robodrill-like turret.

Also, in your example, it would not be needed, correct, but that would be TERRIBLE practice. The smart thing to do would be to include the tool you want to change to again. Such as:


T1
M6
T2
<BLAH BLAH MACHINING>
T2
M6
T3
....



As for the OP's problem:

Either that tool change program is straight wrong, or there needs to be another program that populates the #500 variables, as Bill mentioned.

The OP has a book with the alarms. Does the book not show what the tool change macro should be?

Is Kevin right in suggesting that the tool change macro might be user-written? Did someone take a tool change program from another machine and put it this one?


Hell, I wonder if you disabled the M6 call to program 9001 and just called T1M6 with no macro, would it work?
 
Last edited:

angelw

Diamond
Joined
Sep 10, 2010
Location
Victoria Australia
If tool 1, for example, is already pre-staged, we just need M06 to have it in the spindle; M06 T01 not needed, I think.
But what you're saying is poor programming practice for a number of reasons; one is simply ease of reading and following the program; go to the start of any Tool Operation in the program without reading the Start of the preceding Tool Operation and you can't read what Tool is being used in that particular part of the program. Yes, I know that the Tool Length Offset Number should tell you that, but if the poor practice of not including the current, required tool in the Tool Change Call, has been used, who's to say the programmer hasn't followed good programming practice and paired the Offset Number with the Tool Number?

Another reason, and more importantly, if one had to break into the sequence of the program and repeat a Tool Operation for example, the correct tool for the Operation may not be the Tool that is currently pre-staged. Your method would result in the wrong tool in the Spindle and the potential disastrous situation that it brings with it. Its a safety aspect, to try and fool proof the programs against the talented fools that walk among us.

Regards,

Bill
 
Last edited:

angelw

Diamond
Joined
Sep 10, 2010
Location
Victoria Australia
Either that tool change program is straight wrong, or there needs to be another program that populates the #500 variables,
Hello Dan,
It would be interesting to get from the OP, the value that is currently stored in #500. If there is no other program populating #500 and it's vacant, that would explain the Carousal Error Alarm. But it has been a few days since we've heard from the OP, so we may never know.

Regards,

Bill
 

sinha

Stainless
Joined
Sep 25, 2010
Location
india
But what you're saying is poor programming practice for a number of reasons; one is simply ease of reading and following the program; go to the start of any Tool Operation in the program without reading the Start of the preceding Tool Operation and you can't read what Tool is being used in that particular part of the program. Yes, I know that the Tool Length Offset Number should tell you that, but if the poor practice of not including the current, required tool in the Tool Change Call, has been used, who's to say the programmer hasn't followed good programming practice and paired the Offset Number with the Tool Number?

Another reason, and more importantly, if one had to break into the sequence of the program and repeat a Tool Operation for example, the correct tool for the Operation may not be the Tool that is currently pre-staged. Your method would result in the wrong tool in the Spindle and the potential disastrous situation that it brings with it. Its a safety aspect, to try and fool proof the programs against the talented fools that walk among us.

Regards,

Bill
I agree. The tool call should be complete, as a good programming practice.

Should it be T1 M06 or M06 T1 on a machine which can pre-stage the tool?
 

angelw

Diamond
Joined
Sep 10, 2010
Location
Victoria Australia
Should it be T1 M06 or M06 T1 on a machine which can pre-stage the tool?
It depends on a few things. Is the machine using a Tool Change Macro, or a Tool Change Subprogram? If a Macro Program, then the M06 should come before the "T" Code. If a Subprogram, the "T" Code should precede the M06. If the Tool Change is handled completely by the PMC, generally the "T" Code would be specified first.

Regards,

Bill
 

sinha

Stainless
Joined
Sep 25, 2010
Location
india
Once a tool is pre-staged, only M06 is needed for mounting it in the spindle. In such a case, macro call using M06 is not needed.
 

angelw

Diamond
Joined
Sep 10, 2010
Location
Victoria Australia
Once a tool is pre-staged, only M06 is needed for mounting it in the spindle. In such a case, macro call using M06 is not needed.
You can't give that as a blanket answer, there are many reasons why a Tool Change Macro may be needed. There are many instances where the MTB has implemented the Tool Change sequence as being a combination of PMC and Macro program interaction.

Regards,

Bill
 

sinha

Stainless
Joined
Sep 25, 2010
Location
india
Passing on H data can be an example, though it is not difficult to use G43 in the main program.
 

Dustydude

Plastic
Joined
Nov 19, 2022
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
Hi All,
Sorry to not get back to you all. You have to gear with me as I'm green and alot of what say may go over my head.
Had a friend round this evening and he was looking at the existing programmes stored on the machine.
They all call up a g65 before m6 as shown below.
We created a new program like this and it worked.
Nevertheless I expect this is still a work around and I am not sure how I would get that into the post in fusion.
Thanks
Dusty
 

Attachments

  • IMG_20221123_190227_edit_138535564659589.jpg
    IMG_20221123_190227_edit_138535564659589.jpg
    1,020.9 KB · Views: 3
  • IMG_20221123_194731.jpg
    IMG_20221123_194731.jpg
    216.1 KB · Views: 3

dandrummerman21

Stainless
Joined
Feb 5, 2008
Location
MI, USA
Does the book you have for the machine mention how to change tools? Program examples, etc? I have a hard time believing that was how a tool change was originally intended to be programmed.

I'm pretty sure that we can come up with a new tool change macro that will make the machine work more "normally", ie T1M6 instead of that.

As for a quick "workaround" to leave the machine as-is: if you do a ctrl+h (find and replace in many text editors) and change all "T" in your program with "G65H1P#500Q"

So if your code was:

T9
M6

it would be

G65H1P#500Q9
M6
 

angelw

Diamond
Joined
Sep 10, 2010
Location
Victoria Australia
Hi All,
Sorry to not get back to you all. You have to gear with me as I'm green and alot of what say may go over my head.
Had a friend round this evening and he was looking at the existing programmes stored on the machine.
They all call up a g65 before m6 as shown below.
We created a new program like this and it worked.
Nevertheless I expect this is still a work around and I am not sure how I would get that into the post in fusion.
Thanks
Dusty
Hello Dusty,
It will most likely be as Kevin suggested and the O9001 Macro Subprogram is user written and added, surely, no MTB would be so inept to consider that a reasonable method of carrying out a Tool Change.

H1 is the allocation function of User Macro when specified after G65. In the pictures you Posted, #500 is being allocated the value of the Tool number "2".

I would still take a look at the setting of parameter bit 40.5. If its set to Zero, what occurs with your machine when you execute a "T" command, as in T2 for example? For your type of Tool Changer, I would expect nothing visible to occur, but in so doing, System Variable #4120 will take on the value of the "T" code specified, "2" for example, when T2 is executed. In the O9001 program, the following line can be added at the start of the program:

G65 H01 P#500 Q#4120
or simply change the existing line of T#500 to the following
T#4120 M06

The better method would be to change parameter bit 40.5 to "1" and register the following under the program number O9000:

G65 H01 P#500 Q#149
M99

Then your O9001 program would work with #500 having the value of the current specified Tool Number. A bit of error trapping should be added to both programs to ensure that the Tool Number specified is within the range of 1 through 10.


Regards,

Bill
 

Dustydude

Plastic
Joined
Nov 19, 2022
Hi,
No program examples apart from how to mdi a manual tool change which calls for
M19
G30 z0
You can then press a button to rotate the carousel or mdi in m6 t#
Then g28 z0 to load the tool.
 

Dustydude

Plastic
Joined
Nov 19, 2022
Hello Dusty,
It will most likely be as Kevin suggested and the O9001 Macro Subprogram is user written and added, surely, no MTB would be so inept to consider that a reasonable method of carrying out a Tool Change.

H1 is the allocation function of User Macro when specified after G65. In the pictures you Posted, #500 is being allocated the value of the Tool number "2".

I would still take a look at the setting of parameter bit 40.5. If its set to Zero, what occurs with your machine when you execute a "T" command, as in T2 for example? For your type of Tool Changer, I would expect nothing visible to occur, but in so doing, System Variable #4120 will take on the value of the "T" code specified, "2" for example, when T2 is executed. In the O9001 program, the following line can be added at the start of the program:

G65 H01 P#500 Q#4120
or simply change the existing line of T#500 to the following
T#4120 M06

The better method would be to change parameter bit 40.5 to "1" and register the following under the program number O9000:

G65 H01 P#500 Q#149
M99

Then your O9001 program would work with #500 having the value of the current specified Tool Number. A bit of error trapping should be added to both programs to ensure that the Tool Number specified is within the range of 1 through 10.


Regards,

Bill
Hi Bill
I will work out how to look at the setting of parameter bit 40.5 and get back to you.
Thanks
 

angelw

Diamond
Joined
Sep 10, 2010
Location
Victoria Australia
I will work out how to look at the setting of parameter bit 40.5 and get back to you.
Hello Dusty,
Its the same way you looked up the number registered in parameter 240 for calling program O9001 with M06. The difference is that parameter 40 will be in bit form. You will be looking for the value of bit 5, which is the 6th bit counting from the right. The Right most bit is bit Zero.

Regards,

Bill
 

Dustydude

Plastic
Joined
Nov 19, 2022
Also here is the ladder for the person who asked
 

Attachments

  • IMG_20221124_211545.jpg
    IMG_20221124_211545.jpg
    377.7 KB · Views: 3

angelw

Diamond
Joined
Sep 10, 2010
Location
Victoria Australia
And a T command does nothing on mdi
Hello Dusty,
Try just a "T" Code in a program in Memory (Auto Mode). I have a client with an Argo that has a similar tool change system as your machine and a "T" Code does nothing when executed in MDI. It uses a Tool Change Macro that is definitely factory provided.

I'm with Kevin, in that I don't believe the Macro is factory. If you wanted to continue with the O9001 program, I would set
parameter bit 40.5 to "1" and register the following under the program number O9000:

O9000
G65 H01 P#100 Q#149
M99

In the O9001 program, change all references of #500 to #100. The reason for this, is that #500 will retain the last value it was allocated, even when power to the control is cycled. If you were to inadvertently leave out the:

G65 H01 P#500 Q_ _
where Q_ _ is the Tool Number

in your Main Program and then execute O9001 via executing M06, no tool change would occur, because #501 would be equal to #500 and you may end up with the wrong tool in the spindle for the program at that point. By using #100, when the power to the control is cycled, #100 will be set to vacant and therefore, #501 won't equal #100. Then, when the T#100 M06 Block in O9001 is executed, I believe the same tool change alarm you're getting now will be raised. That is a far better scenario than having the wrong tool in the spindle for the part of the program that is running.

Your current O9001 program could be improved by including error trapping for no tool number being specified and to check that for the tool number specified being with the range of 1 through 10.

In your Main Program, you would call the tool to be changed as follows:
T_ _
M06
or
T_ _ M06
where _ _ is the Tool Number.

Regards,

Bill
 








 
Top