![HEIDENHAIN TNC 407 User Manual Download Page 219](http://html1.mh-extra.com/html/heidenhain/tnc-407/tnc-407_user-manual_2118718219.webp)
TNC 426/TNC 425/TNC 415 B/TNC 407
7 - 3 0
7
Programming with Q Parameters
N200 G98 L10 *
N210 G54 X+Q1 Y+Q2 * ........................................... Shift datum to center of ellipse
N220 G73 G90 H+Q8 * ............................................. Activate rotation if Q8 is loaded
N230 Q35 = (Q6-Q5)/Q7 ............................................ Calculate angle increment (end angle to starting angle
divided by the number of steps)
N240 Q36 = Q5 ......................................................... Set current angle for calculation = starting angle
N250 Q37 = 0 ............................................................ Set counter for milled steps
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 G90 X+Q21 Y+Q22 M3 * ................. Move to starting point in the plane
N290 Z+Q12 * ........................................................... Rapid traverse in Z to setup clearance
N300 G01 Z-Q9 FQ10 * ............................................. Plunge to milling depth at plunging feed rate
N310 G98 L1 *
N320 Q36 = Q36 + Q35 ............................................ Update the angle
N330 Q37 = Q37 + 1 ................................................. Update the counter
N340 Q21 = Q3 * COS Q36 ...................................... Calculate the next X coordinate
N350 Q22 = Q4 * SIN 036 ......................................... Calculate the next Y coordinate
N360 G01 X+Q21 Y+Q22 FQ11 ................................ Move to next point
N370 D12 P01+Q37 P02+Q7 P031 * ........................ Not finished?
N380 G73 G90 H+0 * ................................................ Reset rotation
N390 G54 * ................................................................ Reset datum shift
N400 G00 G40 G90 Z+Q12 * .................................... Move in Z to setup clearance
N410 G98 L0 * ........................................................... End of subprogram
N99999 % ELLIPSE G71 *