Skip to content

Commit 37beade

Browse files
c-morleyrene-dev
authored andcommitted
task -use separate settings for g83/g73, drop peck/full retract option
1 parent ede907a commit 37beade

3 files changed

Lines changed: 15 additions & 26 deletions

File tree

src/emc/rs274ngc/interp_cycles.cc

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +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 = _setup.parameter_drill_cycle_chip_break_distance;
158-
if (_setup.length_units == CANON_UNITS_MM)
159-
rapid_delta = (rapid_delta * 25.4);
157+
rapid_delta = _setup.parameter_g83_peck_clearence;;
160158

161159
for (current_depth = (r - delta);
162160
current_depth > bottom_z; current_depth = (current_depth - delta)) {
@@ -212,24 +210,16 @@ int Interp::convert_cycle_g73(block_pointer block,
212210
{
213211
double current_depth;
214212
double rapid_delta;
215-
int count = 0;
216213
/* Moved the check for negative Q values here as a sign
217214
may be used with user defined M functions
218215
Thanks to Billy Singleton for pointing it out... */
219216
CHKS((delta <= 0.0), NCE_NEGATIVE_OR_ZERO_Q_VALUE_USED);
220217

221-
rapid_delta = _setup.parameter_drill_cycle_chip_break_distance;
222-
if (_setup.length_units == CANON_UNITS_MM)
223-
rapid_delta = (rapid_delta * 25.4);
218+
rapid_delta = _setup.parameter_g73_peck_clearence;
224219

225220
for (current_depth = (r - delta);
226221
current_depth > bottom_z; current_depth = (current_depth - delta)) {
227-
count ++;
228222
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-
}
233223
cycle_traverse(block, plane, x, y, current_depth + rapid_delta);
234224
}
235225
cycle_feed(block, plane, x, y, bottom_z);

src/emc/rs274ngc/interp_internal.hh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ inline int round_to_int(T x) {
5050
return (int)std::nearbyint(x);
5151
}
5252

53-
/* how far above hole bottom for rapid return, in inches */
54-
#define G83_RAPID_DELTA 0.010
55-
5653
/* nested remap: a remapped code is found in the body of a subroutine
5754
* which is executing on behalf of another remapped code
5855
* example: a user G-code command executes a tool change
@@ -792,8 +789,8 @@ struct setup
792789
int tool_change_at_g30;
793790
int tool_change_quill_up;
794791
int tool_change_with_spindle_on;
795-
double parameter_drill_cycle_chip_break_distance;
796-
int parameter_g73_peck_till_clear_count;
792+
double parameter_g73_peck_clearence;
793+
double parameter_g83_peck_clearence;
797794
int a_axis_wrapped;
798795
int b_axis_wrapped;
799796
int c_axis_wrapped;

src/emc/rs274ngc/rs274ngc_pre.cc

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -833,14 +833,20 @@ int Interp::init()
833833
INIT_CANON();
834834

835835
iniFileName = getenv("INI_FILE_NAME");
836-
836+
_setup.length_units = GET_EXTERNAL_LENGTH_UNIT_TYPE();
837+
837838
// the default log file
838839
_setup.loggingLevel = 0;
839840
_setup.tool_change_at_g30 = 0;
840841
_setup.tool_change_quill_up = 0;
841842
_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;
843+
if (_setup.length_units == CANON_UNITS_INCHES) {
844+
_setup.parameter_g73_peck_clearence = .050;
845+
_setup.parameter_g83_peck_clearence = .050;
846+
} else{
847+
_setup.parameter_g73_peck_clearence = 1;
848+
_setup.parameter_g83_peck_clearence = 1;
849+
}
844850
_setup.a_axis_wrapped = 0;
845851
_setup.b_axis_wrapped = 0;
846852
_setup.c_axis_wrapped = 0;
@@ -909,11 +915,8 @@ int Interp::init()
909915
_setup.c_indexer_jnum = atol(inistring);
910916
}
911917
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-
}
918+
inifile.Find(&_setup.parameter_g73_peck_clearence, "PARAMETER_G73_PECK_CLEARENCE", "RS274NGC");
919+
inifile.Find(&_setup.parameter_g83_peck_clearence, "PARAMETER_G83_PECK_CLEARENCE", "RS274NGC");
917920

918921
inifile.Find(&_setup.debugmask, "DEBUG", "EMC");
919922

@@ -1082,7 +1085,6 @@ int Interp::init()
10821085
}
10831086
}
10841087

1085-
_setup.length_units = GET_EXTERNAL_LENGTH_UNIT_TYPE();
10861088
USE_LENGTH_UNITS(_setup.length_units);
10871089
GET_EXTERNAL_PARAMETER_FILE_NAME(filename, LINELEN);
10881090
if (filename[0] == 0)

0 commit comments

Comments
 (0)