Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/src/config/ini-config.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,11 @@ The maximum number of `USER_M_PATH` directories is defined at compile time (typ:
Allow to clear the G92 offset automatically when config start-up.
* `DISABLE_FANUC_STYLE_SUB = 0` (Default: 0)
If there is reason to disable Fanuc subroutines set it to 1.

* 'PARAMETER_G73_PECK_CLEARANCE = .020' (default: Metric machine: 1mm, imperial machine: .050 inches)
Chip breaking back-off distance in machine units
* 'PARAMETER_G83_PECK_CLEARANCE = .020' (default: Metric machine: 1mm, imperial machine: .050 inches)
Clearance distance from last feed depth when machine rapids back to bottom of hole, in machine units.

[NOTE]
====
The above six options were controlled by the `FEATURES` bitmask in versions of LinuxCNC prior to 2.8.
Expand Down
11 changes: 3 additions & 8 deletions src/emc/rs274ngc/interp_cycles.cc
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,7 @@ int Interp::convert_cycle_g83(block_pointer block,
Thanks to Billy Singleton for pointing it out... */
CHKS((delta <= 0.0), NCE_NEGATIVE_OR_ZERO_Q_VALUE_USED);

rapid_delta = G83_RAPID_DELTA;
if (_setup.length_units == CANON_UNITS_MM)
rapid_delta = (rapid_delta * 25.4);
rapid_delta = _setup.parameter_g83_peck_clearance;;

for (current_depth = (r - delta);
current_depth > bottom_z; current_depth = (current_depth - delta)) {
Expand Down Expand Up @@ -212,18 +210,15 @@ int Interp::convert_cycle_g73(block_pointer block,
{
double current_depth;
double rapid_delta;

/* Moved the check for negative Q values here as a sign
may be used with user defined M functions
Thanks to Billy Singleton for pointing it out... */
CHKS((delta <= 0.0), NCE_NEGATIVE_OR_ZERO_Q_VALUE_USED);

rapid_delta = G83_RAPID_DELTA;
if (_setup.length_units == CANON_UNITS_MM)
rapid_delta = (rapid_delta * 25.4);
rapid_delta = _setup.parameter_g73_peck_clearance;

for (current_depth = (r - delta);
current_depth > bottom_z; current_depth = (current_depth - delta)) {
current_depth > bottom_z; current_depth = (current_depth - delta)) {
cycle_feed(block, plane, x, y, current_depth);
cycle_traverse(block, plane, x, y, current_depth + rapid_delta);
}
Expand Down
5 changes: 2 additions & 3 deletions src/emc/rs274ngc/interp_internal.hh
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ inline int round_to_int(T x) {
return (int)std::nearbyint(x);
}

/* how far above hole bottom for rapid return, in inches */
#define G83_RAPID_DELTA 0.010

/* nested remap: a remapped code is found in the body of a subroutine
* which is executing on behalf of another remapped code
* example: a user G-code command executes a tool change
Expand Down Expand Up @@ -791,6 +788,8 @@ struct setup
int tool_change_at_g30;
int tool_change_quill_up;
int tool_change_with_spindle_on;
double parameter_g73_peck_clearance;
double parameter_g83_peck_clearance;
int a_axis_wrapped;
int b_axis_wrapped;
int c_axis_wrapped;
Expand Down
16 changes: 15 additions & 1 deletion src/emc/rs274ngc/interpmodule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -810,12 +810,24 @@ static inline int get_tool_change_quill_up (Interp &interp) {
static inline void set_tool_change_quill_up(Interp &interp, int value) {
interp._setup.tool_change_quill_up = value;
}
static inline int get_tool_change_with_spindle_on (Interp &interp) {
static inline int get_tool_change_with_spindle_on(Interp &interp) {
return interp._setup.tool_change_with_spindle_on;
}
static inline void set_tool_change_with_spindle_on(Interp &interp, int value) {
interp._setup.tool_change_with_spindle_on = value;
}
static inline double get_parameter_g73_peck_clearance (Interp &interp) {
return interp._setup.parameter_g73_peck_clearance;
}
static inline void set_parameter_g73_peck_clearance(Interp &interp, double value) {
interp._setup.parameter_g73_peck_clearance = value;
}
static inline double get_parameter_g83_peck_clearance (Interp &interp) {
return interp._setup.parameter_g83_peck_clearance;
}
static inline void set_parameter_g83_peck_clearance(Interp &interp, double value) {
interp._setup.parameter_g83_peck_clearance = value;
}

BOOST_PYTHON_MODULE(interpreter) {
using namespace boost::python;
Expand Down Expand Up @@ -1007,6 +1019,8 @@ BOOST_PYTHON_MODULE(interpreter) {
.add_property("tool_change_quill_up", &get_tool_change_quill_up, &set_tool_change_quill_up)
.add_property("tool_change_with_spindle_on", &get_tool_change_with_spindle_on,
&set_tool_change_with_spindle_on)
.add_property("parameter_g73_peck_clearance", &get_parameter_g73_peck_clearance, &set_parameter_g73_peck_clearance)
.add_property("parameter_g83_peck_clearance", &get_parameter_g83_peck_clearance, &set_parameter_g83_peck_clearance)

.add_property( "params",
bp::make_function( &param_wrapper,
Expand Down
13 changes: 11 additions & 2 deletions src/emc/rs274ngc/rs274ngc_pre.cc
Original file line number Diff line number Diff line change
Expand Up @@ -833,12 +833,20 @@ int Interp::init()
INIT_CANON();

iniFileName = getenv("INI_FILE_NAME");

_setup.length_units = GET_EXTERNAL_LENGTH_UNIT_TYPE();

// the default log file
_setup.loggingLevel = 0;
_setup.tool_change_at_g30 = 0;
_setup.tool_change_quill_up = 0;
_setup.tool_change_with_spindle_on = 0;
if (_setup.length_units == CANON_UNITS_INCHES) {
_setup.parameter_g73_peck_clearance = .050;
_setup.parameter_g83_peck_clearance = .050;
} else{
_setup.parameter_g73_peck_clearance = 1;
_setup.parameter_g83_peck_clearance = 1;
}
_setup.a_axis_wrapped = 0;
_setup.b_axis_wrapped = 0;
_setup.c_axis_wrapped = 0;
Expand Down Expand Up @@ -907,6 +915,8 @@ int Interp::init()
_setup.c_indexer_jnum = atol(inistring);
}
inifile.Find(&_setup.orient_offset, "ORIENT_OFFSET", "RS274NGC");
inifile.Find(&_setup.parameter_g73_peck_clearance, "PARAMETER_G73_PECK_CLEARANCE", "RS274NGC");
inifile.Find(&_setup.parameter_g83_peck_clearance, "PARAMETER_G83_PECK_CLEARANCE", "RS274NGC");

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

Expand Down Expand Up @@ -1075,7 +1085,6 @@ int Interp::init()
}
}

_setup.length_units = GET_EXTERNAL_LENGTH_UNIT_TYPE();
USE_LENGTH_UNITS(_setup.length_units);
GET_EXTERNAL_PARAMETER_FILE_NAME(filename, LINELEN);
if (filename[0] == 0)
Expand Down