Example: Measuring and reworking a rectangular stud
Program sequence
- Rough the rectangular stud with 0.5 mm finishing allowance
- Measure the rectangular stud
- Finish the rectangular stud, taking the measured values into account
0 BEGIN PGM TOUCHPROBE MM | |||
1 TOOL CALL 5 Z S6000 | ; Tool call: roughing | ||
2 Q1 = 81 | ; Rectangle length in X (roughing dimension) | ||
3 Q2 = 61 | ; Rectangle length in Y (roughing dimension) | ||
4 L Z+100 R0 FMAX M3 | ; Retract the tool | ||
5 CALL LBL 1 | ; Call the subprogram for machining | ||
6 L Z+100 R0 FMAX | ; Retract the tool | ||
7 TOOL CALL 600 Z | ; Call the touch probe | ||
8 TCH PROBE 424 MEAS. RECTAN. OUTS. ~ | |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
9 Q1 = Q1 - Q164 | ; Calculate the length in X based on the measured deviation | ||
10 Q2 = Q2 - Q165 | ; Calculate the length in Y based on the measured deviation | ||
11 L Z+100 R0 FMAX | ; Retract the touch probe | ||
12 TOOL CALL 25 Z S8000 | ; Tool call: finishing | ||
13 L Z+100 R0 FMAX M3 | ; Retract the tool | ||
14 CALL LBL 1 | ; Call the subprogram for machining | ||
15 L Z+100 R0 FMAX | |||
16 M30 | ; End of program | ||
17 LBL 1 | ; Subprogram with rectangular stud machining cycle | ||
18 CYCL DEF 256 RECTANGULAR STUD ~ | |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
19 L X+50 Y+50 R0 FMAX M99 | ; Cycle call | ||
20 LBL 0 | ; End of subprogram | ||
21 END PGM TOUCHPROBE MM |