Tool in spindle memory

More
7 years 7 months ago #130063 by cmorley
Replied by cmorley on topic Tool in spindle memory
Andy

Looks like we both hit the same problem - initialization of the tool number.
It's reset in iocontrol.cc.

Do you know what program should call a NML initialize tool IO command?
This would be a less 'hacky' fix I think.

Chris

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

More
7 years 7 months ago #130067 by cmorley
Replied by cmorley on topic Tool in spindle memory
Ok I went deeper....
a NML message of EMC_TOOL_INIT _is_ sent...from taskclass.cc

but it never makes it to iocontrol.cc

maybe NML messages are marshaled somehow?

Chris M

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

More
7 years 7 months ago #130072 by pl7i92
Replied by pl7i92 on topic Tool in spindle memory
you shoudt force a BUG track

But in _General
NO tool shoudt be inside the ATC over night

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

More
7 years 7 months ago #130076 by cmorley
Replied by cmorley on topic Tool in spindle memory
It's really a feature request as the system works as it was designed to, at the time.

One has to be careful with general statements about what should or should not be...for instance in a lathe one does not remove the tools at night :)
Linuxcnc works with all kinds of different machines.

Chris M

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

More
7 years 7 months ago #130104 by Todd Zuercher
On the router spindles I've worked with I've heard that CAT and BT taper tools should never be left in, but with HSK style tools, I've been told both to always leave in and remove over night, depending on the manufacturer's opinion.

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

More
7 years 6 months ago #130123 by andypugh
Replied by andypugh on topic Tool in spindle memory
I have it working. It's not very generic at the moment though.

1) Add 5400 to the end of the .var file, this means that the tool-in-spindle is saved when LinuxCNC exits.

2) Make this Python file executable, and "loadusr" early in the HAL file sequence.
Code:
#! /usr/bin/env python import sys import linuxcnc import re import time s = linuxcnc.stat() c = linuxcnc.command() s.poll() #inifile = linuxcnc.ini(sys.argv[1]) varfile = "sim_mm.var" #inifile.find("RS274NGC", "PARAMETER_FILE") 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) def ok_for_mdi(): s.poll() return (not s.estop) and s.enabled and s.homed == (1,1,1,0,0,0,0,0,0) and s.interp_state == linuxcnc.INTERP_IDLE while not ok_for_mdi(): time.sleep(0.5) print "trying to set tool to %s" % old_tool c.mode(linuxcnc.MODE_MDI) c.wait_complete() c.mdi("M61 Q%s" % old_tool)

Note that I have not figured out how to read the .var file name from the INI, so that needs to be hard-coded. Also it only works for a 3-joint machine. Change that by editing the (1,1,1,0,0,0,0,0,0) bit of the code that is testing for all axes to be homed.

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

Time to create page: 0.364 seconds
Powered by Kunena Forum