2009/11/7 Gene Heskett <[email protected]>: > ; leave cutter parked in the hole to show off. > ;Cunning ;-) > G0 X[0 - #<Pitch>/2] > #<Angle> = [#<Angle> + #<Step>] > G0 C[#<Angle> - #<Step>/2] X0 Y[#<Radius>/COS[#<Step>/2]] > G0 C#<Angle> X#<H_Width> Y#<Radius>
Looking at the manual pages on G2 and G3 I noticed that you can do Arcs with simultaneous rotary motions. With the code above you are dependent on having enough space round the cutter for two straight-line paths to not foul the work. This way is more elegant.... #<Angle> = [#<Angle> + #<Step>] G2 A#<Angle> X#<H_Pitch> Y#<Radius> I#<H_Pitch> J[0-#<Radius>] F[#<Feed> * 100] G0 X#<H_Width> F#<Feed> > Watching it cut electronic air I see another problem, the initial G2 move, > half a turn for the initial spiral down of more than the bit diameter is > probably going to clog the bit and maybe break it as I don't have a coolant > spray to keep it power flushed, just a puddle of cutting oil, so wouldn't a > G83 peck cycle be a better idea there? I suppose that depends on whether you have a slot drill or an end-mill mounted. I was also assuming quite thin material. Another option would be to do it in a number of Z steps. > I sure wish I understood those g2/g3 moves better. Those 2 pages in the > manual need some clarification, I am just not getting it. I will try to make some clarifying drawings and put them on the Wiki (as after a lot of head scratching last night I think I understand it all now). As a precis: To define an arc you need any three out of four of start point, end point, radius and centre point. In G-code you always define the start and end points then have a choice of defining the centre point or the radius. Defining the radius is the easy way. You define a radius, EMC solves some equations and finds where the centre of that arc is, and produces the arc. However this gives you no control of the arc centre, and very small changes in start and end points can cause large changes in arc centre position. Alternatively you can define the centre point with I,J,K, and EMC works out the radius. If the radius from the centre point to the start and end points differs then EMC raises an error. This means that some maths is needed when the start and end points are not at cardinal points. It is possibly easiest to solve by using a sweep angle and a bit of trigonometry, though in this sprocket code I chose to use some Pythagorus. (Note also that that line of the code keeps line-wrapping) Note also that the centre point is defined _Relative_ to the current position. That caused me a lot of confusion the first time, and maybe you too. The manual says that you can change that with G91.1. I wish I had realised that much earlier. Cutter radius compensation would simplify the maths somewhat, and would have made it easier to put a flat on the tooth tips. I considered doing that with the current file, but the maths got tricky because that means solving equations to find tangents. -- atp ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
