12 programming examples, Example: ellipse, Programming examples – HEIDENHAIN TNC 620 (81760x-02) ISO programming User Manual

Page 342

Advertising
background image

Programming: Q parameters

9.12 Programming examples

9

342

TNC 620 | User's ManualDIN/ISO Programming | 2/2015

9.12

Programming examples

Example: Ellipse

Program sequence

The contour of the ellipse is approximated by many

short lines (defined in Q7). The more calculation

steps you define for the lines, the smoother the curve

becomes.
The milling direction is determined with the starting

angle and end angle in the plane :

Machining direction is clockwise:

Starting angle > end angle

Machining direction is counterclockwise:

Starting angle < end angle
The tool radius is not taken into account

%ELLIPSE G71 *
N10 D00 Q1 P01 +50 *

Center in X axis

N20 D00 Q2 P01 +50 *

Center in Y axis

N30 D00 Q3 P01 +50 *

Semiaxis in X

N40 D00 Q4 P01 +30 *

Semiaxis in Y

N50 D00 Q5 P01 +0 *

Starting angle in the plane

N60 D00 Q6 P01 +360 *

End angle in the plane

N70 D00 Q7 P01 +40 *

Number of calculation steps

N80 D00 Q8 P01 +30 *

Rotational position of the ellipse

N90 D00 Q9 P01 +5 *

Milling depth

N100 D00 Q10 P01 +100 *

Feed rate for plunging

N110 D00 Q11 P01 +350 *

Feed rate for milling

N120 D00 Q12 P01 +2 *

Set-up clearance for pre-positioning

N130 G30 G17 X+0 Y+0 Z-20 *

Definition of workpiece blank

N140 G31 G90 X+100 Y+100 Z+0 *
N150 T1 G17 S4000 *

Tool call

N160 G00 G40 G90 Z+250 *

Retract the tool

N170 L10.0 *

Call machining operation

N180 G00 Z+250 M2 *

Retract the tool, end program

N190 G98 L10 *

Subprogram 10: Machining operation

N200 G54 X+Q1 Y+Q2 *

Shift datum to center of ellipse

N210 G73 G90 H+Q8 *

Account for rotational position in the plane

N220 Q35 = ( Q6 - Q5 ) / Q7 *

Calculate angle increment

N230 D00 Q36 P01 +Q5 *

Copy starting angle

N240 D00 Q37 P01 +0 *

Set counter

N250 Q21 = Q3 * COS Q36 *

Calculate X coordinate for starting point

N260 Q22 = Q4 * SIN Q36 *

Calculate Y coordinate for starting point

Advertising