11 Jun 2012 23:24
Re: Development question: interpreter's handling of tool changes for lathe
In response to a recent discussion on IRC I wrote a patch that allows for FANUC-style handling of tool changes in lathe. I followed the tool change syntax that is outlined by Peter Smid ((CNC Programming Handbook. 3rd Ed., page 107): "T01xx - selects the tool mounted in position one and activates geometry offset number one. Txx01 - selects the wear offset register number one. Examples: T0101 for turret station one, applies geometry offset one, applies wear offset one. T0111 for turret station one, applies geometry offset one, applies wear offset eleven. The first pair of numbers is always the tool station number and geometry offset, the second pair is the wear offset register. For gang tooling, the tool station is irrelevant. For ATC, the T call must also perform a tool change request." With this patch a Txxyy command changes tools, applies the geometry offsets for tool xx, and applies the wear offsets for tool yy. Txx just changes tools and applies geometry offsets for tool xx. The patch is only being submitted for discussion - to be properly implemented it would require a fundamental change to the tool table (extra fields for x and z wear offsets.) For proof of concept I am "borrowing" the U and W fields in the tool table, something that wouldn't work for lathes with a motorized tailstock or second turret. I tried to implement this with minimal change to the code - default functionality is not affected. To try it out, add the line FEATURES = 64 to the RS274NGC section of your INI file (or modify your FEATURES mask if you're already using RS274NGC features, documented here: http://www.linuxcnc.org/docs/devel/html/remap/structure.html#_optional_interpreter_features_ini_file_configuration_a_id_sub_ini_features_a) To answer the question of why you would want to use this feature: 1. It's a more standard way of calling out tool changes in lathe g code - programs that ran on a FANUC-controlled lathe require fewer modifications to be compatible with LCNC. 2. It makes correcting for wear easier (no math on the part of the operator)(Continue reading)
RSS Feed