Chris Radek schrieb: > Hi Sven, I've added this scheme to the emc2 cvs trunk. I can't test > it right now but maybe I can set up something one of these days.
Cool thanks. It will probably take another week or two until I have a controller for my machine that EMC2 could work with. And probably another week or two until I figured out how I need to set up EMC2 to control my machine. > G43 with an H index -1 is now a "transient" tool whose offsets are > specified on the G43 line. The length offset is specified with the K > word (and X offset with I word for lathes). > > So G43 H-1 K0.5 would do the same thing as G43 H3 if tool 3 has a > length of 0.5 in the tool table. > > Like I described above I think this will let you use probing to > measure and set up length compensation for a newly inserted tool in a > fairly straightforward way. > > (Since H-1 was previously disallowed, this will not break any > existing programs.) Hmm, looks useful, especially if I can call a subroutine upon each tool change. Speaking of subroutines: What I would find highly useful would be if emc2 provided 1) Access (read&write) to the tool lenghts in the tool table 2) Access to the currently selected tool identifier (read-only, use T-word to change it) 2) Access (read&write-once) to the currently set reference tool index. 3) (optional, though ideally available): A way to define that subroutine X (a G-Code program) be called on every tool change. With that, I could define a subroutine which does the following (sorry, don't know the G-Codes right now, not even wether the conditionals are available, so I'm using C-like pseudo-code): idx=cur_ref_tool_idx; if ( idx==0 ) { cur_ref_tool_idx=cur_tool; } if ( tool_length[cur_tool] == 0 || always_reprobe ) { execute("G00 Z0"); execute("G00 X probe_pos[X] Y probe_pos[y]"); tmp_length = result_of(probe_length); if ( check_tool_lengths && ( tmp_length!=tool_length[cur_tool] ) ) { abort("Tool length inconsistent for tool $curtool"); } tool_length[cur_tool] } execute("G43 H-1 K tool_length[cur_tool]-tool_length[cur_ref_tool]"); return; Or in other words: A routing which checks wether a reference tool is already set. If not, use the current tool index to set it. If the current tool length is 0 (no previously set), set it to the value returned from probing at position probe_pos (note: We have a rather large (regarding our tool sizes), completely even area where the tool can hit for the probing. Therefor the actual size and shape of the tool are of minor interest to me regarding this probing.) Finally: set effective tool length offset to the difference of recorded "lengths" of the reference tool and the current tool (which might be the same and the "formula" might need a different prefix - i.e. tool_length[cur_ref_tool] - tool_length[cur_tool]). Stuart Stevenson wrote about a machine that verifies tool lengths to mitigate the posibility of broken tools or wrong tools. This would be achieved with the above subroutine if always_reprobe and check_tool_lengths are both true. Machines with no tool changers would set always_reprobe to true and check_tool_length to false. Machines with tool changers could set both to false and still automatically populate the tool table with determined tool lengths. Geeze, would be great if this could be implemented. Of course, it would be even greater if it was directly available inside EMC2 with no special requirements in the g-code except for the usual "M06 Tx" to select tool x. BTW: Can I tell EMC2 to automatically go to a specified position on M06 execution so that I could change the tool manually, waiting for confirmation from me? I might have overlooked it, but I couldn't find this information in the docs (yet). regards, Sven ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users