Programming Help Ellipse
Likes:  0

1. MwM
Aluminum
Join Date
Jan 2013
Location
Ohio
Posts
84
Post Thanks / Like
Likes (Given)
2
29

## Programming Help Ellipse

I'm attempting to program a simple part with a ellipse.

Running a Anilam 4200T Setup, however I just can't seem to get the G code down.

G70 G90 G0 X0 Z0 T0
M41
G24 S1600
T4
G63 S400
X4 Z0.1 M2
G73 W3 A0.1 C1 B1 J0.007 K0.005
G0 X0 Z0 T0 M5

03
G0 X0 Z0.1
G1 X0 Z0
G05 X1.665 Z-4 I0.00 K-4.00 A1.665 B4.0 L0
M99

Its a very simple part I just can seem to get past the ellipse part, I keep getting a error of no center point.

Just starting out "playing" and I'm looking to learn.

Regards

2. Aluminum
Join Date
Aug 2012
Location
Portugal
Posts
139
Post Thanks / Like
Likes (Given)
64
7
You have 2 options:

1) Do it point by point; the most points you have the best elippse you get... endless program...
2) Create a macro... learn how or ask help for it, do the math and you get it...

One thing is granted... it is very dificult...

3. Diamond
Join Date
Dec 2002
Location
Pacific NW
Posts
5,074
Post Thanks / Like
Likes (Given)
8
816
Go to: CNC Services NW

cncsnw.com

Down the left side click on tutorials. There's a macro program for a Centroid control to mill an ellipse. Modify as needed for your control.

On edit: OOPS, I just noticed yours appears to be a lathe part, isn't it?

4. If you want a TRUE ellipse, every "micro-point" along the way has to be generated. The formula is... (x^2/a^2)+(y^2/b^2)=1 [X squared / a squared + etc.=1]

Put the formula in a spread sheet and increment the movement ? .002" and let it calculate maybe 200 points.

Regards,

Stan-

5. Cast Iron
Join Date
Apr 2011
Location
NJ, USA
Posts
469
Post Thanks / Like
Likes (Given)
107
104
Just remember, the tool path to cut an ellipse is not a scaled up ellipse. I dont remember the math behind it tho.

6. MwM
Aluminum
Join Date
Jan 2013
Location
Ohio
Posts
84
Post Thanks / Like
Likes (Given)
2
29
Yes this is on a lathe, not a mill. I was hoping that someone would be familiar with Anilam controls, as they have a G-code function that "should" act as a true ellipse.

The Code for this function is G05, but I'm just not familiar enough with it to code it correctly.

7. Titanium
Join Date
Feb 2006
Location
Republic of Texas
Posts
2,410
Post Thanks / Like
Originally Posted by MwM
I'm attempting to program a simple part with a ellipse.

Running a Anilam 4200T Setup, however I just can't seem to get the G code down.

G70 G90 G0 X0 Z0 T0
M41
G24 S1600
T4
G63 S400
X4 Z0.1 M2
G73 W3 A0.1 C1 B1 J0.007 K0.005
G0 X0 Z0 T0 M5

03
G0 X0 Z0.1
G1 X0 Z0
G05 X1.665 Z-4 I0.00 K-4.00 A1.665 B4.0 L0
M99

Its a very simple part I just can seem to get past the ellipse part, I keep getting a error of no center point.

Just starting out "playing" and I'm looking to learn.

Regards

You poor bastard, having to deal with a POS Anilam control.

Couple of things:

G70 G90 G0 X0 Z0 T0
M41
G24 S1600
T4
G63 S400 This isn't supposed to be g96 s400 for CSS?
X4 Z0.1 M2 Should be X4.+
G73 W3 A0.1 C1 B1 J0.007 K0.005
G0 X0 Z0 T0 M5

03
G0 X0 Z0.1
G1 X0 Z0
G05 X1.665 Z-4 I0.00 K-4.00 A1.665 B4.0 L0
G1 X4.+ Canned cycles will go berserk, error out, or do unexpected things if the last line of profile is not a single axis move perpendicular to profiling axis. (X for G73, Z for G74)
M99

You might also try to move the profile out in Z so that back end of the part is Z0. Thus G5 X1.665 Z1 I0 K1 A1.665 B4. L0. (Something in the back of my mind says A and B should be half the values you have.)

This is just another example of an Anilam idea that just doesn't work.

8. MwM
Aluminum
Join Date
Jan 2013
Location
Ohio
Posts
84
Post Thanks / Like
Likes (Given)
2
29
G70 G90 G0 X0 Z0 T0
M41
G24 S1600
T4
G96 S400
X4 Z0.1 M2
G73 W3 A0.1 C1 B1 J0.007 K0.005 Canned Area Clear Cycle
G0 X0 Z0 T0 M5

03
G0 X0 Z0.1
G1 X0 Z0 Start Of Part.
G05 X1.665 Z-4 I1.4419 K2.00 A1.665 B4 L0
G1 X4.2
M99

This is what I have put together thus far...and it still will not take it.

No idea what I'm doing wrong.

No idea if these would help at all.

9. Titanium
Join Date
Feb 2006
Location
Republic of Texas
Posts
2,410
Post Thanks / Like
Originally Posted by MwM
G70 G90 G0 X0 Z0 T0
M41
G24 S1600
T4
G96 S400
X4 Z0.1 M2
G73 W3 A0.1 C1 B1 J0.007 K0.005 Canned Area Clear Cycle
G0 X0 Z0 T0 M5

03
G0 X0 Z0.1
G1 X0 Z0 Start Of Part.
G05 X1.665 Z-4 I1.4419 K2.00 A1.665 B4 L0
G1 X4.2
M99

This is what I have put together thus far...and it still will not take it.

No idea what I'm doing wrong.
The program you pictured on screen: in the sub, add the line G0 X0 Z.1 at the start. Change the last X4. to X4.1. The statement on screen of "All dimensions are incremental" throws me. If they are indeed supposed to be incremental then B should be B-4.

03
G0 X0 Z0.1
G1 X0 Z0
G05 X1.665 Z-4 I0.00 K-4.00 A1.665 B-4.0 L0
G1 X4.1

10. Hot Rolled
Join Date
Jul 2005
Location
SE Michigan, USA
Posts
651
Post Thanks / Like
Likes (Given)
266
177
I don't know your control, but I'll take a stab at it.

G05 X1.665 Z-4. I1.4419 K-4. A1.665 B4. L1.

or

G05 X1.665 Z-4. I1.4419 K-4. A1.665 B-4. L1.

I'm not sure if B should be - or +, but i'm guessing +.

L is for CW/CCW (according to your help screen). Zero is neither. I'm guessing that you use a positive number for CCW, and a negative number for CW (probably doesn't need to be 1 or -1, but any positive or negative number [I'm basing that guess on how I'd write the macro {which is what you are dealing with}])

BTW, when you make typos, while posting code for people here to look over, it adds unnecessary confusion. Examples:
X4 Z0.1 M2
03

11. Plastic
Join Date
Feb 2011
Location
NY USA
Posts
43
Post Thanks / Like
Likes (Given)
7
2
I would also take the M2 out of the 6th line down. M2 = M30 = End of Program. I would think that makes the control stop right there and not process anything after that. M2 or M30 goes after the main program, but before the subs when you are using them.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•