1 |
(S402G5LR) |
<> |
1 |
(S450G5LR) |
2 |
|
= |
|
|
3 |
(OPERATOR INPUT PARAMETERS) |
|
2 |
(OPERATOR INPUT PARAMETERS) |
4 |
#<_right_mm_to_basin_centre>=772 |
|
3 |
#<_right_mm_to_basin_centre>=772 |
5 |
#<_back_to_front_mm_to_edge_of_basin_lip>=103 |
|
4 |
#<_back_to_front_mm_to_edge_of_basin_lip>=103 |
6 |
#<_stone_thickness>=20 |
|
5 |
#<_stone_thickness>=20 |
7 |
#<_core_drill_dia_mm>=20 |
|
6 |
#<_core_drill_dia_mm>=20 |
|
23 |
#<_drill_start_offset>=3 |
= |
22 |
#<_drill_start_offset>=3 |
24 |
#<_phase_in_mm>=10 |
|
23 |
#<_phase_in_mm>=10 |
25 |
#<_tool_change_position_y>=-500 |
|
24 |
#<_tool_change_position_y>=-500 |
26 |
(PARAMETER FORMULAS) |
|
25 |
(PARAMETER FORMULAS) |
27 |
#<_phase_out_mm>=[#<_phase_in_mm>*2] |
|
26 |
#<_phase_out_mm>=[#<_phase_in_mm>*2] |
28 |
#<_fb_rl_move>=[#<_sink_hole_mm_lr>/2-[#<_sink_hole_rad_mm>-#<_required_oh_mm>]-#<_phase_in_mm>] |
|
27 |
#<_fb_rl_move>=[#<_sink_hole_mm_lr>/2-[#<_sink_hole_rad_mm>-#<_required_oh_mm>]-#<_phase_in_mm>] |
29 |
#<_start_point_y>=[#<_back_to_front_mm_to_edge_of_basin_lip>-#<_lip_width_of_basin_mm>-#<_required_oh_mm>+[#<_core_drill_dia_mm>/2]-#<_drill_start_offset>] |
<> |
28 |
#<_start_point_y>=[#<_back_to_front_mm_to_edge_of_basin_lip>-#<_lip_width_of_basin_mm>-#<_required_oh_mm>+#<_core_drill_dia_mm>/2+#<_drill_start_offset>] |
30 |
#<_drill_depth>=[-#<_stone_thickness>-#<_drill_mm_past_bottom_of_piece>] |
= |
29 |
#<_drill_depth>=[-#<_stone_thickness>-#<_drill_mm_past_bottom_of_piece>] |
31 |
#<_cut_radius>=[#<_sink_hole_rad_mm>-#<_required_oh_mm>] |
|
30 |
#<_cut_radius>=[#<_sink_hole_rad_mm>-#<_required_oh_mm>] |
32 |
#<_back_rl_move>=[-[#<_sink_hole_mm_lr>/2]+#<_sink_hole_rad_mm>+#<_phase_in_mm>] |
<> |
31 |
#<_back_rl_move>=[-#<_sink_hole_mm_lr>/2+#<_sink_hole_rad_mm>+#<_phase_in_mm>] |
33 |
#<_left_rad_x>=[#<_right_mm_to_basin_centre>-[#<_sink_hole_mm_lr>/2]+#<_sink_hole_rad_mm>] |
|
32 |
#<_left_rad_x>=[#<_right_mm_to_basin_centre>-#<_sink_hole_mm_lr>/2+#<_sink_hole_rad_mm>] |
34 |
#<_back_rad_y>=[#<_back_to_front_mm_to_edge_of_basin_lip>+#<_lip_width_of_basin_mm>-#<_sink_hole_rad_mm>] |
|
33 |
#<_back_rad_y>=[#<_back_to_front_mm_to_edge_of_basin_lip>+#<_lip_width_of_basin_mm>+#<_sink_hole_rad_mm>] |
35 |
#<_left_bf_move>=[-#<_sink_hole_mm_bf>+[#<_sink_hole_rad_mm>*2]] |
|
34 |
#<_left_bf_move>=[-#<_sink_hole_mm_bf>+#<_sink_hole_rad_mm>*2] |
36 |
#<_front_rad_y>=[#<_back_rad_y>+#<_left_bf_move>] |
|
35 |
#<_front_rad_y>=[#<_left_rad_x>+#<_left_bf_move>] |
37 |
#<_front_lr_move>=[#<_sink_hole_mm_lr>-[#<_sink_hole_rad_mm>*2]] |
|
36 |
#<_front_lr_move>=[#<_sink_hole_mm_lr>-#<_sink_hole_rad_mm>*2] |
38 |
#<_right_rad_x>=[#<_right_mm_to_basin_centre>+[#<_sink_hole_mm_lr>/2]-#<_sink_hole_rad_mm>] |
|
37 |
#<_right_rad_x>=[#<_right_mm_to_basin_centre>+#<_sink_hole_mm_lr>/2-#<_sink_hole_rad_mm>] |
39 |
#<_right_fb_move>=[#<_sink_hole_mm_bf>-[#<_sink_hole_rad_mm>*2]] |
|
38 |
#<_right_fb_move>=[#<_sink_hole_mm_bf>-#<_sink_hole_rad_mm>*2] |
40 |
#<_back_final_move>=[[#<_front_lr_move>/2]+#<_phase_out_mm>] |
|
39 |
#<_back_final_move>=[#<_front_lr_move>/2+#<_phase_out_mm>] |
41 |
#<_groove_start_right_x>=[[#<_right_mm_to_basin_centre>+[#<_sink_hole_mm_lr>-[2*#<_required_oh_mm>]]/2]-[#<_ball_end_dia_mm>/2]] |
|
40 |
#<_groove_start_right_x>=[#<_right_mm_to_basin_centre>+[#<_sink_hole_mm_lr>-[2*#<_required_oh_mm>]]/2-#<_ball_end_dia_mm>/2] |
42 |
#<_groove_start_y>=#<_front_rad_y> |
= |
41 |
#<_groove_start_y>=#<_front_rad_y> |
43 |
#<_groove_start_z>=[-#<_grooves_start_depth_mm>] |
|
42 |
#<_groove_start_z>=[-#<_grooves_start_depth_mm>] |
44 |
#<_groove_move_right_x>=[#<_grooves_length_mm>+[#<_ball_end_dia_mm>/2]] |
<> |
43 |
#<_groove_move_right_x>=[#<_grooves_length_mm>+#<_ball_end_dia_mm>/2] |
45 |
#<_groove_start_left_x>=[[#<_right_mm_to_basin_centre>-[#<_sink_hole_mm_lr>-[2*#<_required_oh_mm>]]/2]+[#<_ball_end_dia_mm>/2]] |
|
44 |
#<_groove_start_left_x>=[#<_right_mm_to_basin_centre>-[#<_sink_hole_mm_lr>-2*#<_required_oh_mm>]/2+#<_ball_end_dia_mm>/2] |
46 |
#<_groove_move_left_x>=[-#<_grooves_length_mm>-[#<_ball_end_dia_mm>/2]] |
|
45 |
#<_groove_move_left_x>=[-#<_grooves_length_mm>-#<_ball_end_dia_mm>/2] |
47 |
#<_grooves_count>=0 |
= |
46 |
#<_grooves_count>=0 |
48 |
#<_grooves_spacing_left_y>=[[#<_sink_hole_mm_bf>-[2*#<_required_oh_mm>]-[2*#<_cut_radius>]]/[#<_qty_of_left_grooves>-1]] |
<> |
47 |
#<_grooves_spacing_left_y>=[#<_sink_hole_mm_bf>-2*#<_required_oh_mm>-2*#<_cut_radius>]/[#<_qty_of_left_grooves>-1] |
49 |
#<_grooves_spacing_right_y>=[[#<_sink_hole_mm_bf>-[2*#<_required_oh_mm>]-[2*#<_cut_radius>]]/[#<_qty_of_right_grooves>-1]] |
|
48 |
#<_grooves_spacing_right_y>=[#<_sink_hole_mm_bf>-2*#<_required_oh_mm>-2*#<_cut_radius>]/[#<_qty_of_right_grooves>-1] |
50 |
(START PROGRAM) |
= |
49 |
(START PROGRAM) |
51 |
o117 IF [#<_core_drill_dia_mm> GE #<_fingerbit_dia_mm>] |
+- |
|
|
52 |
G90 G21 G94 G17 G91.1 G54 G40 G49 G80 |
= |
50 |
G90 G21 G94 G17 G91.1 G54 G40 G49 G80 |
53 |
M9 (Coolant off) |
|
51 |
M9 (Coolant off) |
54 |
G0 G53 Z0. Y#<_tool_change_position_y> |
<> |
52 |
G53 G0 Z0. Y#<_tool_change_position_y> |
55 |
(DRILL START HOLE) |
= |
53 |
(DRILL START HOLE) |
56 |
T1 M6 (msg, Fit Core drill with 20mm dia and 118mm Height. M6 Tool Change Pause. Then start cycle) |
|
54 |
T1 M6 (msg, Fit Core drill with 20mm dia and 118mm Height. M6 Tool Change Pause. Then start cycle) |
57 |
G0 X#<_right_mm_to_basin_centre> Y#<_start_point_y> |
|
55 |
G0 X#<_right_mm_to_basin_centre> Y#<_start_point_y> |
58 |
G43 Z10. H1 |
|
56 |
G43 Z10. H1 |
|
|
-+ |
57 |
M0 (msg, Check if the tool is 10mm above top and at the correct position. If so, start cycle. If not, stop cycle.) |
59 |
M8 (Coolant On) |
= |
58 |
M8 (Coolant On) |
60 |
S3000 M3 (Spindle on Clockwise at rpm rate) |
|
59 |
S3000 M3 (Spindle on Clockwise at rpm rate) |
61 |
G54 G0 Z3. |
|
60 |
G54 G0 Z3. |
62 |
G81 G98 Z#<_drill_depth> R2.8 F20. |
<> |
61 |
G98 G81 Z#<_Drill Depth> F20. |
63 |
G80 |
= |
62 |
G80 |
64 |
G0 Z10. |
|
63 |
G0 Z10. |
65 |
M5 (Spindle Stop) |
|
64 |
M5 (Spindle Stop) |
66 |
M9 (Coolant off) |
|
65 |
M9 (Coolant off) |
67 |
(G53 G0 Z0.) |
<> |
66 |
G53 Z0. |
68 |
G90 G53 G0 Y#<_tool_change_position_y> Z0. |
|
67 |
G53 G0 Y#<_tool_change_position_y> |
69 |
(FINGERBIT CUTTING OF SINK CUT OUT) |
= |
68 |
(FINGERBIT CUTTING OF SINK CUT OUT) |
70 |
T2 M6 (msg, Fit Fingerbit with 20mm dia and 84mm Height. M6 Tool Change Pause. Then start cycle) |
|
69 |
T2 M6 (msg, Fit Fingerbit with 20mm dia and 84mm Height. M6 Tool Change Pause. Then start cycle) |
71 |
G43 G0 X#<_right_mm_to_basin_centre> Y#<_start_point_y> Z10. H2 |
<> |
70 |
G0 X#<_right mm to basin centre Y#<_start_point_y> Z10. H2 |
|
|
|
71 |
M0 (msg, Check if the tool is 10mm above top and at the correct position. If so, start cycle. If not, stop cycle and find problem.) |
72 |
M8 (coolant on) |
= |
72 |
M8 (coolant on) |
73 |
S4000 M3 (Turn on Spindle Clockwise) |
|
73 |
S4000 M3 (Turn on Spindle Clockwise) |
74 |
G0 Z3. |
|
74 |
G0 Z3. |
75 |
G64 P0.005 |
<> |
|
|
76 |
G1 Z#<_drill_depth> F333.33 |
|
75 |
G1 Z#<_Drill Depth> F333.33 |
77 |
G91 G1 X-#<_phase_in_mm> Y[[#<_back_rad_y>+#<_cut_radius>-[#<_fingerbit_dia_mm>/2]]-#<_start_point_y>] |
|
76 |
G91 G41 D2 G1 X[-#<_phase_in_mm>] Y[#<_drill start offset>+#<_fingerbit_dia_mm>/2] |
|
|
|
77 |
M0 (msg, Temporary Position Check) |
78 |
G1 X#<_back_rl_move> F60. |
= |
78 |
G1 X#<_back_rl_move> F60. |
|
|
<> |
79 |
M0 (msg, Temporary Position Check) |
79 |
G90 G3 X[#<_left_rad_x>-#<_cut_radius>+[#<_fingerbit_dia_mm>/2]] Y[#<_back_rad_y>] I0. J-[#<_cut_radius>-[#<_fingerbit_dia_mm>/2]] |
|
80 |
G90 G3 X[#<_left_rad_x>-#<_cut_radius>] Y#<_back_rad_y> I0. J[-#<_cut_radius>] |
|
|
|
81 |
M0 (msg, Temporary Position Check) |
80 |
G91 G1 Y#<_left_bf_move> (Incremental Mode) |
= |
82 |
G91 G1 Y#<_left_bf_move> (Incremental Mode) |
81 |
G90 G3 X[#<_left_rad_x>] Y[#<_front_rad_y>-#<_cut_radius>+[#<_fingerbit_dia_mm>/2]] I[#<_cut_radius>-[#<_fingerbit_dia_mm>/2]] J0 |
<> |
83 |
M0 (msg, Temporary Position Check) |
|
|
|
84 |
G90 G3 X#<_left_rad_x> Y#<_front_rad_y> I#<_cut_radius> J0 |
|
|
|
85 |
M0 (msg, Temporary Position Check) |
82 |
G91 G1 X#<_front_lr_move> (Incremental Mode) |
= |
86 |
G91 G1 X#<_front_lr_move> (Incremental Mode) |
|
|
<> |
87 |
M0 (msg, Temporary Position Check) |
83 |
G90 G3 X[#<_right_rad_x>+#<_cut_radius>-[#<_fingerbit_dia_mm>/2]] Y[#<_front_rad_y>] I0. J[#<_cut_radius>-[#<_fingerbit_dia_mm>/2]] |
|
88 |
G90 G3 X[#<_right_rad_x>+#<_cut_radius>] Y#<_front_rad_y> I0. J#<_cut_radius> |
|
|
|
89 |
M0 (msg, Temporary Position Check) |
84 |
G91 G1 Y#<_right_fb_move> (Incremental Mode) |
= |
90 |
G91 G1 Y#<_right_fb_move> (Incremental Mode) |
|
|
<> |
91 |
M0 (msg, Temporary Position Check) |
85 |
G90 G3 X[#<_right_rad_x>] Y[#<_back_rad_y>+#<_cut_radius>-[#<_fingerbit_dia_mm>/2]] I-[#<_cut_radius>-[#<_fingerbit_dia_mm>/2]] J0. |
|
92 |
G90 G3 X#<_right_rad_x> Y[#<_back_rad_y>+#<_cut_radius>] I[-#<_cut_radius>] J0. |
|
|
|
93 |
M0 (msg, Temporary Position Check) |
86 |
G91 G1 X-#<_back_final_move> (Incremental Mode) |
|
94 |
G91 G1 X#<_back_final_move> (Incremental Mode) |
|
|
|
95 |
M0 (msg, Temporary Position Check) |
87 |
G1 X[-#<_phase_out_mm>] Y[-#<_drill_start_offset>-[#<_fingerbit_dia_mm>/2]] |
|
96 |
G1 X[-#<_phase_out_mm>] Y[-#<_drill start offset>-#<_fingerbit_dia_mm>/2] |
|
|
|
97 |
M0 (msg, Temporary Position Check) |
88 |
G90 |
|
98 |
G90 G40 |
89 |
G54 Z5. |
= |
99 |
G54 Z5. |
90 |
M5 (spindle stop) |
|
100 |
M5 (spindle stop) |
91 |
M9 (Coolant off) |
|
101 |
M9 (Coolant off) |
|
|
-+ |
102 |
M0 (msg, Temporary Position Check) |
92 |
G53 G0 Y#<_tool_change_position_y> Z0. |
= |
103 |
G53 G0 Y#<_tool_change_position_y> Z0. |
93 |
(CHANGE TOOL TO T3 BALL END MILL) |
|
104 |
(CHANGE TOOL TO T3 BALL END MILL) |
94 |
T3 M6 (tool change pause) |
|
105 |
T3 M6 (tool change pause) |
|
|
-+ |
106 |
(CHANGE TOOL TO T3 BALL END MILL) |
|
|
|
107 |
T3 M6 (tool change pause) |
95 |
(RIGHT GROOVES SUBROUTINE) |
= |
108 |
(RIGHT GROOVES SUBROUTINE) |
96 |
o110 if [#<_qty_of_right_grooves> GT 0] |
<> |
109 |
o<rightgrooves> if [#<_qty_of_right_grooves> GT 0] |
97 |
G43 G0 G90 X#<_groove_start_right_x> Y#<_groove_start_y> Z10. H3 |
|
110 |
G43 G0 X#<_groove_start_right_x> Y#<_groove_start_y> Z10. H3 |
|
|
|
111 |
M0 (msg, Check if the tool is 10mm above top and at the correct position. If so, start cycle. If not, stop cycle and find problem.) |
98 |
S5000 M3 (M3 turns on the spindle clockwise) |
= |
112 |
S5000 M3 (M3 turns on the spindle clockwise) |
99 |
M8 (coolant on) |
|
113 |
M8 (coolant on) |
100 |
#<_i>=1 |
+- |
|
|
101 |
o<cutgrooveone_r> sub |
= |
114 |
o<cutgrooveone_r> sub |
102 |
#<_i>=[#<_i>+1] |
+- |
|
|
103 |
G0 Z3. |
= |
115 |
G0 Z3. |
104 |
G1 Z#<_groove_start_z> F60. (Start Depth) |
|
116 |
G1 Z#<_groove_start_z> F60. (Start Depth) |
105 |
G91 X#<_groove_move_right_x> |
<> |
117 |
G91 X#<_groove_move_right_x> Z#0. |
106 |
G90 G54 G0 Z5. |
= |
118 |
G90 G54 G0 Z5. |
107 |
o115 IF [#<_i> LE #<_qty_of_right_grooves>] |
+- |
|
|
108 |
G91 X[-#<_groove_move_right_x>] Y#<_grooves_spacing_right_y> |
= |
119 |
G91 X[-#<_groove_move_right_x>] Y#<_grooves_spacing_right_y> |
109 |
o115 ENDIF |
<> |
120 |
M0 (msg, Temporary Position Check) |
110 |
o<cutgrooveone_r> endsub |
= |
121 |
o<cutgrooveone_r> endsub |
111 |
o111 repeat [#<_qty_of_right_grooves>] |
<> |
122 |
o<repeatgrooves_r> repeat [#<_qty_of_right_grooves>] |
112 |
o<cutgrooveone_r> call |
= |
123 |
o<cutgrooveone_r> call |
113 |
o111 endrepeat |
<> |
124 |
o<repeatgrooves_r> endrepeat |
114 |
o110 endif |
|
125 |
o<rightgrooves> endif |
115 |
(LEFT GROOVES SUBROUTINE) |
= |
126 |
(LEFT GROOVES SUBROUTINE) |
116 |
o113 if [#<_qty_of_left_grooves> GT 0] |
<> |
127 |
o<leftgrooves> if [#<_qty_of_left_grooves> GT 0] |
117 |
G43 G0 G90 X#<_groove_start_left_x> Y#<_groove_start_y> Z10. H3 |
|
128 |
G43 G0 X#<_groove_start_left_x> Y#<_groove_start_y> Z10. H3 |
|
|
|
129 |
M0 (msg, Check if the tool is 10mm above top and at the correct position. If so, start cycle. If not, stop cycle and find problem.) |
118 |
S5000 M3 (M3 turns on the spindle clockwise) |
= |
130 |
S5000 M3 (M3 turns on the spindle clockwise) |
119 |
M8 (coolant on) |
|
131 |
M8 (coolant on) |
120 |
#<_i>=1 |
+- |
|
|
121 |
o<cutgrooveone_l> sub |
= |
132 |
o<cutgrooveone_l> sub |
122 |
#<_i>=[#<_i>+1] |
+- |
|
|
123 |
G0 Z3. |
= |
133 |
G0 Z3. |
124 |
G1 Z#<_groove_start_z> F60. (Start Depth) |
|
134 |
G1 Z#<_groove_start_z> F60. (Start Depth) |
125 |
G91 X#<_groove_move_left_x> |
<> |
135 |
G91 G53 X#<_groove_move_left_x> Z#0. |
126 |
G90 G54 G0 Z5. |
= |
136 |
G90 G54 G0 Z5. |
127 |
o116 IF [#<_i> LE #<_qty_of_left_grooves>] |
<> |
|
|
128 |
G91 X-#<_groove_move_left_x> Y#<_grooves_spacing_left_y> |
|
137 |
G91 G53 X-#<_groove_move_left_x> Y#<_grooves_spacing_left_y> |
129 |
o116 ENDIF |
|
138 |
M0 (msg, Temporary Position Check) |
130 |
o<cutgrooveone_l> endsub |
= |
139 |
o<cutgrooveone_l> endsub |
131 |
o114 repeat [#<_qty_of_left_grooves>] |
<> |
140 |
o<repeatgrooves_l> repeat [#<_qty_of_right_grooves>] |
132 |
o<cutgrooveone_l> call |
= |
141 |
o<cutgrooveone_l> call |
|
|
<> |
142 |
o<repeatgrooves_l> endrepeat |
133 |
o114 endrepeat |
|
143 |
o<leftgrooves> endif |
134 |
o113 endif |
|
144 |
G49 |
135 |
M5 (spindle stop) |
= |
145 |
M5 (spindle stop) |
136 |
M9 (Coolant off) |
|
146 |
M9 (Coolant off) |
137 |
G0 G90 G49 G53 X0. Y0. Z0. (Go HOME) |
<> |
147 |
G49 G53 X0. Y0. Z0. (Go HOME) |
138 |
o117 ELSE |
|
|
|
139 |
(DEBUG,core_drill_dia: #<_core_drill_dia_mm> Lower than fingerbit_dia: #<_fingerbit_dia_mm> = EXIT]) |
|
|
|
140 |
o117 ENDIF |
|
|
|
141 |
M30 |
|
|
|