Here is the patch so far. lathe_style_toolchange I also added Dewey's original for reference.
It now uses the INI switch LATHE_STYLE_TOOLCHANGE. There was unintended change in Interp::convert_setup_tool that I have deleted. and got rid of tabs instead of spaces. There is code in interp_find that I am not positive about. The relevant part : *pocket = -1; for(int i=1; i<CANON_POCKETS_MAX; i++) { if(settings->tool_table[i].toolno == toolno) { *pocket = i; break; } } This loops through the toolfile trying to match the tool number to the tool number just changed. settings->tool_table[0].toolno seems to hold the current spindle tool #. originally it looped from zero and went through the whole tooltable because there was no break command. originally it would match the toolnumber in the spindle, (which I can't see why you want to) but continue and match again to tool number you actually wanted. When I added the break while still starting the loop at 0, if you called a tool with the same number twice, linuxcnc would think the tool number was zero. this was because it matched (wrongly) on the first iteration of the loop. So now I start the loop at 1 - the first entry in the toolfile. I'm not sure if that's a problem with say a random tool changer. I tested normal mill style toolchanges with no problem. Is there run tests for this? One other problem I have just discovered: In this patch, as per Fanuc: T0101 would place the geometry offsets under tool number 10001 and wear offsets under tool number 1. When I say tool number here I mean the line in the toolfile with that tool number. Unfortunately using G10 L10 will set the (geometry) offsets in T01, when it should go in T10001 So either I add code to G10 L10 to redirect if the the lathe switch is active, or we abandon Fanuc a bit and put the geometry offsets in T01 instead of T10001 (so the opposite). At this point I really start to wonder how often G10 L10 P10001 is used in current lathe Gcode and start to consider other alternatives such as P01 for geometry, P0101 for wear etc. - It really makes it easier if the geometry offsets are under the plain tool number Chris M
lathe_style_toolchange.patch
Description: Binary data
0001-Fanuc-style-tool-change-for-Lathes.-On-Fanuc-control.patch
Description: Binary data
------------------------------------------------------------------------------ AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d
_______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers