1. ## Milling an Ellipse

Hi,

I hope I am here at the right location. Anyway, today I've taken my first steps in programming CNC. I have an task for school to build a program in wich there also have to be milled a few ellipses.

The problem is... I can't figure out the right code. So I hope you can help me?

This is what i've made from it right now.

BEGIN PGM2005 ELLIPS
BLK FORM 0.1 Z X-100 Y-50 Z-2
BLK FORM 0.2 X+400 Y+50 Z0
TOOL DEF 10 L0 R2
FN0: Q20:+2
FN0: Q21:+0
FN0: Q22:+30
FN0: Q23:+50
TOOL CALL 10 Z S3000
L X+0 Y+0 Ro F5000 M06
LBL 1
FN6: Q24=SIN+Q21
FN7: Q25=COS+21
FN3: Q24=Q24*Q22
FN3: Q25=Q25*Q23
L XQ25 YQ24 RL F500 M03
L Z-2 RL F M
FN1: Q21=Q21+Q20
FN12: IF Q21 LT 360 GOTO LBL 1
L Z+100
L X0 Y0 Ro F5000
L Y100
STOP M02

2. Hallo Dave

try this one: (written for Heidenhain 355)
.
.
D0 P1 Q1 P2 40 x Radius
D0 P1 Q2 P2 30 y Radius
D0 P1 Q3 P2 10 angle inkr.
D0 P1 Q4 P2 0 angle start
D0 P1 Q5 P2 0 cos x
D0 P1 Q6 P2 0 sin y
D0 P1 Q7 P2 0 value x
D0 P1 Q8 P2 0 value y
G98 L20 UP Nr.
D1 P1 Q4 P2 Q4 P3 Q3 next angle
D7 P1 Q5 P2 Q4 cos angle
D6 P1 Q6 P2 Q4 sin angle
D3 P1 Q7 P2 Q5 P3 Q1
D3 P1 Q8 P2 Q6 P3 Q2
G3 XQ7 YQ8 R (average) Fx
L20,35
.
.

Ciao
Urs

3. ## Computing the coordinates of an ellipse

I do not know if this will be usefull to you. The attached pictures shows how to get the coordinates of an ellipse.