Tool in spindle memory
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23377
- Thank you received: 4966
19 Apr 2023 23:21 #269457
by andypugh
Replied by andypugh on topic Tool in spindle memory
I decided to look into this, and to an extent LinuxCNC already does this, but only if you have a random toolchanger.
github.com/LinuxCNC/linuxcnc/blob/master...sk/ioControl.cc#L780
It doesn't look like iocontrol is responsible for updating the #5400 parameter, though.
However, if you add #5400 to the .var file then it does get saved. It is just that LinuxCNC then sets it back to zero on startup.
So, it might not take that much to make it work.
github.com/LinuxCNC/linuxcnc/blob/master...sk/ioControl.cc#L780
It doesn't look like iocontrol is responsible for updating the #5400 parameter, though.
However, if you add #5400 to the .var file then it does get saved. It is just that LinuxCNC then sets it back to zero on startup.
So, it might not take that much to make it work.
Please Log in or Create an account to join the conversation.
- Pro_El
-
- Offline
- Premium Member
-
Less
More
- Posts: 93
- Thank you received: 3
21 Jul 2024 07:51 #305756
by Pro_El
Replied by Pro_El on topic Tool in spindle memory
Are there any news for implementing spindle tool memory? I implement no random toolchanger, just need to remember the tool after restart
RANDOM_POSITION_TOOLCHANGER = 1
this remember tool but put it randomly in pocket, can someone think option to connect pocket and tools to be same number...
RANDOM_POSITION_TOOLCHANGER = 1
this remember tool but put it randomly in pocket, can someone think option to connect pocket and tools to be same number...
Please Log in or Create an account to join the conversation.
- xenon-alien
-
- Offline
- Premium Member
-
Less
More
- Posts: 141
- Thank you received: 3
16 Oct 2024 07:09 - 16 Oct 2024 07:59 #312222
by xenon-alien
Replied by xenon-alien on topic Tool in spindle memory
Hello.
The random tool changer works, remembers the last tool (after adding the 5400 variable in the .var file).
One question is left.
How to put the tool in spindle in an empty pocket? (if needed)
T0 M6 - not helps. (as usually in manual tool change)
In the tool table there is no T0 P0 line...
Helped:
Added In the tool table the T0 P0 line
Changed the toolchange.ngc
O100 IF [#<selected_tool> GT 0]
to
O100 IF [#<selected_tool> GE 0]
The random tool changer works, remembers the last tool (after adding the 5400 variable in the .var file).
One question is left.
How to put the tool in spindle in an empty pocket? (if needed)
T0 M6 - not helps. (as usually in manual tool change)
In the tool table there is no T0 P0 line...
Helped:
Added In the tool table the T0 P0 line
Changed the toolchange.ngc
O100 IF [#<selected_tool> GT 0]
to
O100 IF [#<selected_tool> GE 0]
Last edit: 16 Oct 2024 07:59 by xenon-alien.
Please Log in or Create an account to join the conversation.
- Kriek
- Offline
- New Member
-
Less
More
- Posts: 1
- Thank you received: 0
15 Apr 2025 13:05 #326369
by Kriek
Replied by Kriek on topic Tool in spindle memory
I have also implemented random toolchanger on my lathe. It works to remember the right tool in the machine. A problem that have occured quite a few times is that when I update tool offsets the tool number in use changes.
For instance, tool 7 is in use and I update tool 3's offset in the tool table. Save, reread, reload. Then tool 7 becomes tool 11 or 12. Well, some other random tool number. I could not deduce a specific pattern so far and it does not happen every time.
For instance, tool 7 is in use and I update tool 3's offset in the tool table. Save, reread, reload. Then tool 7 becomes tool 11 or 12. Well, some other random tool number. I could not deduce a specific pattern so far and it does not happen every time.
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23377
- Thank you received: 4966
18 Apr 2025 09:14 #326579
by andypugh
Replied by andypugh on topic Tool in spindle memory
I assume that you are using the tool-number in HAL rather than pocket-number to bypass the tool/pocket swapping inherent to a random TC?
Is it possible that you could save a copy of the tool.tbl file before and after the problem and attach the two files here? That might help work out what is going on.
Is it possible that you could save a copy of the tool.tbl file before and after the problem and attach the two files here? That might help work out what is going on.
Please Log in or Create an account to join the conversation.
- Jens23
- Offline
- New Member
-
Less
More
- Posts: 11
- Thank you received: 0
09 Jun 2025 12:00 #330008
by Jens23
Replied by Jens23 on topic Tool in spindle memory
Hello,
today I stumbled across this error and I might be able to provide a useful hint.
I am using Probe Basic 2.9.3 and if I have NO_FORCE_HOMING = 1 in my ini, it remembers the tool.
If I have NO_FORCE_HOMING = 0 in my ini, it won't remeber it.
I guess it sets the tool in the background with some MDI command and it can't execute this command, if it is not allowed to execute a MDI command because it is not homed.
I added #5400 in my .var and with every toolchange it changed that value to the toolnumber.
Whenever I started PB with NO_FORCE_HOMING = 0, it changed the value of #5400 to 0 right after PB started.
I don't mind using NO_FORCE_HOMING = 1 but that causes Issues with the "REF-ALL / HOMED" Button in the Probe Basic UI because that one uses the "status:all_axes_homed" from the QTDesigner and this status only works with NO_FORCE_HOMING = 0...
If someone knows any workaroud, let me know
today I stumbled across this error and I might be able to provide a useful hint.
I am using Probe Basic 2.9.3 and if I have NO_FORCE_HOMING = 1 in my ini, it remembers the tool.
If I have NO_FORCE_HOMING = 0 in my ini, it won't remeber it.
I guess it sets the tool in the background with some MDI command and it can't execute this command, if it is not allowed to execute a MDI command because it is not homed.
I added #5400 in my .var and with every toolchange it changed that value to the toolnumber.
Whenever I started PB with NO_FORCE_HOMING = 0, it changed the value of #5400 to 0 right after PB started.
I don't mind using NO_FORCE_HOMING = 1 but that causes Issues with the "REF-ALL / HOMED" Button in the Probe Basic UI because that one uses the "status:all_axes_homed" from the QTDesigner and this status only works with NO_FORCE_HOMING = 0...
If someone knows any workaroud, let me know

Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23377
- Thank you received: 4966
10 Jun 2025 13:24 #330076
by andypugh
Replied by andypugh on topic Tool in spindle memory
This sounds like a question for the ProbeBasic forum section.
Please Log in or Create an account to join the conversation.
Time to create page: 0.678 seconds