Tool in spindle memory

More
12 May 2016 02:41 #74539 by Diederik
Hi,

I had this problem before, but managed to solve it somehow, but now can't remember how.

When I shut linuxcnc down, and start it up again, I need it to remember which tool was left in the spindle, but with the machine that I'm busy with now, when I start linuxcnc up again on, iocontrol.tool-number will be = 0.

And at the bottom of axis, will display no tool.

I need it to remember which tool was left in the spindle. Any suggestions?

Please Log in or Create an account to join the conversation.

More
12 May 2016 20:44 #74568 by Diederik
Replied by Diederik on topic Tool in spindle memory
Hi, just to clear up matters : seems like there was no problem, but what I suspect must have been the problem, is that I had a power failure before I started encountering the problem, so computer shut down unexpectedly, so could have been that the parameters and .var file was not being operating right. This morning when I started the machine up, everything was perfect, so remains a puzzle and concern to me as to what caused the problem, and if it might occur again in future.

Thanks

Please Log in or Create an account to join the conversation.

More
13 May 2016 14:35 #74603 by andypugh
Replied by andypugh on topic Tool in spindle memory
Unless LinuxCNC gets a terminate signal it won't know that it needs to write out state to disk.
So, on a power failure, it is likely that nothing will be written.
The following user(s) said Thank You: Diederik

Please Log in or Create an account to join the conversation.

More
29 Mar 2019 12:14 #129893 by Diederik
Replied by Diederik on topic Tool in spindle memory
Okay, I'm busy with another machine now, and the problem is there. It doesn't remember which tool was last selected. I have under the parameter = linuxcnc.var, and file is there, but no memory of what tool was last selected. Any ideas of what I could look out for? I am sure just a setting somewhere, but my brains are stuck.

Please Log in or Create an account to join the conversation.

More
29 Mar 2019 12:28 #129894 by andypugh
Replied by andypugh on topic Tool in spindle memory
#5400 (tool number) is outside the persistent range (5161-5390) so is not saved on exit.

Parameters in the user-range (31 - 5000) can be made persistent by adding them to the linuxcnc.var file
linuxcnc.org/docs/html/gcode/overview.ht...:numbered-parameters

The first thing I would try would be adding #5400 to the .var file to see if it gets written on exit then.
If it does then a RS274NGC_STARTUP_CODE of M61 Q#5400M61 would do the trick.

If that doesn't work then some means of writing the current tool to a persistent variable might be needed.

I do feel that this ought to be built-in behaviour. I wonder of we can make it so?
The following user(s) said Thank You: akb1212

Please Log in or Create an account to join the conversation.

More
29 Mar 2019 19:12 #129919 by cmorley
Replied by cmorley on topic Tool in spindle memory


I do feel that this ought to be built-in behaviour. I wonder of we can make it so?


I agree - but I think it should be the toolchanger that giver the current tool number to motion via a HAL pin.
Then the toolchanger could get this number from mechanical means or by checking a file or data base.

Chris M

Please Log in or Create an account to join the conversation.

More
30 Mar 2019 00:13 #129938 by andypugh
Replied by andypugh on topic Tool in spindle memory
True, if a remap is involved the it can trivially save the current tool to a static user variable, an be aware that a tool change is not needed (for example) on the next restart.

Please Log in or Create an account to join the conversation.

More
30 Mar 2019 01:53 #129949 by cmorley
Replied by cmorley on topic Tool in spindle memory
I think we should add an in pin to IO control for 'current-tool-number'.
Let the tool changer (or hal manual toolchange or any custom program) take care of tool memory.

I also think we should switch to IO control 2 as IIRC it handles tool change errors too.

As you said then a remap could manipulate the extra pins too.

Chris M

Please Log in or Create an account to join the conversation.

More
30 Mar 2019 16:18 #129975 by pl7i92
Replied by pl7i92 on topic Tool in spindle memory
what version of linuxcnc are you using and what OS
so it might get into bugtracker if not written to the parameter

Please Log in or Create an account to join the conversation.

More
31 Mar 2019 06:16 #130015 by cmorley
Replied by cmorley on topic Tool in spindle memory
So I looked into adding a HAL pin for external tool number initialization.
( a first step towards having the toolchanger actually be the tool memory -though maybe that is not needed)

It was fairly simple to hack on a pin that automatically reloads (internally) the tool based on the HAL pin.

What is holding me up is that you would want that pin to be only checked once just after loading the iocontrol component.
There is even a function for initialization that could be used: EMC_TOOL_INIT_TYPE
but it seems to never be called.

I have no idea how linuxcnc starts/initializes, so I don;t know where to add a NML command to call EMC_TOOL_INIT_TYPE.....

Chris M

Please Log in or Create an account to join the conversation.

Time to create page: 0.091 seconds
Powered by Kunena Forum