10 programming examples, Example: coordinate transformation cycles – HEIDENHAIN TNC 640 (34059x-01) Cycle programming User Manual
Page 266

266
Cycles: Coordinate Transformations
1
1
.1
0 Pr
ogr
amming Examples
11.10 Programming Examples
Example: Coordinate transformation cycles
Program sequence
Program the coordinate transformations in
the main program
Machining within a subprogram
0 BEGIN PGM COTRANS MM
1 BLK FORM 0.1 Z X+0 Y+0 Z-20
Definition of workpiece blank
2 BLK FORM 0.2 X+130 Y+130 Z+0
3 TOOL CALL 1 Z S4500
Tool call
4 L Z+250 R0 FMAX
Retract the tool
5 CYCL DEF 7.0 DATUM SHIFT
Shift datum to center
6 CYCL DEF 7.1 X+65
7 CYCL DEF 7.2 Y+65
8 CALL LBL 1
Call milling operation
9 LBL 10
Set label for program section repeat
10 CYCL DEF 10.0 ROTATION
Rotate by 45° (incremental)
11 CYCL DEF 10.1 IROT+45
12 CALL LBL 1
Call milling operation
13 CALL LBL 10 REP 6/6
Return jump to LBL 10; repeat the milling operation six times
14 CYCL DEF 10.0 ROTATION
Reset the rotation
15 CYCL DEF 10.1 ROT+0
16 CYCL DEF 7.0 DATUM SHIFT
Reset the datum shift
17 CYCL DEF 7.1 X+0
X
Y
65
65
130
130
45°
X
20
30
10
R5
R5
10
10