User's Manual TNC 360 (from 259 900-11) - heidenhain
User's Manual TNC 360 (from 259 900-11) - heidenhain
User's Manual TNC 360 (from 259 900-11) - heidenhain
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
7 Programming with Q Parameters<br />
7.8 Examples for Exercise<br />
7-18<br />
20 LBL 10<br />
21 CYCL DEF 7.0 DATUM SHIFT<br />
22 CYCL DEF 7.1 X+Q1<br />
23 CYCL DEF 7.2 Y+Q2 ............................................. Shift datum to center of ellipse<br />
24 CYCL DEF 10.0 ROTATION<br />
25 CYCL DEF 10.1 ROT +Q8 ..................................... Activate rotation, if Q8 is loaded<br />
26 FN2: Q35 = +Q6 – +Q5 ........................................ Calculate angle increment (end angle to start angle<br />
divided by number of steps)<br />
27 FN4: Q35 = +Q35 DIV +Q7 .................................. Current angle for calculation =<br />
set start angle<br />
28 FN0: Q36 = +Q5 ................................................... Set counter for milled steps<br />
29 FN0: Q37 = +0 ...................................................... Call subprogram for calculating the points of the ellipse<br />
30 CALL LBL <strong>11</strong> REP ................................................. Call subprogram for calculating the points of the ellipse<br />
31 L X+Q21 Y+Q22 R0 F MAX M03 ......................... Move to start point in the plane<br />
32 L Z+Q12 R0 F MAX M .......................................... Rapid traverse in Z to setup clearance<br />
33 L Z–Q9 R0 FQ10 M ............................................... Plunge to milling depth at plunging feed rate<br />
34 LBL 1<br />
35 FN1: Q36 = +Q36 + +Q35.................................... Update the angle<br />
36 FN1: Q37 = +Q37 + +1 ........................................ Update the counter<br />
37 CALL LBL<strong>11</strong> REP .................................................. Call subprogram for calculating the points of the ellipse<br />
38 L X+Q21 Y+Q22 R0 FQ<strong>11</strong> M ................................ Move to next point<br />
39 FN 12: IF +Q37 LT +Q7 GOTO LBL 1 .................. Unfinished?<br />
40 CYCL DEF 10.0 ROTATION<br />
41 CYCL DEF 10.1 ROT+0 ......................................... Reset rotation<br />
42 CYCL DEF 7.0 DATUM SHIFT<br />
43 CYCL DEF 7.1 X+0<br />
44 CYCL DEF 7.2 Y+0 ................................................ Reset datum shift<br />
45 L Z+Q12 R0 F MAX M .......................................... Move in Z to setup clearance<br />
46 LBL 0 ..................................................................... End of subprogram for milling the ellipse<br />
47 LBL <strong>11</strong><br />
48 FN7: Q21 = COS + Q36<br />
49 FN3: Q21 = +Q21* + Q3 ...................................... Calculate X coordinate<br />
50 FN6: Q22 = SIN + Q36<br />
51 FN3: Q22 = +Q22 * +Q4 ...................................... Calculate Y coordinate<br />
52 LBL 0<br />
53 END PGM <strong>360</strong>079 MM<br />
<strong>TNC</strong> <strong>360</strong>