Example: Coordinate conversion cycles
Program sequence
- Program the coordinate transformations in the main program
- Machining within a subprogram
NC programs contained in this User's Manual are suggestions for solutions. The NC programs or individual NC blocks must be adapted before being used on a machine.
Change the following contents as needed:
- Tools
- Cutting parameters
- Feed rates
- Clearance height or safe position
- Machine-specific positions (e.g., with M91)
- Paths of program calls
Some NC programs depend on the machine kinematics. Adapt these NC programs to your machine kinematics before the first test run.
In addition, test the NC programs using the simulation before the actual program run.
With a program test you determine whether the NC program can be used with the available software options, the active machine kinematics and the current machine configuration.
0 BEGIN PGM C220 MM | |
1 BLK FORM 0.1 Z X+0 Y+0 Z-20 | |
2 BLK FORM 0.2 X+130 Y+130 Z+0 | |
3 TOOL CALL 1 Z S4500 | ; Tool call |
4 L Z+100 R0 FMAX M3 | ; Retract the tool |
5 TRANS DATUM AXIS X+65 Y+65 | ; Shift datum to center |
6 CALL LBL 1 | ; Call milling operation |
7 LBL 10 | ; Set label for program-section repeat |
8 CYCL DEF 10.0 ROTATION | |
9 CYCL DEF 10.1 IROT+45 | |
10 CALL LBL 1 | ; Call milling operation |
11 CALL LBL 10 REP6 | ; Jump back to LBL 10; repeat six times |
12 CYCL DEF 10.0 ROTATION | |
13 CYCL DEF 10.1 ROT+0 | |
14 TRANS DATUM RESET | ; Reset datum shift |
15 L Z+250 R0 FMAX | ; Retract the tool |
16 M30 | ; End of program run |
17 LBL 1 | ; Subprogram 1 |
18 L X+0 Y+0 R0 FMAX | ; Define milling operation |
19 L Z+2 R0 FMAX | |
20 L Z-5 R0 F200 | |
21 L X+30 RL | |
22 L IY+10 | |
23 RND R5 | |
24 L IX+20 | |
25 L IX+10 IY-10 | |
26 RND R5 | |
27 L IX-10 IY-10 | |
28 L IX-10 IY-10 | |
29 L IX-20 | |
30 L IY+10 | |
31 L X+0 Y+0 R0 F5000 | |
32 L Z+20 R0 FMAX | |
33 LBL 0 | |
34 END PGM C220 MM |