What's new
What's new

HD T, NX T and T question (Fanuc control)

Tichy

Aluminum
Joined
Jan 1, 2019
As lots of machines operate, I call the next tool as soon as the current is loaded so the magazine rotates.

This shows in the control as Current tool: x, next tool y.

Problem is that the "T" code that you read from variable #4120 will then be the next tool.

I want a safecheck to make sure no tool can be operated with wrong offset. (T1=H1 etc.)

Can I read the current tool from a variable?
 
As lots of machines operate, I call the next tool as soon as the current is loaded so the magazine rotates.

This shows in the control as Current tool: x, next tool y.

Problem is that the "T" code that you read from variable #4120 will then be the next tool.

I want a safecheck to make sure no tool can be operated with wrong offset. (T1=H1 etc.)

Can I read the current tool from a variable?
Hello Tichy,
As Kevin states, the MTB seldom make a System Variable available for the current Spindle Tool. However, you can keep an accurate account of the Spindle Tool by adding a small amount of code to an existing Tool Change Macro, or if a Tool Change Macro doesn't exist for the machine, create one.

The following system will only fail if a tool is manually loaded into the Spindle, or if a Tool Change is executed without specifying a Tool Number. It is possible to execute a tool change on many (not all) machines with just an M06 command. In this case the tool at the ready position, whatever that may be, will be swapped into the Spindle. Accordingly, for this system to work, the rule of not hand feeding a tool needs to be observed. However, if this does occur, the system will become synchronized at the next, correct syntax tool change. Precautions can be put in place within the Tool Change Macro to ensure a Tool Change is not made without specifying a Tool.

Typically, the code for Tool Change and pre-staging the Next Tool is something like the following:

M06 T04
T02(Pre-staged tool)
-------
-------
-------
-------
M06 T02
T06(Pre-staged tool)
etc.


Tool Change Macro example called with M06


O9020
IF [#20 EQ #0] GOTO900 (ERROR TRAP FOR OMITTED T CODE)
IF [#20 EQ #520] GOTO100 (SPECIFIED TOOL EQUALS SPINDLE TOOL)
--------
--------
Tool Change Code Specific to your Machine Goes Here
--------
--------
T#20 M06
--------
--------
N100
#520 = #20 [SAVE SPINDLE TOOL NUMBER IN NONVOLATILE VARIABLE]
M99
N900
#3000=1 (MISSING TOOL NUM - FIX]
%

You can now find the Spindle Tool Number by querying Macro Variable #520.

When selecting a #500 series Macro Variable to use, you must ensure that its not being used in any other program.

Regards,

Bill
 
Bill,

That's neat. Feeling like an idiot for not having thought of it myself. :)
 








 
Back
Top