Parameter number out of range
- curtkilian@gmail.com
- Offline
- New Member
-
Less
More
- Posts: 10
- Thank you received: 0
25 Sep 2018 15:40 #117964
by curtkilian@gmail.com
Parameter number out of range was created by curtkilian@gmail.com
Hi, when opening an .ngc file in Axis 2.7.0 on LinuxCNC-HAL-SIM-AXIS a "G-CODE error" is displayed indicating : "Near line 128 of /home/........ Parameter number out of range". I don't find much about this on Google!
Anyone knows what this means? Line numbers are added for ease of reference in code below to indicate code around line 128.
111 (RIGHT GROOVES SUBROUTINE)
112 o<rightgrooves> if [#<_qty_of_right_grooves> GT 0]
113 G43 G0 X#<_groove_start_right_x> Y#<_groove_start_y> Z10. H3
114 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.)
115 S5000 M3 (M3 turns on the spindle clockwise)
116 M8 (coolant on)
117 o<cutgrooveone_r> sub
118 G0 Z3.
119 G1 Z#<_groove_start_z> F60. (Start Depth)
120 G91 X#<_groove_move_right_x> Z#0.
121 G90 G54 G0 Z5.
122 G91 X[-#<_groove_move_right_x>] Y#<_grooves_spacing_right_y>
123 M0 (msg, Temporary Position Check)
124 o<cutgrooveone_r> endsub
125 o<repeatgrooves_r> repeat [#<_qty_of_right_grooves>]
126 o<cutgrooveone_r> call
127 oo<repeatgrooves_r> endrepeat
128 o<rightgrooves> endif
129 (LEFT GROOVES SUBROUTINE)
130 o<leftgrooves> if [#<_qty_of_left_grooves> GT 0]
131 G43 G0 X#<_groove_start_left_x> Y#<_groove_start_y> Z10. H3
132 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.)
133 S5000 M3 (M3 turns on the spindle clockwise)
134 M8 (coolant on)
Anyone knows what this means? Line numbers are added for ease of reference in code below to indicate code around line 128.
111 (RIGHT GROOVES SUBROUTINE)
112 o<rightgrooves> if [#<_qty_of_right_grooves> GT 0]
113 G43 G0 X#<_groove_start_right_x> Y#<_groove_start_y> Z10. H3
114 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.)
115 S5000 M3 (M3 turns on the spindle clockwise)
116 M8 (coolant on)
117 o<cutgrooveone_r> sub
118 G0 Z3.
119 G1 Z#<_groove_start_z> F60. (Start Depth)
120 G91 X#<_groove_move_right_x> Z#0.
121 G90 G54 G0 Z5.
122 G91 X[-#<_groove_move_right_x>] Y#<_grooves_spacing_right_y>
123 M0 (msg, Temporary Position Check)
124 o<cutgrooveone_r> endsub
125 o<repeatgrooves_r> repeat [#<_qty_of_right_grooves>]
126 o<cutgrooveone_r> call
127 oo<repeatgrooves_r> endrepeat
128 o<rightgrooves> endif
129 (LEFT GROOVES SUBROUTINE)
130 o<leftgrooves> if [#<_qty_of_left_grooves> GT 0]
131 G43 G0 X#<_groove_start_left_x> Y#<_groove_start_y> Z10. H3
132 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.)
133 S5000 M3 (M3 turns on the spindle clockwise)
134 M8 (coolant on)
Please Log in or Create an account to join the conversation.
26 Sep 2018 09:00 #117991
by tecno
Replied by tecno on topic Parameter number out of range
127 oo<repeatgrooves_r> endrepeat ??
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
Less
More
- Posts: 4981
- Thank you received: 1378
26 Sep 2018 13:37 #118007
by Todd Zuercher
Replied by Todd Zuercher on topic Parameter number out of range
The problem probably is the extra "o" on line 127.
Please Log in or Create an account to join the conversation.
27 Sep 2018 12:02 #118041
by Claire
Replied by Claire on topic Parameter number out of range
This is something really helpful.
www.backchairs-direct.co.uk
www.backchairs-direct.co.uk
Please Log in or Create an account to join the conversation.
- curtkilian@gmail.com
- Offline
- New Member
-
Less
More
- Posts: 10
- Thank you received: 0
28 Sep 2018 14:30 #118116
by curtkilian@gmail.com
Replied by curtkilian@gmail.com on topic Parameter number out of range
Thanks, don't know how I've missed that. Removed the extra "o" but still gets the same message.
code now looks like this after it is fixed.
(RIGHT GROOVES SUBROUTINE)
o<rightgrooves> if [#<_qty_of_right_grooves> GT 0]
G43 G0 X#<_groove_start_right_x> Y#<_groove_start_y> Z10. H3
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.)
S5000 M3 (M3 turns on the spindle clockwise)
M8 (coolant on)
o<cutgrooveone_r> sub
G0 Z3.
G1 Z#<_groove_start_z> F60. (Start Depth)
G91 X#<_groove_move_right_x> Z#0.
G90 G54 G0 Z5.
G91 X[-#<_groove_move_right_x>] Y#<_grooves_spacing_right_y>
M0 (msg, Temporary Position Check)
o<cutgrooveone_r> endsub
o<repeatgrooves_r> repeat [#<_qty_of_right_grooves>]
o<cutgrooveone_r> call
o<repeatgrooves_r> endrepeat
o<rightgrooves> endif
(LEFT GROOVES SUBROUTINE)
o<leftgrooves> if [#<_qty_of_left_grooves> GT 0]
G43 G0 X#<_groove_start_left_x> Y#<_groove_start_y> Z10. H3
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.)
S5000 M3 (M3 turns on the spindle clockwise)
M8 (coolant on)
o<cutgrooveone_l> sub
G0 Z3.
G1 Z#<_groove_start_z> F60. (Start Depth)
G91 G53 X#<_groove_move_left_x> Z#0.
G90 G54 G0 Z5.
G91 G53 X-#<_groove_move_left_x> Y#<_grooves_spacing_left_y>
M0 (msg, Temporary Position Check)
o<cutgrooveone_l> endsub
o<repeatgrooves_l> repeat [#<_qty_of_right_grooves>]
o<cutgrooveone_l> call
o<repeatgrooves_l> endrepeat
o<leftgrooves> endif
G49
M5 (spindle stop)
M9 (Coolant off)
G49 G53 X0. Y0. Z0. (Go HOME)
code now looks like this after it is fixed.
(RIGHT GROOVES SUBROUTINE)
o<rightgrooves> if [#<_qty_of_right_grooves> GT 0]
G43 G0 X#<_groove_start_right_x> Y#<_groove_start_y> Z10. H3
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.)
S5000 M3 (M3 turns on the spindle clockwise)
M8 (coolant on)
o<cutgrooveone_r> sub
G0 Z3.
G1 Z#<_groove_start_z> F60. (Start Depth)
G91 X#<_groove_move_right_x> Z#0.
G90 G54 G0 Z5.
G91 X[-#<_groove_move_right_x>] Y#<_grooves_spacing_right_y>
M0 (msg, Temporary Position Check)
o<cutgrooveone_r> endsub
o<repeatgrooves_r> repeat [#<_qty_of_right_grooves>]
o<cutgrooveone_r> call
o<repeatgrooves_r> endrepeat
o<rightgrooves> endif
(LEFT GROOVES SUBROUTINE)
o<leftgrooves> if [#<_qty_of_left_grooves> GT 0]
G43 G0 X#<_groove_start_left_x> Y#<_groove_start_y> Z10. H3
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.)
S5000 M3 (M3 turns on the spindle clockwise)
M8 (coolant on)
o<cutgrooveone_l> sub
G0 Z3.
G1 Z#<_groove_start_z> F60. (Start Depth)
G91 G53 X#<_groove_move_left_x> Z#0.
G90 G54 G0 Z5.
G91 G53 X-#<_groove_move_left_x> Y#<_grooves_spacing_left_y>
M0 (msg, Temporary Position Check)
o<cutgrooveone_l> endsub
o<repeatgrooves_l> repeat [#<_qty_of_right_grooves>]
o<cutgrooveone_l> call
o<repeatgrooves_l> endrepeat
o<leftgrooves> endif
G49
M5 (spindle stop)
M9 (Coolant off)
G49 G53 X0. Y0. Z0. (Go HOME)
Please Log in or Create an account to join the conversation.
28 Sep 2018 17:49 - 28 Sep 2018 18:52 #118133
by MaHa
Replied by MaHa on topic Parameter number out of range
I think you need to revise the named parameter format in your gcode,like
o<rightgrooves> if [#<_qty_of_right_grooves> GT 0] and similar. M30 is missing also.
Just a hint, Since G91 is incremental, you dont need G53. And G54 is better placed at the very beginning of your program, before any movement.
A numbered parameter is the pound character # followed by an integer between 1 and (currently) 5602 2
#<named parameter>
#<_global named parameter>
o<rightgrooves> if [#<_qty_of_right_grooves> GT 0] and similar. M30 is missing also.
Just a hint, Since G91 is incremental, you dont need G53. And G54 is better placed at the very beginning of your program, before any movement.
A numbered parameter is the pound character # followed by an integer between 1 and (currently) 5602 2
#<named parameter>
#<_global named parameter>
Last edit: 28 Sep 2018 18:52 by MaHa.
Please Log in or Create an account to join the conversation.
- curtkilian@gmail.com
- Offline
- New Member
-
Less
More
- Posts: 10
- Thank you received: 0
29 Sep 2018 05:38 #118168
by curtkilian@gmail.com
Replied by curtkilian@gmail.com on topic Parameter number out of range
Hi Maha. Thanks for the tips which I understand! However, I don't quite understand the parameter part. This is the first G code I have ever attempted. I don't really understand the difference between local and global parameters and how the numbers are assigned to named parameters?
I have attached the full program - feel free to make changes!
(S402G5LR)
(OPERATOR INPUT PARAMETERS)
#<_right_mm_to_basin_centre>=772
#<_back_to_front_mm_to_edge_of_basin_lip>=103
#<_stone_thickness>=20
#<_core_drill_dia_mm>=20
#<_fingerbit_dia_mm>=20
#<_ball_end_dia_mm>=12
(SINK HOLE PARAMETERS)
#<_sink_hole_mm_lr>=452
#<_sink_hole_mm_bf>=402
#<_sink_hole_rad_mm>=70
#<_lip_width_of_basin_mm>=15
#<_required_oh_mm>=10
#<_mm_between_double_basins>=0
#<_grooves_length_mm>=380
#<_qty_of_left_grooves>=5
#<_qty_of_right_grooves>=5
#<_grooves_start_depth_mm>=5
(TOOL POSITION PARAMETERS)
#<_drill_mm_past_bottom_of_piece>=3
#<_drill_start_offset>=3
#<_phase_in_mm>=10
#<_tool_change_position_y>=-500
(PARAMETER FORMULAS)
#<_phase_out_mm>=[#<_phase_in_mm>*2]
#<_fb_rl_move>=[#<_sink_hole_mm_lr>/2-[#<_sink_hole_rad_mm>-#<_required_oh_mm>]-#<_phase_in_mm>]
#<_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>]
#<_drill_depth>=[-#<_stone_thickness>-#<_drill_mm_past_bottom_of_piece>]
#<_cut_radius>=[#<_sink_hole_rad_mm>-#<_required_oh_mm>]
#<_back_rl_move>=[-#<_sink_hole_mm_lr>/2+#<_sink_hole_rad_mm>+#<_phase_in_mm>]
#<_left_rad_x>=[#<_right_mm_to_basin_centre>-#<_sink_hole_mm_lr>/2+#<_sink_hole_rad_mm>]
#<_back_rad_y>=[-#<_back_to_front_mm_to_edge_of_basin_lip>-#<_lip_width_of_basin_mm>-#<_sink_hole_rad_mm>]
#<_left_bf_move>=[-#<_sink_hole_mm_bf>+#<_sink_hole_rad_mm>*2]
#<_front_rad_y>=[#<_back_rad_y>+#<_left_bf_move>]
#<_front_lr_move>=[#<_sink_hole_mm_lr>-#<_sink_hole_rad_mm>*2]
#<_right_rad_x>=[#<_right_mm_to_basin_centre>+#<_sink_hole_mm_lr>/2-#<_sink_hole_rad_mm>]
#<_right_fb_move>=[#<_sink_hole_mm_bf>-#<_sink_hole_rad_mm>*2]
#<_back_final_move>=[#<_front_lr_move>/2+#<_phase_out_mm>]
#<_groove_start_right_x>=[#<_right_mm_to_basin_centre>+[#<_sink_hole_mm_lr>-[2*#<_required_oh_mm>]]/2-#<_ball_end_dia_mm>/2]
#<_groove_start_y>=#<_front_rad_y>
#<_groove_start_z>=[-#<_grooves_start_depth_mm>]
#<_groove_move_right_x>=[#<_grooves_length_mm>+#<_ball_end_dia_mm>/2]
#<_groove_start_left_x>=[#<_right_mm_to_basin_centre>-[#<_sink_hole_mm_lr>-2*#<_required_oh_mm>]/2+#<_ball_end_dia_mm>/2]
#<_groove_move_left_x>=[-#<_grooves_length_mm>-#<_ball_end_dia_mm>/2]
#<_grooves_count>=0
#<_grooves_spacing_left_y>=#<_sink_hole_mm_bf>-2*#<_required_oh_mm>-2*#<_cut_radius>]/[#<_qty_of_left_grooves>-1
#<_grooves_spacing_right_y>=#<_sink_hole_mm_bf>-2*#<_required_oh_mm>-2*#<_cut_radius>]/[#<_qty_of_right_grooves>-1
(START PROGRAM)
G90 G21 G94 G17 G91.1 G54 G40 G49 G80
M9 (Coolant off)
G53 G0 Z0. Y#<_tool_change_position_y>
(DRILL START HOLE)
T1 M6 (msg, Fit Core drill with 20mm dia and 118mm Height. M6 Tool Change Pause. Then start cycle)
G0 X#<_right_mm_to_basin_centre> Y#<_start_point_y>
G43 Z10. H1
M0 (msg, Check if the tool is 10mm above top and at the correct position. If so, start cycle. If not, stop cycle.)
M8 (Coolant On)
S3000 M3 (Spindle on Clockwise at rpm rate)
G54 G0 Z3.
G81 G98 Z#<_drill_depth> R2.8 F20.
G80
G0 Z10.
M5 (Spindle Stop)
M9 (Coolant off)
(G53 G0 Z0.)
G90 G53 G0 Y#<_tool_change_position_y> Z0.
(FINGERBIT CUTTING OF SINK CUT OUT)
T2 M6 (msg, Fit Fingerbit with 20mm dia and 84mm Height. M6 Tool Change Pause. Then start cycle)
G43 G0 X#<_right_mm_to_basin_centre> Y#<_start_point_y> Z10. H2
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.)
M8 (coolant on)
S4000 M3 (Turn on Spindle Clockwise)
G0 Z3.
G1 Z#<_drill_depth> F333.33
G91 G41 D2 G1 X[-#<_phase_in_mm>] Y[##<_drill_start_offset>+#<_fingerbit_dia_mm>/2]
M0 (msg, Temporary Position Check)
G1 X#<_back_rl_move> F60.
M0 (msg, Temporary Position Check)
G90 G3 X[#<_left_rad_x>-#<_cut_radius>] Y#<_back_rad_y> I0. J[-#<_cut_radius>]
M0 (msg, Temporary Position Check)
G91 G1 Y#<_left_bf_move> (Incremental Mode)
M0 (msg, Temporary Position Check)
G90 G3 X#<_left_rad_x> Y#<_front_rad_y>-#<_cut_radius> I#<_cut_radius> J0
M0 (msg, Temporary Position Check)
G91 G1 X#<_front_lr_move> (Incremental Mode)
M0 (msg, Temporary Position Check)
G90 G3 X[#<_right_rad_x>+#<_cut_radius>] Y#<_front_rad_y> I0. J#<_cut_radius>
M0 (msg, Temporary Position Check)
G91 G1 Y#<_right_fb_move> (Incremental Mode)
M0 (msg, Temporary Position Check)
G90 G3 X#<_right_rad_x> Y[#<_back_rad_y>+#<_cut_radius>] I[-#<_cut_radius>] J0.
M0 (msg, Temporary Position Check)
G91 G1 X#<_back_final_move> (Incremental Mode)
M0 (msg, Temporary Position Check)
G1 X[-#<_phase_out_mm>] Y[-##<_drill_start_offset>-#<_fingerbit_dia_mm>/2]
M0 (msg, Temporary Position Check)
G90 G40
G54 Z5.
M5 (spindle stop)
M9 (Coolant off)
M0 (msg, Temporary Position Check)
G53 G0 Y#<_tool_change_position_y> Z0.
(CHANGE TOOL TO T3 BALL END MILL)
T3 M6 (tool change pause)
(RIGHT GROOVES SUBROUTINE)
o<rightgrooves> if [#<_qty_of_right_grooves> GT 0]
G43 G0 X#<_groove_start_right_x> Y#<_groove_start_y> Z10. H3
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.)
S5000 M3 (M3 turns on the spindle clockwise)
M8 (coolant on)
o<cutgrooveone_r> sub
G0 Z3.
G1 Z#<_groove_start_z> F60. (Start Depth)
G91 X#<_groove_move_right_x> Z#0.
G90 G54 G0 Z5.
G91 X[-#<_groove_move_right_x>] Y#<_grooves_spacing_right_y>
M0 (msg, Temporary Position Check)
o<cutgrooveone_r> endsub
o<repeatgrooves_r> repeat [#<_qty_of_right_grooves>]
o<cutgrooveone_r> call
oo<repeatgrooves_r> endrepeat
o<rightgrooves> endif
(LEFT GROOVES SUBROUTINE)
o<leftgrooves> if [#<_qty_of_left_grooves> GT 0]
G43 G0 X#<_groove_start_left_x> Y#<_groove_start_y> Z10. H3
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.)
S5000 M3 (M3 turns on the spindle clockwise)
M8 (coolant on)
o<cutgrooveone_l> sub
G0 Z3.
G1 Z#<_groove_start_z> F60. (Start Depth)
G91 G53 X#<_groove_move_left_x> Z#0.
G90 G54 G0 Z5.
G91 G53 X-#<_groove_move_left_x> Y#<_grooves_spacing_left_y>
M0 (msg, Temporary Position Check)
o<cutgrooveone_l> endsub
o<repeatgrooves_l> repeat [#<_qty_of_right_grooves>]
o<cutgrooveone_l> call
oo<repeatgrooves_l> endrepeat
o<leftgrooves> endif
G49
M5 (spindle stop)
M9 (Coolant off)
G49 G53 X0. Y0. Z0. (Go HOME)
%
I have attached the full program - feel free to make changes!
(S402G5LR)
(OPERATOR INPUT PARAMETERS)
#<_right_mm_to_basin_centre>=772
#<_back_to_front_mm_to_edge_of_basin_lip>=103
#<_stone_thickness>=20
#<_core_drill_dia_mm>=20
#<_fingerbit_dia_mm>=20
#<_ball_end_dia_mm>=12
(SINK HOLE PARAMETERS)
#<_sink_hole_mm_lr>=452
#<_sink_hole_mm_bf>=402
#<_sink_hole_rad_mm>=70
#<_lip_width_of_basin_mm>=15
#<_required_oh_mm>=10
#<_mm_between_double_basins>=0
#<_grooves_length_mm>=380
#<_qty_of_left_grooves>=5
#<_qty_of_right_grooves>=5
#<_grooves_start_depth_mm>=5
(TOOL POSITION PARAMETERS)
#<_drill_mm_past_bottom_of_piece>=3
#<_drill_start_offset>=3
#<_phase_in_mm>=10
#<_tool_change_position_y>=-500
(PARAMETER FORMULAS)
#<_phase_out_mm>=[#<_phase_in_mm>*2]
#<_fb_rl_move>=[#<_sink_hole_mm_lr>/2-[#<_sink_hole_rad_mm>-#<_required_oh_mm>]-#<_phase_in_mm>]
#<_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>]
#<_drill_depth>=[-#<_stone_thickness>-#<_drill_mm_past_bottom_of_piece>]
#<_cut_radius>=[#<_sink_hole_rad_mm>-#<_required_oh_mm>]
#<_back_rl_move>=[-#<_sink_hole_mm_lr>/2+#<_sink_hole_rad_mm>+#<_phase_in_mm>]
#<_left_rad_x>=[#<_right_mm_to_basin_centre>-#<_sink_hole_mm_lr>/2+#<_sink_hole_rad_mm>]
#<_back_rad_y>=[-#<_back_to_front_mm_to_edge_of_basin_lip>-#<_lip_width_of_basin_mm>-#<_sink_hole_rad_mm>]
#<_left_bf_move>=[-#<_sink_hole_mm_bf>+#<_sink_hole_rad_mm>*2]
#<_front_rad_y>=[#<_back_rad_y>+#<_left_bf_move>]
#<_front_lr_move>=[#<_sink_hole_mm_lr>-#<_sink_hole_rad_mm>*2]
#<_right_rad_x>=[#<_right_mm_to_basin_centre>+#<_sink_hole_mm_lr>/2-#<_sink_hole_rad_mm>]
#<_right_fb_move>=[#<_sink_hole_mm_bf>-#<_sink_hole_rad_mm>*2]
#<_back_final_move>=[#<_front_lr_move>/2+#<_phase_out_mm>]
#<_groove_start_right_x>=[#<_right_mm_to_basin_centre>+[#<_sink_hole_mm_lr>-[2*#<_required_oh_mm>]]/2-#<_ball_end_dia_mm>/2]
#<_groove_start_y>=#<_front_rad_y>
#<_groove_start_z>=[-#<_grooves_start_depth_mm>]
#<_groove_move_right_x>=[#<_grooves_length_mm>+#<_ball_end_dia_mm>/2]
#<_groove_start_left_x>=[#<_right_mm_to_basin_centre>-[#<_sink_hole_mm_lr>-2*#<_required_oh_mm>]/2+#<_ball_end_dia_mm>/2]
#<_groove_move_left_x>=[-#<_grooves_length_mm>-#<_ball_end_dia_mm>/2]
#<_grooves_count>=0
#<_grooves_spacing_left_y>=#<_sink_hole_mm_bf>-2*#<_required_oh_mm>-2*#<_cut_radius>]/[#<_qty_of_left_grooves>-1
#<_grooves_spacing_right_y>=#<_sink_hole_mm_bf>-2*#<_required_oh_mm>-2*#<_cut_radius>]/[#<_qty_of_right_grooves>-1
(START PROGRAM)
G90 G21 G94 G17 G91.1 G54 G40 G49 G80
M9 (Coolant off)
G53 G0 Z0. Y#<_tool_change_position_y>
(DRILL START HOLE)
T1 M6 (msg, Fit Core drill with 20mm dia and 118mm Height. M6 Tool Change Pause. Then start cycle)
G0 X#<_right_mm_to_basin_centre> Y#<_start_point_y>
G43 Z10. H1
M0 (msg, Check if the tool is 10mm above top and at the correct position. If so, start cycle. If not, stop cycle.)
M8 (Coolant On)
S3000 M3 (Spindle on Clockwise at rpm rate)
G54 G0 Z3.
G81 G98 Z#<_drill_depth> R2.8 F20.
G80
G0 Z10.
M5 (Spindle Stop)
M9 (Coolant off)
(G53 G0 Z0.)
G90 G53 G0 Y#<_tool_change_position_y> Z0.
(FINGERBIT CUTTING OF SINK CUT OUT)
T2 M6 (msg, Fit Fingerbit with 20mm dia and 84mm Height. M6 Tool Change Pause. Then start cycle)
G43 G0 X#<_right_mm_to_basin_centre> Y#<_start_point_y> Z10. H2
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.)
M8 (coolant on)
S4000 M3 (Turn on Spindle Clockwise)
G0 Z3.
G1 Z#<_drill_depth> F333.33
G91 G41 D2 G1 X[-#<_phase_in_mm>] Y[##<_drill_start_offset>+#<_fingerbit_dia_mm>/2]
M0 (msg, Temporary Position Check)
G1 X#<_back_rl_move> F60.
M0 (msg, Temporary Position Check)
G90 G3 X[#<_left_rad_x>-#<_cut_radius>] Y#<_back_rad_y> I0. J[-#<_cut_radius>]
M0 (msg, Temporary Position Check)
G91 G1 Y#<_left_bf_move> (Incremental Mode)
M0 (msg, Temporary Position Check)
G90 G3 X#<_left_rad_x> Y#<_front_rad_y>-#<_cut_radius> I#<_cut_radius> J0
M0 (msg, Temporary Position Check)
G91 G1 X#<_front_lr_move> (Incremental Mode)
M0 (msg, Temporary Position Check)
G90 G3 X[#<_right_rad_x>+#<_cut_radius>] Y#<_front_rad_y> I0. J#<_cut_radius>
M0 (msg, Temporary Position Check)
G91 G1 Y#<_right_fb_move> (Incremental Mode)
M0 (msg, Temporary Position Check)
G90 G3 X#<_right_rad_x> Y[#<_back_rad_y>+#<_cut_radius>] I[-#<_cut_radius>] J0.
M0 (msg, Temporary Position Check)
G91 G1 X#<_back_final_move> (Incremental Mode)
M0 (msg, Temporary Position Check)
G1 X[-#<_phase_out_mm>] Y[-##<_drill_start_offset>-#<_fingerbit_dia_mm>/2]
M0 (msg, Temporary Position Check)
G90 G40
G54 Z5.
M5 (spindle stop)
M9 (Coolant off)
M0 (msg, Temporary Position Check)
G53 G0 Y#<_tool_change_position_y> Z0.
(CHANGE TOOL TO T3 BALL END MILL)
T3 M6 (tool change pause)
(RIGHT GROOVES SUBROUTINE)
o<rightgrooves> if [#<_qty_of_right_grooves> GT 0]
G43 G0 X#<_groove_start_right_x> Y#<_groove_start_y> Z10. H3
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.)
S5000 M3 (M3 turns on the spindle clockwise)
M8 (coolant on)
o<cutgrooveone_r> sub
G0 Z3.
G1 Z#<_groove_start_z> F60. (Start Depth)
G91 X#<_groove_move_right_x> Z#0.
G90 G54 G0 Z5.
G91 X[-#<_groove_move_right_x>] Y#<_grooves_spacing_right_y>
M0 (msg, Temporary Position Check)
o<cutgrooveone_r> endsub
o<repeatgrooves_r> repeat [#<_qty_of_right_grooves>]
o<cutgrooveone_r> call
oo<repeatgrooves_r> endrepeat
o<rightgrooves> endif
(LEFT GROOVES SUBROUTINE)
o<leftgrooves> if [#<_qty_of_left_grooves> GT 0]
G43 G0 X#<_groove_start_left_x> Y#<_groove_start_y> Z10. H3
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.)
S5000 M3 (M3 turns on the spindle clockwise)
M8 (coolant on)
o<cutgrooveone_l> sub
G0 Z3.
G1 Z#<_groove_start_z> F60. (Start Depth)
G91 G53 X#<_groove_move_left_x> Z#0.
G90 G54 G0 Z5.
G91 G53 X-#<_groove_move_left_x> Y#<_grooves_spacing_left_y>
M0 (msg, Temporary Position Check)
o<cutgrooveone_l> endsub
o<repeatgrooves_l> repeat [#<_qty_of_right_grooves>]
o<cutgrooveone_l> call
oo<repeatgrooves_l> endrepeat
o<leftgrooves> endif
G49
M5 (spindle stop)
M9 (Coolant off)
G49 G53 X0. Y0. Z0. (Go HOME)
%
Please Log in or Create an account to join the conversation.
29 Sep 2018 08:13 - 29 Sep 2018 08:30 #118169
by MaHa
Replied by MaHa on topic Parameter number out of range
Because most of the brackets in your formulas disapeared, I couldnĀ“t simulate. Only following changes made (that was the parameter thing)
(CHANGE TOOL TO T3 BALL END MILL)
T3 M6 (tool change pause)
(RIGHT GROOVES SUBROUTINE)
o110 if [#<_qty_of_right_grooves> GT 0]
G43 G0 X#<_groove_start_right_x> Y#<_groove_start_y> Z10. H3
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.)
S5000 M3 (M3 turns on the spindle clockwise)
M8 (coolant on)
o<cutgrooveone_r> sub
G0 Z3.
G1 Z#<_groove_start_z> F60. (Start Depth)
G91 X#<_groove_move_right_x> Z#0.
G90 G54 G0 Z5.
G91 X[-#<_groove_move_right_x>] Y#<_grooves_spacing_right_y>
M0 (msg, Temporary Position Check)
o<cutgrooveone_r> endsub
o111 repeat [#<_qty_of_right_grooves>]
o<cutgrooveone_r> call
o111 endrepeat
o110 endif
(LEFT GROOVES SUBROUTINE)
o113 if [#<_qty_of_left_grooves> GT 0]
G43 G0 X#<_groove_start_left_x> Y#<_groove_start_y> Z10. H3
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.)
S5000 M3 (M3 turns on the spindle clockwise)
M8 (coolant on)
o<cutgrooveone_l> sub
G0 Z3.
G1 Z#<_groove_start_z> F60. (Start Depth)
G91 G53 X#<_groove_move_left_x> Z#0.
G90 G54 G0 Z5.
G91 G53 X-#<_groove_move_left_x> Y#<_grooves_spacing_left_y>
M0 (msg, Temporary Position Check)
o<cutgrooveone_l> endsub
o114 repeat [#<_qty_of_right_grooves>]
o<cutgrooveone_l> call
o114 endrepeat
o113 endif
G49
M5 (spindle stop)
M9 (Coolant off)
G49 G53 X0. Y0. Z0. (Go HOME)
M30
(CHANGE TOOL TO T3 BALL END MILL)
T3 M6 (tool change pause)
(RIGHT GROOVES SUBROUTINE)
o110 if [#<_qty_of_right_grooves> GT 0]
G43 G0 X#<_groove_start_right_x> Y#<_groove_start_y> Z10. H3
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.)
S5000 M3 (M3 turns on the spindle clockwise)
M8 (coolant on)
o<cutgrooveone_r> sub
G0 Z3.
G1 Z#<_groove_start_z> F60. (Start Depth)
G91 X#<_groove_move_right_x> Z#0.
G90 G54 G0 Z5.
G91 X[-#<_groove_move_right_x>] Y#<_grooves_spacing_right_y>
M0 (msg, Temporary Position Check)
o<cutgrooveone_r> endsub
o111 repeat [#<_qty_of_right_grooves>]
o<cutgrooveone_r> call
o111 endrepeat
o110 endif
(LEFT GROOVES SUBROUTINE)
o113 if [#<_qty_of_left_grooves> GT 0]
G43 G0 X#<_groove_start_left_x> Y#<_groove_start_y> Z10. H3
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.)
S5000 M3 (M3 turns on the spindle clockwise)
M8 (coolant on)
o<cutgrooveone_l> sub
G0 Z3.
G1 Z#<_groove_start_z> F60. (Start Depth)
G91 G53 X#<_groove_move_left_x> Z#0.
G90 G54 G0 Z5.
G91 G53 X-#<_groove_move_left_x> Y#<_grooves_spacing_left_y>
M0 (msg, Temporary Position Check)
o<cutgrooveone_l> endsub
o114 repeat [#<_qty_of_right_grooves>]
o<cutgrooveone_l> call
o114 endrepeat
o113 endif
G49
M5 (spindle stop)
M9 (Coolant off)
G49 G53 X0. Y0. Z0. (Go HOME)
M30
Last edit: 29 Sep 2018 08:30 by MaHa.
Please Log in or Create an account to join the conversation.
29 Sep 2018 16:59 #118181
by MaHa
Replied by MaHa on topic Parameter number out of range
I had a look at your program again. This gonna be a construction site.
Tooldiameter is in the operator input, and used in the formula, but G41 is used also. Are you using the tooltable?
G41 needs lead in of at least cutter diameter. ok
I think there will occur circle endpoint error.
G41 G3 or G2 doesn`t make a full circle. Ex: Starting tangential under center line, ending tangential above centerline. So a lead in / lead out is required for full machining of circle, maybe each 1 segment. It is correct according some standards, but doesn`t make everyone happy. My workaround is found by " circle_g3 " search in the forum, any date.
Your Gcode is all incremental moves. Makes it more diffcult, because of positioning, lead in, lead out it`s easy to loose control where your tool is.
This is just my opinion, hope someone else has an idea about.
linuxcnc.org/docs/2.7/html/gcode/tool-compensation.html
Tooldiameter is in the operator input, and used in the formula, but G41 is used also. Are you using the tooltable?
G41 needs lead in of at least cutter diameter. ok
I think there will occur circle endpoint error.
G41 G3 or G2 doesn`t make a full circle. Ex: Starting tangential under center line, ending tangential above centerline. So a lead in / lead out is required for full machining of circle, maybe each 1 segment. It is correct according some standards, but doesn`t make everyone happy. My workaround is found by " circle_g3 " search in the forum, any date.
Your Gcode is all incremental moves. Makes it more diffcult, because of positioning, lead in, lead out it`s easy to loose control where your tool is.
This is just my opinion, hope someone else has an idea about.
linuxcnc.org/docs/2.7/html/gcode/tool-compensation.html
Please Log in or Create an account to join the conversation.
29 Sep 2018 19:29 - 29 Sep 2018 19:31 #118186
by Grotius
Replied by Grotius on topic Parameter number out of range
Mr CS Kilian,
You have to remove the % sign on the last line.
With so many lines, you say : feel free to make changes!
I looked over it 10 seconds.
You have to remove the % sign on the last line.
With so many lines, you say : feel free to make changes!
I looked over it 10 seconds.
Last edit: 29 Sep 2018 19:31 by Grotius.
Please Log in or Create an account to join the conversation.
Time to create page: 0.111 seconds