Skip to content

Commit ede907a

Browse files
c-morleyrene-dev
authored andcommitted
interpeter - add INI paremeters to set peck distance/count
peck distance for g73/g83 peck count for g73 g73 does short pecks to break chips. If count is >0, it will fully retract to clear chips every 'count' number of pecks [RS274NGC] PARAMETER_DRILL_CYCLE_CHIP_BREAK_DISTANCE = .020 PARAMETER_G73_PECK_TILL_CLEAR_COUNT = 2
1 parent 58135a9 commit ede907a

3 files changed

Lines changed: 18 additions & 4 deletions

File tree

src/emc/rs274ngc/interp_cycles.cc

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ int Interp::convert_cycle_g83(block_pointer block,
154154
Thanks to Billy Singleton for pointing it out... */
155155
CHKS((delta <= 0.0), NCE_NEGATIVE_OR_ZERO_Q_VALUE_USED);
156156

157-
rapid_delta = G83_RAPID_DELTA;
157+
rapid_delta = _setup.parameter_drill_cycle_chip_break_distance;
158158
if (_setup.length_units == CANON_UNITS_MM)
159159
rapid_delta = (rapid_delta * 25.4);
160160

@@ -212,19 +212,24 @@ int Interp::convert_cycle_g73(block_pointer block,
212212
{
213213
double current_depth;
214214
double rapid_delta;
215-
215+
int count = 0;
216216
/* Moved the check for negative Q values here as a sign
217217
may be used with user defined M functions
218218
Thanks to Billy Singleton for pointing it out... */
219219
CHKS((delta <= 0.0), NCE_NEGATIVE_OR_ZERO_Q_VALUE_USED);
220220

221-
rapid_delta = G83_RAPID_DELTA;
221+
rapid_delta = _setup.parameter_drill_cycle_chip_break_distance;
222222
if (_setup.length_units == CANON_UNITS_MM)
223223
rapid_delta = (rapid_delta * 25.4);
224224

225225
for (current_depth = (r - delta);
226-
current_depth > bottom_z; current_depth = (current_depth - delta)) {
226+
current_depth > bottom_z; current_depth = (current_depth - delta)) {
227+
count ++;
227228
cycle_feed(block, plane, x, y, current_depth);
229+
if (count == _setup.parameter_g73_peck_till_clear_count) {
230+
cycle_traverse(block, plane, x, y, r);
231+
count = 0;
232+
}
228233
cycle_traverse(block, plane, x, y, current_depth + rapid_delta);
229234
}
230235
cycle_feed(block, plane, x, y, bottom_z);

src/emc/rs274ngc/interp_internal.hh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,8 @@ struct setup
792792
int tool_change_at_g30;
793793
int tool_change_quill_up;
794794
int tool_change_with_spindle_on;
795+
double parameter_drill_cycle_chip_break_distance;
796+
int parameter_g73_peck_till_clear_count;
795797
int a_axis_wrapped;
796798
int b_axis_wrapped;
797799
int c_axis_wrapped;

src/emc/rs274ngc/rs274ngc_pre.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,8 @@ int Interp::init()
839839
_setup.tool_change_at_g30 = 0;
840840
_setup.tool_change_quill_up = 0;
841841
_setup.tool_change_with_spindle_on = 0;
842+
_setup.parameter_drill_cycle_chip_break_distance = .010;
843+
_setup.parameter_g73_peck_till_clear_count = 0;
842844
_setup.a_axis_wrapped = 0;
843845
_setup.b_axis_wrapped = 0;
844846
_setup.c_axis_wrapped = 0;
@@ -907,6 +909,11 @@ int Interp::init()
907909
_setup.c_indexer_jnum = atol(inistring);
908910
}
909911
inifile.Find(&_setup.orient_offset, "ORIENT_OFFSET", "RS274NGC");
912+
inifile.Find(&_setup.parameter_drill_cycle_chip_break_distance, "PARAMETER_DRILL_CYCLE_CHIP_BREAK_DISTANCE", "RS274NGC");
913+
if(NULL != (inistring = inifile.Find("PARAMETER_G73_PECK_TILL_CLEAR_COUNT", "RS274NGC")))
914+
{
915+
_setup.parameter_g73_peck_till_clear_count = atoi(inistring);
916+
}
910917

911918
inifile.Find(&_setup.debugmask, "DEBUG", "EMC");
912919

0 commit comments

Comments
 (0)