I am looking at options available to find center of work piece by probing the outside dimensions, hopefully as fully automated as possible. I have looked at several touch probes available, but am not sure how to make them work with OpenBuilds. Any suggestions/advice is greatly appreciated. TIA
this probe can be used Amazon.com in conjunction with a custom build of grblHAL for the Blackbox X32 that includes the macro options With all that you can write macros with logic and math in them that runs from the SD card in the BB. Hmmm, might be possible without the logic, then it can run direct from Gcode, but you still need the math so you can probe left, probe right, and find the center point with things like center=(left + right) / 2 The basic probing code is already available with our fusion360 postprocessor for probing X, Y or Z surface (probe Z first), and an XY corner. Since I don't yet have a proper probe I have only fiddled with the basics, which should work in theory. If someone can ship me a good probe ..... (-:
You can do a standard probe on the front/left corner and enter stock dimensions quite easily to do center origin CONTROL > Probing Wizard > XYZ Probe > Click ADVANCED button > Pick CENTER, and enter Width and Height (Probe still on front left corner, but zero will be set to center (half width and half height after probing the F/L corner) Automatic probing from the egdes are tricky, need to use a probe that fits in the collet for example. Can be done with an existing javascript macro, but the built in way is way easier, and definately "good enough" - not that hard to measure the stock.
just threw this together this relies on having the 'variables and expressions' option compiled into grblHAL for the Blackbox X32 This will probe inside a circle to find center, first edit the diameters etc in the .nc file then probe Z height on top of the material (if you need actual Z0 somewhere else, probe it after using this) then move probe tip to about the center of the circle and run this code probe will be at calculated center of circle when it finishes, click the 'setZeroXY' button to capture it. I will look at outside tomorrow, been called for supper (-: Code: G90 G94 G17 G21 (probe inside circle that is greater than 4*probe tip diameter) (set these values, and set G20 above if you want to, then set all values in inches) #500=20 ; inside diameter of circle to probe #501=4 ; depth to probe at, set Z=0 at top of circle before running this #502=6 ; probe tip diameter #600=1234 ; fast feedrate for probe in mm/min - change if you change to inches #601=97 ; slow feedrate for probe - must be the same rate at which probe was calibrated (put probe roughly in the center of the circle, above Z=0) (descend into circle) G0 Z-#501 (probe x+) G91 ; move relative G38.2 X[#500*0.75] F#600 ; probe fast G0 X[-#502*3] ; retract 3*ball diam G38.2 X[#500*0.75] F#601 ; probe slow #1002=#5061 ; store probed position G0 X[-#500/2] ; retract to approx X center (probe X-) G38.2 X[-#500*0.75] F#600 ; probe fast G0 X[#502*3] ; retract 3*ball diam G38.2 X[-#500*0.75] F#601 ; probe slow #1003=#5061 ; store probed position #1000=[[#1003+#1002]/2] ; calc X center G90 ; move absolute G0 X[#1000] ; move to probed X center G91 (probe Y+) G38.2 Y[#500*0.75] F#600 ; probe fast G0 Y[-#502*3] ; retract G38.2 Y[#500*0.75] F#601 ; probe slow #2004=#5062 ; store position G0 Y[-#500/2] ; back to approx center (probe Y-) G38.2 Y[-#500*0.75] F#600 ; probe fast G0 Y[#502*3] ; retract G38.2 Y[-#500*0.75] F#601 ; probe slow #2003=#5062 ; store position #2000=[[#2003+#2004]/2] ; calc Y center G90 G0 Y#2000 ; move to Y center (optional - one might reprobe X here since first X probe was offset in Y) G0 Z[#502*4] ; retract Z to 4*probe tip M30
This macro should do it (unless I have misunderstood your requirements. Getting started with Javascript Macros in CONTROL / Library of Macros created by the community Oops! I see Peter already linked to this
just threw this together this relies on having the 'variables and expressions' option compiled into grblHAL for the Blackbox X32 This will probe OUTSIDE a circle or square to find center, first edit the diameters etc in the .nc file then probe Z height on top of the material (if you need actual Z0 somewhere else, probe it after using this) then move probe tip to about the center of the circle and run this code probe will be at calculated center of circle when it finishes, click the 'setZeroXY' button to capture it. outside is a bit more complicated than inside... note this code has not been run on anything except my mind, use at your own risk Code: G90 G94 G17 G21 (probe OUTSIDE circle or rectangle) (set these values, and set G20 above if you want to, then set all values in inches) #500=40 ; outside diameter of circle to probe #501=4 ; depth to probe at, set Z=0 at top of circle before running this #502=6 ; probe tip diameter #600=1234 ; fast feedrate for probe in mm/min - change if you change to inches #601=97 ; slow feedrate for probe - must be the same rate at which probe was calibrated (probe Z on top surface, then) (put probe roughly in the center of the circle, within 3*balldiam, above Z=0) (probe X+ side) G91 ; move relative G0 X[#500/2 + 3*#502] ; move right G90 G0 Z0 G91 G0 Z-#501 ; descend (prob to the left) G38.2 X[-#502*6] F#600 ; probe fast G0 X[#502*3] ; retract 3*ball diam G38.2 X[-#502*6] F#601 ; probe slow #1002=#5061 ; store probed position G0 X[#502*3] ; retract 3*ball diam G90 G0 Z[#502*2] ; raise up G91 (now move to left side X-) G0 X[-#500 + -6*#502] G90 G0 Z0 G91 G0 Z-#501 ; descend (probe X+ direction) G38.2 X[#502*6] F#600 ; probe fast G0 X[-#502*3] ; retract 3*ball diam G38.2 X[#502*6] F#601 ; probe slow #1003=#5061 ; store probed position #1000=[[#1003+#1002]/2] ; calc X center G0 X[-#502*3] ; retract 3*ball diam G90 ; move absolute G0 Z[#502*2] ; raise G0 X[#1000] ; move to probed X center (probe Y+) G91 G0 Y[#500/2 + 3*#502] ; move Y+ G90 G0 Z0 G91 G0 Z-#501 ; lower G38.2 Y[-#502*6] F#600 ; probe fast G0 Y[#502*3] ; retract G38.2 Y[-#500*6] F#601 ; probe slow #2004=#5062 ; store position G0 Y[#502*3] ; retract G90 G0 Z[#502*2] ; raise G91 G0 Y[-[#500 + #502*6]] ; over to near side (probe Y- side) G90 G0 Z0 G91 G0 Z-#501 G38.2 Y[#502*6] F#600 ; probe fast G0 Y[-#502*3] ; retract G38.2 Y[#502*6] F#601 ; probe slow #2003=#5062 ; store position #2000=[[#2003+#2004]/2] ; calc Y center G0 Y[-#502*3] ; retract G90 G0 Z[#502*2] ; raise G0 Y#2000 ; move to Y center (optional - one might reprobe X here since first X probe was offset in Y) G53 G0 Z[-#502*2] ; retract Z in MCS M30
Thanks for that code. You are very generous. I will use at my own risk. Pretty much that’s most of what do any in learning my CNC. Seems like the more I learn, the more I want / need to learn.