G43.1/G49 tool length offset installed. Minor bug fix.
- Minor bug fix that caused G92.1 not to work. The mantissa of G92.1 was not computed correctly due to floating point round-off errors and the use of trunc(). Fixed it by changing the computation with round(). - Installed tool length offsets with G43.1 and G49! True tool length offsets via G43 are not supported, because these require us to store tool data that we don’t have space for. But we’ve come up with a good solution for users that need this. Instead we are strictly using the dynamic version G43.1 via linuxcnc.org. Visit their website for more details on the command. - G43.1 operates by requiring an axis word and value to offset the configured tool length axis, which can be configured for any axis (default Z-axis) in config.h. For example, ```G43.1 Z0.5``` will offset the work coordinates from Z0.0 to Z-0.5. - G49 will cancel the last tool length offset value and reset it to zero. - Tweaked the ‘$#’ parameters report. `Probe` is now `PRB` and a new value `TLO` states the tool length offset value.
This commit is contained in:
6
report.c
6
report.c
@ -204,7 +204,7 @@ void report_probe_parameters()
|
||||
float print_position[N_AXIS];
|
||||
|
||||
// Report in terms of machine position.
|
||||
printPgmString(PSTR("[Probe:"));
|
||||
printPgmString(PSTR("[PRB:"));
|
||||
for (i=0; i< N_AXIS; i++) {
|
||||
print_position[i] = sys.probe_position[i]/settings.steps_per_mm[i];
|
||||
printFloat_CoordValue(print_position[i]);
|
||||
@ -243,6 +243,9 @@ void report_ngc_parameters()
|
||||
if (i < (N_AXIS-1)) { printPgmString(PSTR(",")); }
|
||||
else { printPgmString(PSTR("]\r\n")); }
|
||||
}
|
||||
printPgmString(PSTR("[TLO:")); // Print tool length offset value
|
||||
printFloat_CoordValue(gc_state.tool_length_offset);
|
||||
printPgmString(PSTR("]\r\n"));
|
||||
report_probe_parameters(); // Print probe parameters. Not persistent in memory.
|
||||
}
|
||||
|
||||
@ -362,6 +365,7 @@ void report_realtime_status()
|
||||
printPgmString(PSTR("WPos:"));
|
||||
for (i=0; i< N_AXIS; i++) {
|
||||
print_position[i] -= gc_state.coord_system[i]+gc_state.coord_offset[i];
|
||||
if (i == TOOL_LENGTH_OFFSET_AXIS) { print_position[i] -= gc_state.tool_length_offset; }
|
||||
printFloat_CoordValue(print_position[i]);
|
||||
if (i < (N_AXIS-1)) { printPgmString(PSTR(",")); }
|
||||
}
|
||||
|
Reference in New Issue
Block a user