Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: labuda on February 23, 2008, 09:55:15 PM

Title: ellipical path in MACH3
Post by: labuda on February 23, 2008, 09:55:15 PM
Hi
Is there a way to have my CNC lathe cut an elliptical path? Or does G code only operate using circle arcs and lines?
Thanks
Aleks.
Title: Re: ellipical path in MACH3
Post by: jimpinder on February 24, 2008, 04:33:30 AM
GCode does straight lines and circles.

Having said that you can do any shape at all, what you have to do is control the axis yourself.

This can be done by  a Macro. These are written in Visual Basic (there is a tutorial video) and the full syntax is available.
There would be several ways of doing it.
e.g. for x = 1 to 100 (assuming mm) then
                  xa = x
                  ya = (whatever the equation is)
                  CODE (g1 x) & xa &(y) & ya

The Visual Basic runs in advance of the GCode and will write 100 lines of code giving G1 X*Y* instructions for positions of x = 1 to 100

You cold write an even more complicated one using g2 or g3 commands, having worked out the diameter of the elipse at that point - thus having the elipse in a series of arcs instead on straight lines.