Fixed unintended laser mode pausing. Updated documentation. Min SS OVR lowered to 10%.

- [laser] Tested a working version and pushed the wrong one for the
last! 20161203 was pausing upon every spindle speed change. That’s not
right. Fixed so nearly all motions are passed through and does not stop.

- Minimum spindle speed override lower from 50% to 10%. Lasers could
use the lower speeds.

- Fixed a very minor bug related to G80 error checking. Allowed no
error with non-modal motions with axis words. Not correct and fixed.

- Fixed a compile error when disabling VARIABLE_SPINDLE

- [doc] Updated some obsolete documentation.

- [doc] Started a “Laser Mode” document that summarizes how Grbl’s new
laser mode works.
This commit is contained in:
chamnit
2016-12-04 23:49:48 -07:00
parent b753c542c7
commit 94083e8314
10 changed files with 155 additions and 50 deletions

View File

@ -363,8 +363,10 @@ ISR(TIMER1_COMPA_vect)
} else {
// Segment buffer empty. Shutdown.
st_go_idle();
// Ensure pwm is set properly upon completion of rate-controlled motion.
if (st.exec_block->is_pwm_rate_adjusted) { spindle_set_speed(SPINDLE_PWM_OFF_VALUE); }
#ifdef VARIABLE_SPINDLE
// Ensure pwm is set properly upon completion of rate-controlled motion.
if (st.exec_block->is_pwm_rate_adjusted) { spindle_set_speed(SPINDLE_PWM_OFF_VALUE); }
#endif
system_set_exec_state_flag(EXEC_CYCLE_STOP); // Flag main program for cycle end
return; // Nothing to do but exit.
}
@ -655,16 +657,18 @@ void st_prep_buffer()
prep.current_speed = sqrt(pl_block->entry_speed_sqr);
}
// Setup laser mode variables. PWM rate adjusted motions will always complete a motion with the
// spindle off.
st_prep_block->is_pwm_rate_adjusted = false;
if (settings.flags & BITFLAG_LASER_MODE) {
if (pl_block->condition & PL_COND_FLAG_SPINDLE_CCW) {
// Pre-compute inverse programmed rate to speed up PWM updating per step segment.
prep.inv_rate = 1.0/pl_block->programmed_rate;
st_prep_block->is_pwm_rate_adjusted = true;
#ifdef VARIABLE_SPINDLE
// Setup laser mode variables. PWM rate adjusted motions will always complete a motion with the
// spindle off.
st_prep_block->is_pwm_rate_adjusted = false;
if (settings.flags & BITFLAG_LASER_MODE) {
if (pl_block->condition & PL_COND_FLAG_SPINDLE_CCW) {
// Pre-compute inverse programmed rate to speed up PWM updating per step segment.
prep.inv_rate = 1.0/pl_block->programmed_rate;
st_prep_block->is_pwm_rate_adjusted = true;
}
}
}
#endif
}
/* ---------------------------------------------------------------------------------