beautypg.com

Ellipse, Yx y x – HEIDENHAIN TNC 407 (280 580) ISO Programming User Manual

Page 218

background image

7-29

TNC 426/TNC 425/TNC 415 B/TNC 407

7

Programming with Q Parameters

7.9

Programming Examples

Part program

% Ellipse G71 * .......................................................... Load data
N10 D00 Q1 P01 +50 * .............................................. X coordinate for center of ellipse
N20 D00 Q2 P01 +50 * .............................................. Y coordinate for center of ellipse
N30 D00 Q3 P01 +50 * .............................................. Semiaxis in X
N40 D00 Q4 P01 +20 * .............................................. Semiaxis in Y
N50 D00 Q5 P01 +0 * ................................................ Starting angle
N60 D00 Q6 P01 +360 * ............................................ End angle
N70 D00 Q7 P01 +40 * .............................................. Number of calculation steps
N80 D00 Q8 P01 +0 * ................................................ Rotational position
N90 D00 Q9 P01 +10 * .............................................. Depth
N100 D00 Q10 P01 +100 * ....................................... Plunging feed rate
N110 D00 Q11 P01 +350 * ....................................... Milling feed rate
N120 D00 Q12 P01 +2 * ............................................ Setup clearance in Z
N130 G30 G17 X+0 Y+0 Z-20 *
N140 G31 G90 X+100 Y+100 Z+0 *
N150 G99 T1 L+0 R+2.5 *
N160 T1 G17 *
N170 G00 G40 G90 Z+200 *
N180 L10,0 * .............................................................. Execute subprogram ellipse
N190 G00 Z+200 M2*

Ellipse

X-coordinate calculation: X =

a cos

α

Y-coordinate calculation: Y =

b sin

α

a, b : Semimajor and semiminor axes of

the ellipse

α

: Angle between the leading axis and

the connecting line from P to the
center of the ellipse.

X

0

, Y

0

: Center of the ellipse

The points of the ellipse are calculated and
connected by many short lines. The more
points that are calculated and the shorter the
lines connecting them, the smoother the
curve becomes.

The machining direction can be altered by
changing the entries for the starting angle
and end angle.

The input parameters are listed below in
blocks N10 to N120. Calculations are
programmed with the FORMULA function.

Continued on next page...

Y

X

Y

X

Y

1

X

2

X

1

Y

2

–b

b

a

–a

α

1

α

2

Q5

Q4

α

S

DR–

α

0

α

E

P