Add Z late enable.
Until this commit, the Z axis is disabled after each move and only enabled when the Z axis will move. Now you can enable this as a feature. Some printer axes are too heavy or have a high pitch which are not self locking. In that case simply do nothing. It's now off by default.
This commit is contained in:
parent
57cf28ad36
commit
57afef9fdd
|
|
@ -176,6 +176,13 @@
|
|||
*/
|
||||
//#define USE_INTERNAL_PULLUPS
|
||||
|
||||
/** \def Z_LATE_ENABLE
|
||||
Some printers have a heavy z-axis, some a not self locking spindle. In that case
|
||||
you should not activate this. This will deactivate the stepper after a finished move,
|
||||
and will only activate it, when z will move.
|
||||
*/
|
||||
//#define Z_LATE_ENABLE
|
||||
|
||||
/** \def TEMP_HYSTERESIS
|
||||
Actual temperature must be target +/- this hysteresis before target
|
||||
temperature is considered to be achieved. Also, BANG_BANG tries to stay
|
||||
|
|
|
|||
|
|
@ -176,6 +176,13 @@
|
|||
*/
|
||||
//#define USE_INTERNAL_PULLUPS
|
||||
|
||||
/** \def Z_LATE_ENABLE
|
||||
Some printers have a heavy z-axis, some a not self locking spindle. In that case
|
||||
you should not activate this. This will deactivate the stepper after a finished move,
|
||||
and will only activate it, when z will move.
|
||||
*/
|
||||
//#define Z_LATE_ENABLE
|
||||
|
||||
/** \def TEMP_HYSTERESIS
|
||||
Actual temperature must be target +/- this hysteresis before target
|
||||
temperature is considered to be achieved. Also, BANG_BANG tries to stay
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ class MiscellaneousPage(wx.Panel, Page):
|
|||
self.font = font
|
||||
|
||||
self.labels = {'USE_INTERNAL_PULLUPS': "Use Internal Pullups",
|
||||
'Z_LATE_ENABLE': "Z Late Enable",
|
||||
'EECONFIG': "Enable EEPROM Storage",
|
||||
'BANG_BANG': "Enable",
|
||||
'BANG_BANG_ON': "On PWM Level:",
|
||||
|
|
@ -74,6 +75,10 @@ class MiscellaneousPage(wx.Panel, Page):
|
|||
cb = self.addCheckBox(k, self.onCheckBox)
|
||||
sz.Add(cb, pos = (6, 1))
|
||||
|
||||
k = 'Z_LATE_ENABLE'
|
||||
cb = self.addCheckBox(k, self.onCheckBox)
|
||||
sz.Add(cb, pos = (7, 1))
|
||||
|
||||
b = wx.StaticBox(self, wx.ID_ANY, "BANG BANG Bed Control")
|
||||
b.SetFont(font)
|
||||
sbox = wx.StaticBoxSizer(b, wx.VERTICAL)
|
||||
|
|
|
|||
|
|
@ -176,6 +176,13 @@
|
|||
*/
|
||||
#define USE_INTERNAL_PULLUPS
|
||||
|
||||
/** \def Z_LATE_ENABLE
|
||||
Some printers have a heavy z-axis, some a not self locking spindle. In that case
|
||||
you should not activate this. This will deactivate the stepper after a finished move,
|
||||
and will only activate it, when z will move.
|
||||
*/
|
||||
#define Z_LATE_ENABLE
|
||||
|
||||
/** \def TEMP_HYSTERESIS
|
||||
Actual temperature must be target +/- this hysteresis before target
|
||||
temperature is considered to be achieved. Also, BANG_BANG tries to stay
|
||||
|
|
|
|||
17
dda.c
17
dda.c
|
|
@ -279,7 +279,10 @@ void dda_create(DDA *dda, TARGET *target) {
|
|||
stepper_enable();
|
||||
x_enable();
|
||||
y_enable();
|
||||
// Z is enabled in dda_start()
|
||||
#ifndef Z_LATE_ENABLE
|
||||
z_enable();
|
||||
// #else Z is enabled in dda_start().
|
||||
#endif
|
||||
e_enable();
|
||||
|
||||
// since it's unusual to combine X, Y and Z changes in a single move on reprap, check if we can use simpler approximations before trying the full 3d approximation.
|
||||
|
|
@ -492,8 +495,10 @@ void dda_start(DDA *dda) {
|
|||
if ( ! dda->nullmove) {
|
||||
// get ready to go
|
||||
psu_timeout = 0;
|
||||
if (dda->delta[Z])
|
||||
z_enable();
|
||||
#ifdef Z_LATE_ENABLE
|
||||
if (dda->delta[Z])
|
||||
z_enable();
|
||||
#endif
|
||||
if (dda->endstop_check)
|
||||
endstops_on();
|
||||
|
||||
|
|
@ -715,8 +720,10 @@ void dda_step(DDA *dda) {
|
|||
#ifdef DC_EXTRUDER
|
||||
heater_set(DC_EXTRUDER, 0);
|
||||
#endif
|
||||
// z stepper is only enabled while moving
|
||||
z_disable();
|
||||
#ifdef Z_LATE_ENABLE
|
||||
// Z stepper is only enabled while moving.
|
||||
z_disable();
|
||||
#endif
|
||||
|
||||
// No need to restart timer here.
|
||||
// After having finished, dda_start() will do it.
|
||||
|
|
|
|||
Loading…
Reference in New Issue