the G29 i modified just takes actual point without x/y move. i did that to keep the heating stuff for printer.
was just an example..(i just use it from a button)
the M6 code is just " a break " in gcode, that shows what tool has to be used next needs an acknowledge by button when finished.
so it´s not too hard to implement,just : stop executing code-->> show message-->> wait for ack-->> continue
so description from linux cnc :
LinuxCNC includes a userspace HAL component called hal_manualtoolchange,
which shows a window prompt telling you what tool is expected when a
M6 command is issued. After the OK button is pressed, execution of
the program will continue.
The hal_manualtoolchange component includes a hal pin for a button that
can be connected to a physical button to complete the tool change and
remove the window prompt (hal_manualtoolchange.change_button).
measuring tool lenght for example in GRBL used is G38.2
so the flow in GCode for a tool change is not a single M6 , it looks as follows:
(snippet of Drill file i used on GRBL generated via
(.../EAGLE-7.1.0/ulp/pcb-gcode.ulp)
(Copyright 2005 - 2012 by John Johnson)
...executed code
G01 Z-2.1000 F200.00
G00 Z2.0000
M05 //spindle stopped here
G00 Z50.0000 //move Z up
G00 X0.0000 Y0.0000 // go to defined xy position
M06 T02 ; 0.8128 // M6 just says "change the tool " and waits for ack
M03 // continue
G04 P0.500000
G00 X-20.3200 Y29.2100
G01 Z-2.1000 F200.00
So that works without tool length measurement because of my drill bits all have same Z-length adjusted by ring.
Spindle control is done outside of M6 BUT:
some people generate their gcode by hand(me also sometimes) ,a forgotten "M5" will keep spindle running and i think its not bad to switch off (even when its already off) and block the spindle before acknowledge by button for safety reasons.
there will be no change for operation.
Example for G-code tool length measurement
G00 z50.2
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">G00 X0.0000 Y0.0000
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">M00 //break
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">G00 Z50
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">G38.2 z-50 f100 // move z down until triggered
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">G92 Z1.75 // set Z-Offset (probe thickness in this case)
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">G0 z10 //move z up
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">M00 // end of break
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">G0 z5
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">M03<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">there are a lot of combinations possible to get same result , but hopefully i have the chance to ask an experienced<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">CNC Programmer next week, i want to get as much information as possible for a safe operation.<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Also there are quite huge differences in availability of G or M- codes depemding on the software you use.<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(for example Mach3 , Linux CNC , CamBam etc.)<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">From my point of view everyone using software to generate the code should be able to read and understand the code in file.<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">simulators are also useful.
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">manual movement is also a "nice to have" especially for finding workpiece offsets.i did that via analog joystick on analog inputs , refer my post <font size="2">manual positioning / Jogwheel dated March 6</font><font size="2">( works good but it´s improvable for shure , will see during working with that).</font>