Saturday, 9-July-2016

Custom Otside Hexagon - Heidenhain Program

Тhat is my idea of custom HEXAGON creating program. You can change only 2 variables and make your hexagon. The program is demonstrated with end mill 10mm but you can use any size and the program will use Q108(tool offset radius) to calculate position.

hexagon.jpg

0 BEGIN PGM test_hexagon MM
1 BLK FORM 0.1 Z X-60 Y-60 Z-2
2 BLK FORM 0.2 X+60 Y+60 Z+0.1
3 ;X0Y0 center, Z0-top
4 ;
5 FN 0: Q1 =+50 ;key size
6 FN 0: Q2 =+10 ;corner radius
7 ;
8 TOOL CALL 5 Z S6000
9 ;endmill 10mm
10 Q10 = Q1 / 2
11 Q15 = Q10 * 1.1547
12 Q20 = Q108 + 5
13 Q25 = Q10 + Q20
14 L X+0 Y+Q25 R0 FMAX
15 L Z+2 R0 FMAX M3
16 CC X+0 Y+0
17 L Z-2 R0 F1000
18 L X-Q20 RL
19 CR X+0 Y+Q10 R+Q20 DR+
20 LP PR+Q15 PA+60
21 RND RQ2
22 LBL 1
23 LP IPA-60
24 RND RQ2
25 CALL LBL 1 REP4
26 L X+0
27 CR X+Q20 Y+Q25 R+Q20 DR+
28 L Z+150 R0 FMAX M2
29 END PGM test_hexagon MM