Tool in spindle memory

More
19 Apr 2019 18:07 #131252 by nkp
Replied by nkp on topic Tool in spindle memory
diff -ruN a/interp_array.cc b/interp_array.cc
--- a/interp_array.cc 2019-04-19 21:06:06.417653618 +0300
+++ b/interp_array.cc 2019-04-19 21:05:30.009473042 +0300
@@ -224,7 +224,7 @@
5381, 5382, 5383, /* coordinate system 9 */
5384, 5385, 5386, /* A, B, & C */
5387, 5388, 5389, /* U, V, & W */
- 5390,
+ 5390,5400,
RS274NGC_MAX_PARAMETERS
};

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

More
19 Apr 2019 18:45 #131255 by andypugh
Replied by andypugh on topic Tool in spindle memory
Adding it manually to the .var file seems like a reasonable way to enable the behaviour.

What is then needed is for iocontrol (or similar) to load the tool if it finds it non-zero in the .var file.

I think that Chris was looking at this?
The following user(s) said Thank You: Shu

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

More
19 Apr 2019 21:14 #131257 by newbynobi
Replied by newbynobi on topic Tool in spindle memory
Why don't you use gmoccapy?
Just go to the settings page and enable "reload tool on start up"

After that gmoccapy will set the last tool in spindle with an MDI command after you homed the machine.

Norbert

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

More
19 Apr 2019 22:43 #131259 by andypugh
Replied by andypugh on topic Tool in spindle memory

Why don't you use gmoccapy?


Because this is a feature which shouldn't depend on the GUI.

(Gmoccapy attempts to fix too many shortcomings of LinuxCNC in the GUI when really they should be fixed for all GUIs in the common code)
The following user(s) said Thank You: JetForMe

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

More
20 Apr 2019 01:50 #131266 by cmorley
Replied by cmorley on topic Tool in spindle memory

Adding it manually to the .var file seems like a reasonable way to enable the behaviour.

What is then needed is for iocontrol (or similar) to load the tool if it finds it non-zero in the .var file.

I think that Chris was looking at this?


I am - I wrote an email to the dev list about an initialization problem of i0control.
I'm not sue there are many active devs left in linuxcnc though...
Once a correct fix for that is decided then using to initizle a tool should be fairly easy.
Again my though is to use a HAL pin so it can be connected to a hardware or software solution but I am open to arguments.

I am now out of town working so probably can't get back to it much for a couple weeks.
Ultimately I think i might try to write a python replacement for iocotrol - there is no good reason for it to be in C.
but that is another goal all together.

Chris M
The following user(s) said Thank You: Diederik

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

More
20 Apr 2019 03:52 #131272 by nkp
Replied by nkp on topic Tool in spindle memory
Edited a bit, now works for me
#!/usr/bin/python

import sys
import linuxcnc , hal
import re
import time

s = linuxcnc.stat()
c = linuxcnc.command()

h = hal.component("savetool")

varfile = "/home/cnc/build/configs/mach/param.var"

old_tool = 0
for line in open(varfile, "r"):
    M = re.search("^5400\s([\.\d]*)", line)
    if M: old_tool =  re.search("^5400\s([\.\d]*)", line).group(1)

en = 1
try:
    while 1:
        if en:
            s.poll()
            if (not s.estop) and s.enabled and s.homed == (1,1,1,0,1,0,0,0,0) and s.interp_state == linuxcnc.INTERP_IDLE:
                c.mode(linuxcnc.MODE_MDI)
                c.wait_complete()
                c.mdi("M61 Q%s" % old_tool)
                en = 0
            time.sleep(2)
except KeyboardInterrupt:
    raise SystemExit
The following user(s) said Thank You: Diederik

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

More
20 Apr 2019 19:51 #131325 by andypugh
Replied by andypugh on topic Tool in spindle memory

I'm not sue there are many active devs left in linuxcnc though...


I think Chris is concentrating on watchmaking, and Jeff said a while ago that he was moving away (given that AFAIK Jeff never owned a CNC machine, this isn't really unreasonable)

There active devs, but you are one of them :-)
The following user(s) said Thank You: Diederik

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

More
11 May 2022 18:10 #242659 by viesturs.lacis
Hello!

Is there any update on this issue? I am now in situation where it would be very convenient, if LinuxCNC would save and restore the tool number in spindle.

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

More
11 May 2022 18:51 #242663 by Todd Zuercher
While it might be nice, is this really a deal breaker? I run Fanuc controlled machines that cost nearly $300,000 new that still require "homing" the tool changer with every start up, which entails manually removing any tool from the spindle and replacing it into the tool carousel. I am sure that control could be capable of remembering the tool in the spindle, but the manufacturer thought it was safest (or more likely not worth the cost) to start with a fresh tool # count with every time the machine is power cycled. Is it really that hard to manually put a tool away on your machine when you start it up, or remember to command the machine to put the tool away before powering it down. A lot can go horribly wrong if the machine makes an incorrect assumption about what tool might be in the spindle or where it belongs. Is the cost of a little convenience worth the potential risk of possible damage?

We have another machine (not a Fanuc) that does remember tool positions. It is nice when it works, but the manufacturer didn't build a simple routine for resetting the changer and tool # in spindle in the event that something does go wrong. Then it becomes a pain, looking up a number of M-codes use for setting parameter numbers and little used procedure sequences to reset it.

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

More
19 Apr 2023 06:10 #269403 by JetForMe
Replied by JetForMe on topic Tool in spindle memory
What's the state of this? I'm running a 2.9 dev version (I plan to upgrade soon), and I'm trying to polish up my tool changing and setting UI. It would be great if LinuxCNC remembered the tool that was last in the spindle.

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

Time to create page: 0.096 seconds
Powered by Kunena Forum