Probing cylinder on rotary axis for auto-leveling

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Post Reply
bugless
Posts: 2
Joined: Thu May 25, 2023 9:10 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 1442FC0C788A-0070224900
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Probing cylinder on rotary axis for auto-leveling

Post by bugless »

I have designed and built a 3 axis CNC machine that I use for building drums. It has X, Z, and A axes. It is mostly used to drill holes in drum shells and occasionally carve designs in the shells. I've found that some drum shells aren't perfectly round, and I'd like to be able to probe the shell and use the Z offsets to correct my gcode files. I've written a python program that will adjust z offsets of my gcode programs when given theoretical probed z values, but I can't figure out whether or not I can get CNC 12 to run a probing cycle that will probe along the X and A axes. I've also written a python program that would generate gcode to probe the X and A axes in the way I'd like, but it uses g38.2 codes for the probing, and Centroid doesn't support that. Is there a way to use the probing cycles in Centroid to probe on a rotary axis? Also, is it possible for the Z offsets that are found using the probing routine to be output to a file so I can use those to modify z offsets in other gcode programs?
centroid467
Posts: 230
Joined: Thu Apr 14, 2022 2:46 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: No
CNC11: No
CPU10 or CPU7: No

Re: Probing cylinder on rotary axis for auto-leveling

Post by centroid467 »

Please take a look at the information on pages 260-261 of the mill manual (linked here) for information on protected probe move functions M115, M116, M125, M126. You will find M120-M127, M223, and some others useful for file operations. A table of built in M functions is on page 246 of the linked manual.

Some sample usage from one of my probe testing programs is given below:

Code: Select all

; MECH local position #26101...

; example variable assignments
#111 = [360*1 + 5]   ; stop angle
#112 = 5.0   ; feedrate inches/min
#115 = 30.0 ; Fast probe rate, overrides machine parameter setting

; example of setting up file and writing a header
M121 "c:\cncm\kp3-radial-points-43mm-f5-1x-cal_run6.cnc"
M223 "(KP-3 radial map)\n"
M123L1 ;;
M223 "(%.0f hits, F%0.f)\n" #111 #112
M123L1 ;;
M223 "(X,	Y,	Z)\n"

; example motion into probe move, in this case direction is computed and ends up radially outwards from the center of a ring gauge
g1 x[ (0.5 - #121)*cos(#110) ] y[(0.5 - #121)*sin(#110)] F#115
; Position to move to
m115/x[0.5*cos(#110)]/y[0.5*sin(#110)] P#9011 F#112

; Now, save the position to variables
if #50001 ; sync
; get mechanical hit positions
#101 = #26101 ;x
#102 = #26102 ;y
#103 = #26103 ;z

; Next, do any processing such as compensating for stylus tip diameter then write the data to the opened file.
M223 " %9.6f %9.6f %9.6f\n" #101 #102 #103 ; Write to file
I hope this helps! I used to be a drummer myself so I hope you post some pictures once you get this figured out :D
bugless
Posts: 2
Joined: Thu May 25, 2023 9:10 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 1442FC0C788A-0070224900
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Probing cylinder on rotary axis for auto-leveling

Post by bugless »

Thanks for the info, and it looks like this is exactly what I needed! I'm attaching a pic of a drum that I made on the first version of my CNC machine that was using LinuxCNC for control. The first version could only support drums up to about 15" in diameter, and I've built a second machine using servos instead of stepper motors and I've switched to Centroid Acorn. Still figuring out the ins and outs, but I've been very impressed with it so far. I still need to work out a few small details before I get to making more drums on the big machine, but with your help, I just got a lot closer. Thanks again!
IMG_0425.png
centroid467
Posts: 230
Joined: Thu Apr 14, 2022 2:46 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: No
CNC11: No
CPU10 or CPU7: No

Re: Probing cylinder on rotary axis for auto-leveling

Post by centroid467 »

No problem, happy to help! Let us know if you have any other questions.

That's a beautiful snare! I like the tightness and uniformity of the grain and how the honeycomb pattern shows it off. Is it solid maple?
Post Reply