
Programming Q Parameters | Programming examples
10
HEIDENHAIN | TNC 640 | Conversational Programming User's Manual | 10/2017
475
21 LBL 10
Subprogram 10: Machining operation
22 Q16 = Q6 -Q10 - Q108
Account for allowance and tool, based on the cylinder radius
23 FN 0: Q20 = +1
Set counter
24 FN 0: Q24 = +Q4
Copy starting angle in space (Z/X plane)
25 Q25 = (Q5 -Q4) / Q13
Calculate angle increment
26 CYCL DEF 7.0 DATUM SHIFT
Shift datum to center of cylinder (X axis)
27 CYCL DEF 7.1 X+Q1
28 CYCL DEF 7.2 Y+Q2
29 CYCL DEF 7.3 Z+Q3
30 CYCL DEF 10.0 ROTATION
Account for rotational position in the plane
31 CYCL DEF 10.1 ROT+Q8
32 L X+0 Y+0 R0 FMAX
Pre-position in the plane to the cylinder center
33 L Z+5 R0 F1000 M3
Pre-position in the spindle axis
34 LBL 1
35 CC Z+0 X+0
Set pole in the Z/X plane
36 LP PR+Q16 PA+Q24 FQ11
Move to starting position on cylinder, plunge-cutting
obliquely into the material
37 L Y+Q7 R0 FQ12
Longitudinal cut in Y+ direction
38 FN 1: Q20 = +Q20 + +1
Update the counter
39 FN 1: Q24 = +Q24 + +Q25
Update solid angle
40 FN 11: IF +Q20 GT +Q13 GOTO LBL 99
Finished? If finished, jump to end
41 LP PR+Q16 PA+Q24 FQ11
Move on an approximated arc for the next longitudinal cut
42 L Y+0 R0 FQ12
Longitudinal cut in Y– direction
43 FN 1: Q20 = +Q20 + +1
Update the counter
44 FN 1: Q24 = +Q24 + +Q25
Update solid angle
45 FN 12: IF +Q20 LT +Q13 GOTO LBL 1
Unfinished? If not finished, return to LBL 1
46 LBL 99
47 CYCL DEF 10.0 ROTATION
Reset the rotation
48 CYCL DEF 10.1 ROT+0
49 CYCL DEF 7.0 DATUM SHIFT
Reset the datum shift
50 CYCL DEF 7.1 X+0
51 CYCL DEF 7.2 Y+0
52 CYCL DEF 7.3 Z+0
53 LBL 0
End of subprogram
54 END PGM CYLIN
Summary of Contents for TNC 640
Page 4: ......
Page 5: ...Fundamentals ...
Page 36: ...Contents 36 HEIDENHAIN TNC 640 Conversational Programming User s Manual 10 2017 ...
Page 67: ...1 First Steps with the TNC 640 ...
Page 90: ......
Page 91: ...2 Introduction ...
Page 130: ......
Page 131: ...3 Operating the Touchscreen ...
Page 144: ......
Page 145: ...4 Fundamentals File Management ...
Page 206: ......
Page 207: ...5 Programming Aids ...
Page 236: ......
Page 237: ...6 Tools ...
Page 281: ...7 Programming Contours ...
Page 333: ...8 Data Transfer from CAD Files ...
Page 355: ...9 Subprograms and Program Section Repeats ...
Page 374: ......
Page 375: ...10 Programming Q Parameters ...
Page 478: ......
Page 479: ...11 Miscellaneous Functions ...
Page 501: ...12 Special Functions ...
Page 584: ......
Page 585: ...13 Multiple Axis Machining ...
Page 650: ......
Page 651: ...14 Pallet Management ...
Page 664: ......
Page 665: ...15 Batch Process Manager ...
Page 673: ...16 Turning ...
Page 713: ...17 Manual Operation and Setup ...
Page 797: ...18 Positioning with Manual Data Input ...
Page 803: ...19 Test Run and Program Run ...
Page 843: ...20 MOD Functions ...
Page 881: ...21 Tables and Overviews ...