beautypg.com

HEIDENHAIN TNC 407 (280 580) ISO Programming User Manual

Page 217

background image

TNC 426/TNC 425/TNC 415 B/TNC 407

7 - 2 8

7

Programming with Q Parameters

7.9

Programming Examples

N220 G98 L1 * ........................................................... Subprogram bolt hole circle
N230 D00 Q10 P01 +0 * ............................................ Set the counter for finished holes
N240 D10 P01 +Q6 P02 +0 P03 +10 * ...................... If the hole angle increment has been entered, jump to LBL 10
N250 D04 Q6 P01 +360 P02 +Q3 * ........................... Calculate the hole angle increment, distribute holes over 360°
N260 G98 L10 *
N270 D01 Q11 P01 +Q5 P02 +Q6 * .......................... Calculate second hole position from the start angle and hole

angle increment

N280 G90 I+Q1 J+Q2 G00 G40 * ............................. Set pole at bolt circle center
N290 G10 R+Q4 H+Q5 M3 * .................................... Move in the plane to first hole
N300 G00 Z+Q7 M99 * ............................................. Move in Z to setup clearance, call cycle
N310 D01 Q10 P01 +Q10 P02 +1 * .......................... Count completed holes
N320 D09 P01 +Q10 P02 +Q3 P03 99 * .................. Finished?
N330 G98 L2 *
N340 G10 G40 G90 R+Q4 H+Q11 M99 * ................ Drill second hole and further holes
N350 D01 Q10 P01 +Q10 P02 +1 * .......................... Count finished holes
N360 D01 Q11 P01 +Q11 P02 +Q6 * ....................... Calculate angle for next hole
N370 D12 P01 +Q10 P02 +Q3 P03 2 * .................... Not finished?
N380 G98 L99 *
N390 G00 G91 Z+200 * ............................................ Retract in Z
N400 G98 L0 * ........................................................... End of subprogram
N99999 % BOLTCIRC G71 *