10 .1 0 pr og ra m m ing exam ple s – HEIDENHAIN TNC 410 ISO Programming User Manual

Page 383

Advertising
background image

HEIDENHAIN TNC 410, TNC 426, TNC 430

357

1

0

.1

0 Pr

og

ra

m

m

ing

Exam

ple

s

N200 G98 L10 *

Subprogram 10: Machining operation

N210 G54 X+Q1 Y+Q2 *

Shift datum to center of ellipse

N220 G73 G90 H+Q8 *

Account for rotational position in the plane

N230 Q35 = (Q6 - Q5) / Q7

Calculate angle increment

N240 D00 Q36 P01 +Q5 *

Copy starting angle

N250 D00 Q37 P01 +0 *

Set counter

N260 Q21 = Q3 * COS Q36

Calculate X coordinate for starting point

N270 Q22 = Q4 * SIN Q36

Calculate Y coordinate for starting point

N280 G00 G40 X+Q21 Y+Q22 M3 *

Move to starting point in the plane

N290 Z+Q12 *

Pre-position in tool axis to setup clearance

N300 G01 Z-Q9 FQ10 *

Move to working depth

N310 G98 L1 *

N320 Q36 = Q36 + Q35

Update the angle

N330 Q37 = Q37 + 1

Update the counter

N340 Q21 = Q3 * COS Q36

Calculate the current X coordinate

N350 Q22 = Q4 * SIN Q36

Calculate the current Y coordinate

N360 G01 X+Q21 Y+Q22 FQ11 *

Move to next point

N370 D12 P01 +Q37 P02 +Q7 P03 1 *

Unfinished? If not finished return to label 1

N380 G73 G90 H+0 *

Reset the rotation

N390 G54 X+0 Y+0 *

Reset the datum shift

N400 G00 G40 Z+Q12 *

Move to setup clearance

N410 G98 L0 *

End of subprogram

N999999 %ELLIPSIS G71 *

Advertising