I'd like to program a circle made of holes, with a radius and holes every 30 degrees.
Can I program that in a simple way?
I've looked at the manual pages on linuxcnc.org but if the info is there I do not understand it...
I'd like to program a circle made of holes, with a radius and holes every 30 degrees.
Can I program that in a simple way?
I've looked at the manual pages on linuxcnc.org but if the info is there I do not understand it...
Sven
http://www.puresven.com/?q=building-cnc-router
trig it out
Thanks, but that is not programming in a simple way.
Sven
http://www.puresven.com/?q=building-cnc-router
Hi
I have tried it briefly and you need to program a rapid move to the pitch radius and then use the ^sign to get the angle correct.
G0g54x20y0
g0g43z1h01
g81z-20q2r1
^10
^20
^30
etc etc
Hope this helps
then do a Google search for bolt hole circles , there's some free stuff out there
using trig is not that hard ,
point X = center of circle X + ( radius * sin( angle ) )
point Y = center of circle Y + ( radius * cos( angle ) )
You might want to have a look at one of the sample scripts made for Linuxcnc. Check this one out and see if it fills your needs.
LinuxCNC Documentation Wiki: Simple LinuxCNC G-Code Generators
OOPS, just noticed someone beat me to it.
In CAD it is easy to use polar arrays or snap.
I wrote a universal G code program to do chain drilling in a circle. You enter the various parameters as needed and the program will calculate the no of holes needed and hole spacing to do this. Maybe you can adaptn this technique to your application. Here is the program:
(Touchoff X, Y, at center of circle. Z at surface)
#= 3.141592659265359
#1 = 10 (Outside diameter of circle)
#2 = .125 (Drill diameter)
#3 = .8 (Thickness of material)
#4 = 15 (Feed rate)
#5 = .04 (Clearance to move x & Y to next hole)
#10 = [[#1 - #2]/2] (Radius of drill circle)
#11 = [FIX[[2*#*#10]/[#2 + .001]]] (Integer no of holes)
#12 = [360/#11] (Angle between holes)
#13 = 0 (Hole counter)
#14 = 0 (Current angle)
G17 G20 G40 G49 G54 G64 G80 G90 G94 (boiler plate)
F #4
S 1000 M3 (start spindle)
G0 Z #5
#20=0
G61
o200 While [#20 LT 100]
o100 While [#13 LT #11]
#15 = [#10*Cos[#14]] (X hole location)
#16 = [#10*Sin[#14]] (Y hole location)
G81 X #15 Y#16 Z[0-#3-.3*#2] R #5
G0 Z #5 (may not be needed)
#14 = [#14 + #12] (Next hole angle)
#13 = [#13 + 1] (Increment hole counter)
o100 Endwhile
#13=0
#14=0
#20=[#20+1]
o200 Endwhile
M5 (spindle off)
M2
jensor
Cool, that looks like what I need!
I'll give it a spin after moving house.
Sven
http://www.puresven.com/?q=building-cnc-router
I just realized the above program had been modified from the original in order to run software tests wherein it repeats the circles 100 times. To correct remove the following statements:
#20=0
o200 While [#20 LT 100]
#20=[#20+1]
o200 Endwhile
jensor
4 months later, but for thread historical purposes
G Code Overview: Polar Coordinates
in order to learn... not save money.