HEIDENHAIN TNC 407 (280 580) User Manual User Manual
Page 206
7-21
TNC 425/TNC 415 B/TNC 407
7
Programming with Q Parameters
20 LBL 10
21 CYCL DEF 7.0 DATUM SHIFT
22 CYCL DEF 7.1 X+Q1
23 CYCL DEF 7.2 Y+Q2 ............................................. Shift datum to center of ellipse
24 CYCL DEF 10.0 ROTATION
25 CYCL DEF 10.1 ROT +Q8 ..................................... Activate rotation, if Q8 is loaded
26 Q35 = (Q6 - Q5) / Q7 ............................................ Calculate angle increment (end angle to start angle
divided by number of steps)
27 Q36 = Q5 .............................................................. Current angle for calculation =
set start angle
28 Q37 = 0 ................................................................. Set counter for milled steps
29 Q21 = Q3 * COS Q36 ........................................... Calculate X coordinate of start point
30 Q22 = Q4 * SIN Q36 ............................................ Calculate Y coordinate of start point
31 L X+Q21 Y+Q22 R0 F MAX M3 ........................... Move to start point in the plane
32 L Z+Q12 R0 F MAX .............................................. Rapid traverse in Z to setup clearance
33 L Z–Q9 R0 FQ10 ................................................... Plunge to milling depth at plunging feed rate
34 LBL 1
35 Q36 = Q36 + Q35 ................................................. Update the angle
36 Q37 = Q37 + 1 ...................................................... Update the counter
37 Q21 = Q3 *COS Q36 ............................................ Calculate the next X coordinate
38 Q22 = Q4 * SIN Q36 ............................................ Calculate the next Y coordinate
39 L X+Q21 Y+Q22 R0 FQ11 .................................... Move to next point
40 FN 12: IF +Q37 LT +Q7 GOTO LBL 1 .................. Unfinished?
41 CYCL DEF 10.0 ROTATION
42 CYCL DEF 10.1 ROT+0 ......................................... Reset rotation
43 CYCL DEF 7.0 DATUM SHIFT
44 CYCL DEF 7.1 X+0
45 CYCL DEF 7.2 Y+0 ................................................ Reset datum shift
46 L Z+Q12 R0 F MAX .............................................. Move in Z to setup clearance
47 LBL 0 ..................................................................... End of subprogram
48 END PGM K72 MM