a blog of ideas and improvements
for tormach cnc mills
articles | for sale |
about |
contact
|
Here's a shortcut I've wanted for a long time.
It's tedious probing the center of X on projects, especially when they don't clear a vise (so you can't use the built-in Rectangular Probing Routine).
You basically have to manually probe one side, rise up, jog over, probe the other side, divide by two and ugh.
Not to mention that your work will be varying widths. Some days you may be on a 1" piece. Other days, a 10" piece. How would you automate that?
What if someone wrote a script that asked you the approximate width of your project, then did it all with one button press?
Two files to make this work. This one first ensures you're in Pathpilot, then asks for the width of your work. It then injects that line into the actual probing script. Finally, it moves your mouse to the MDI line and runs the script.
If you put this in \tmc\configs\tormach_mill\nc_subs (actually, put it in /gcode/subroutines (easier to remember)) as M110 (no extension) and reboot the machine, you can call the entire thing from the MDI line by simply typing M110.
#!/bin/bash |
This is the actual probing routine that goes in /gcode/subroutines (/home/operator/gcode/subroutines) as xboss.nc
o<xboss> sub G28.1
(GET CURRENT MACHINE COORDS TO #5161 #5162 #5163) G38.2 F20
X#667 (FAST PROBE FROM STARTING POINT, AS FAR AS NECESSARY) G1 F20
X[#<_X>-.05] (BACK OFF BRO) G38.2 F20
X[#<_X>-2 ] (FAST PROBE BACK INTO WORK) #2 = #<_X> (SET THE VARIABLE) G1 F20
X[#<_X>+.05] (BACK OFF BRO) G10 L20 P0 X0 (SET CENTER OF WORK TO X0) o<xboss> endsub |