What's new
What's new

Heidenhain TNC 151 Conversational Programming. Trying to learn to use LBL

shanghyd

Aluminum
Joined
Aug 15, 2008
Location
San Antonio, TX
I'm trying to learn how to use the LBL feature for part repeats. If I want to peck drill a series of holes. Or in case I want to perform milling several pockets at different spacing.
For now just drilling a series of holes along the x axis will be good enough.
I'll paste some example code from Helman CNC with comments in parentheses.
This looks to be code for a minimum TNC 155 with graphics. I have a TNC 151 with no graphics.
The code as written won't work on my machine. I need working code for my control if anyone knows how to make this code work.
Thanks in advance.
0 BEGIN PGM 10128 MM
1 BLK FORM 0.1 Z X+0 Y+0 Z-40 (For the graphic controller which I don't have)
2 BLK FORM 0.2 X+100 Y+50 Z+0 (For the graphic controller which I don't have)
3 TOOL DEF 1
4 TOOL CALL 1 Z S1000
5 L M6
(I understand how to setup a cycle. There is no cycle call though)
6 CYCL DEF 1.0 PECKING
7 CYCL DEF 1.1 SET UP -2
8 CYCL DEF 1.2 DEPTH -20
9 CYCL DEF 1.3 PECKG -10
10 CYCL DEF 1.4 DWELL 0
11 CYCL DEF 1.5 F500
(Move to the first coordinate)
12 L X+15 Y+30 R0 FMAX M13 (I don't have M13 in my manual)
13 L Z+2 FMAX M99
(move z axis to 2. Not sure about M99)
(define where the LBL starts)
14 LBL 1
(move incrementally the x axis)
15 L IX+10 FMAX M99
(Repeat 6 times. I don't see where the cycle is called to do the drilling)
16 CALL LBL 1 REP 6/6
17 TOOL CALL 0
18 L M6
19 L M30
20 END PGM 10128 MM
 
I'm trying to learn how to use the LBL feature for part repeats. If I want to peck drill a series of holes. Or in case I want to perform milling several pockets at different spacing.
For now just drilling a series of holes along the x axis will be good enough.
I'll paste some example code from Helman CNC with comments in parentheses.
This looks to be code for a minimum TNC 155 with graphics. I have a TNC 151 with no graphics.
The code as written won't work on my machine. I need working code for my control if anyone knows how to make this code work.

0 BEGIN PGM 10128 MM

get rid of this stuff, control won't like it

3 TOOL DEF 1 >>1 TOOL DEF 1 L+0,0000 R+0,0937 <<probably needs at least the L if not both
4 TOOL CALL 1 Z S1000

5 L M6


6 CYCL DEF 1.0 PECKING

7 CYCL DEF 1.1 SET UP -2

8 CYCL DEF 1.2 DEPTH -20

9 CYCL DEF 1.3 PECKG -10

10 CYCL DEF 1.4 DWELL 0

11 CYCL DEF 1.5 F500

(Move to the first coordinate)

12 L X+15 Y+30 R0 F2000 M13 (I don't have M13 in my manual)

13 L Z+2 F2000 M99

(move z axis to 2. Not sure about M99)

(define where the LBL starts)

14 LBL 1

15 CYCLE CALL

(move incrementally the x axis)

16 L IX+10 F2000 M99

17 LBL 0

(Repeat 6 times. I don't see where the cycle is called to do the drilling)

16 CALL LBL 1 REP 6/6

18 L M6

19 L M30

there is no FMAX on that control Fxxxx whatever the 10x the max feedrate on your machine is. I replaced with F2000 as 200ipm is the fastest on an interact etc
Don't think the M99 do anything you want. If you don't have a toolchanger get rid of M6
M13 is spindle cw coolant on, chagne to m3 if no separate coolant
 
Last edited:
Thank You. Here is the updated code. Does it look correct? I'm not at my machine so I can't run it yet.

0 BEGIN PGM 3 INCH
1 TOOL DEF 1
2 TOOL CALL 1 Z S1000
3 CYCL DEF 1.0 PECKING
4 CYCL DEF 1.1 SET UP -2
5 CYCL DEF 1.2 DEPTH -20
6 CYCL DEF 1.3 PECKG -10
7 CYCL DEF 1.4 DWELL 0
8 CYCL DEF 1.5 F500
9 L X+15 Y+30 R0 F1500 M03 (move to first point)
10 L Z+2 F1500 M
11 LBL 1
12 CYCLE CALL (drill hole at X+15 Y+30 ?)
13 L IX+10 F500 (incremental move X+10)
14 CALL LBL 1 REP 5 (total of 6 holes)
15 L M30
16 END PGM 3 INCH
 
0 BEGIN PGM 3 INCH
1 TOOL DEF 1 <<need length and diameter I think even if they are zero, or just call tool 0 for drilling, no TOOL DEF needed for tool 0
this right from a program in my computer:
TOOL DEF 1 L+0,0000 R+0,0937


2 TOOL CALL 1 Z S1000
3 CYCL DEF 1.0 PECKING
4 CYCL DEF 1.1 SET UP -2
5 CYCL DEF 1.2 DEPTH -20
6 CYCL DEF 1.3 PECKG -10
7 CYCL DEF 1.4 DWELL 0
8 CYCL DEF 1.5 F500
9 L X+15 Y+30 R0 F1500 M03 (move to first point)
10 L Z+2 F1500 M
11 LBL 1
12 CYCLE CALL (drill hole at X+15 Y+30 ?)
13 L IX+10 F500 (incremental move X+10)
LBL 0<<need this here or it will continue until drilling till end of travel or error for excessive subprogramming
14 CALL LBL 1 REP 5 (total of 6 holes)
15 L M30
16 END PGM 3 INCH
 








 
Back
Top