CNC Programming Labels

CNC Programming Labels
A brief introduction into labels, Basically a label holds a section of a program that can be repeated, for example you wanted to centre drill, drill and tap several holes, with labels you only have to program the positions once.

In the example below LBL 1 holds all the positions you need place all Labels at the end of your program and call them when required using Lbl call 1 etc.

Below is an example using Label repeat using a nested label, NOTE! the incremental x and z figures on line 10 are used to generate the angle.

0 BEGIN PGM SPIANGLE MM
1 BLK FORM 0.1 Z X-100 Y-100 Z-25
2 BLK FORM 0.2 X+100 Y+100 Z+0
3 TOOL DEF 1
4 TOOL CALL 1 Z S3000
5 L M6
6 L X+0 Y+0 Z+1 R0 F7200 M3
7 L X+83.59 F7200
8 L Z+0 R0 F7200
9 LBL 2
10 L IX-0.013 IZ-0.102 F2500
11 CC X+0 Y+0
12 CP IPA+360 DR+ F3000
13 LBL 3
14 CALL LBL 2 REP 239/239
15 LBL 0
16 L Z+250 R0 F7200 M5
17 END PGM SPIANGLE MM

Label Call repeat Example and drilling cycle
0 BEGIN PGM PEGDRILL MM
1 BLK FORM 0.1 Z X-10 Y-10 Z-35
2 BLK FORM 0.2 X+230 Y+20 Z+0
3 TOOL DEF 5
4 TOOL CALL 5 Z S3200
5 L M6
6 CYCL DEF 1.0 PECKING
7 CYCL DEF 1.1 PITCH -10
8 CYCL DEF 1.2 DEPTH -26
9 CYCL DEF 1.3 PECKG -13
10 CYCL DEF 1.4 DWELL 0
11 CYCL DEF 1.5 F470
12 L X+0 Y+0 R0 F7200 M13
13 L Z+10 R0 F7200 M13
14 CYCL CALL
15 LBL 2
16 L IX+20 R0 F MAX
17 CYCL CALL
18 LBL 3
19 CALL LBL 2 REP 8/8
20 LBL 0
21 L X+0 Y+400 R0 F7200 M5
22 END PGM PEGDRILL MM