HEIDENHAIN TNC 360 User Manual User Manual
Page 150
TNC 360
7-16
7
Programming with Q Parameters
27 LBL 1 ..................................................................... Subprogram bolt hole circle
28 FN 0: Q10 = +0 ..................................................... Set the counter for finished holes
29 FN 10: IF +Q6 NE +0 GOTO LBL 10 .................... If the hole angle increment has been entered, jump to LBL 10
30 FN 4: Q6 = +360 DIV +Q3 .................................... Calculate the hole angle increment, distribute holes over 360°
31 LBL 10
32 FN 1: Q11 = +Q5 + +Q6 ....................................... Calculate second hole position from the start angle and hole
angle increment
33 CC X+Q1 Y+Q2 .................................................... Set pole at bolt hole circle center
34 LP PR+Q4 PA+Q5 R0 F MAX M3 ........................ Move in the plane to 1st hole
35 L Z+Q7 R0 F MAX M99 ........................................ Move in Z to setup clearance, call cycle
36 FN 1: Q10 = +Q10 + +1 ....................................... Count finished holes
37 FN 9: IF +Q10 EQU +Q3 GOTO LBL 99 ............... Finished?
38 LBL 2
39 LP PR+Q4 PA+Q11 R0 F MAX M99 .................... Make a second and further holes
40 FN 1: Q10 = +Q10 + +1 ....................................... Count finished holes
41 FN 1: Q11 = +Q11 + +Q6 ..................................... Calculate angle for next hole
(update)
42 FN 12: IF + Q10 LT + Q3 GOTO LBL 2 ................ Not finished?
43 LBL 99
44 L Z+200 R0 F MAX ............................................... Retract in Z
45 LBL 0 ..................................................................... End of subprogram
46 END PGM 3600715 MM
7.8
Examples for Exercise