beautypg.com

9 q p ar amet ers with special f u nctions – HEIDENHAIN TNC 406 User Manual

Page 230

background image

HEIDENHAIN TNC 406, TNC 416

209

1

0.9 Q P

ar

amet

ers with Special F

u

nctions

20 L Z+250 R0 F MAX M

Retract electrode

21 CALL LBL 10

Call machining operation

22 L Z+100 R0 F MAX M2

Retract in the tool axis, end program

23 LBL 10

Subprogram 10: Machining operation

24 CYCL DEF 7.0 DATUM SHIFT

Shift datum to center of ellipse

25 CYCL DEF 7.1 X+Q1

26 CYCL DEF 7.2 Y+Q2

27 CYCL DEF 10.0 ROTATION

Account for rotational position in the plane

28 CYCL DEF 10.1 ROT+Q8

29 FN2 Q35 = Q6 - Q5

Starting angle - end angle

30 FN4 Q35 = Q35 DIV Q7

Calculate angle increment

31 FN0 Q37 = 0

Set counter

32 FN7 Q36 = COS Q5

33 FN3 Q21 = Q3 * Q36

Calculate X coordinate for starting point

34 FN7 Q36 = SIN Q5

35 FN3 Q22 = Q4 * Q36

Calculate Y coordinate for starting point

36 L X+Q21 Y+Q22 R0 F MAX M36

Move to starting point in the plane; eroding ON

37 L Z+Q12 R0 F MAX M

Pre-position in tool axis to setup clearance

38 L Z-Q9 R0 FQ10 M

Move to working depth

39 LBL 1

40 FN1 Q36 = Q5 + Q35

Update the angle

41 FN1 Q37 = Q37 + 1

Update the counter

42 FN7 Q38 = COS Q36

43 FN3 Q21 = Q3 * Q38

Calculate the current X coordinate

44 FN6 Q38 = SIN Q36

45 FN3 Q22 = Q4 * Q38

Calculate the current Y coordinate

46 L X+Q21 Y+Q22 R0 FQ11 M

Move to next point

47 FN 12: IF +Q37 LT +Q7 GOTO LBL 1

Unfinished? If not finished, return to LBL 1

48 CYCL DEF 10.0 ROTATION

Reset the rotation

49 CYCL DEF 10.1 ROT+0

50 CYCL DEF 7.0 DATUM SHIFT

Reset the datum shift

51 CYCL DEF 7.1 X+0

52 CYCL DEF 7.2 Y+0

53 L Z+Q12 R0 F MAX M37

Move to safety clearance; eroding OFF

54 LBL 0

End of subprogram

55 END PGM ELLIPSE MM

This manual is related to the following products: