diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2016-12-01 16:04:48 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2016-12-01 18:17:54 -0500 |
commit | 71b4923208b0fda7810d923ae8e2a178030eebac (patch) | |
tree | bf6ec175ee1853248198acbab46e8549986f9094 | |
parent | c49d3fdb17d6ba8f90099826355200d5219ab6b6 (diff) | |
download | kutter-71b4923208b0fda7810d923ae8e2a178030eebac.tar.gz kutter-71b4923208b0fda7810d923ae8e2a178030eebac.tar.xz kutter-71b4923208b0fda7810d923ae8e2a178030eebac.zip |
delta: Support limiting the maximum velocity of z moves
On a delta printer, z moves require the mcu to support the greatest
number of steps per second. However, z moves are rare, so it makes
sense to limit the velocity of z moves separately from the velocity of
normal xy moves.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r-- | config/example-delta.cfg | 7 | ||||
-rw-r--r-- | klippy/delta.py | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/config/example-delta.cfg b/config/example-delta.cfg index 5954be68..c2a46db0 100644 --- a/config/example-delta.cfg +++ b/config/example-delta.cfg @@ -79,8 +79,13 @@ pin_map: arduino [printer] kinematics: delta # This option must be "delta" for linear delta printers -max_velocity: 200 +max_velocity: 300 max_accel: 3000 +max_z_velocity: 200 +# For delta printers this limits the maximum velocity (in mm/s) of +# moves with z axis movement. This setting can be used to reduce the +# maximum speed of up/down moves (which require a higher step rate +# than other moves on a delta printer). delta_arm_length: 333.0 # Length (in mm) of the diagonal rods that connect the linear axes # to the print head diff --git a/klippy/delta.py b/klippy/delta.py index 3b2ad674..ef7dbde7 100644 --- a/klippy/delta.py +++ b/klippy/delta.py @@ -14,6 +14,7 @@ class DeltaKinematics: printer, config.getsection('stepper_' + n), n) for n in ['a', 'b', 'c']] self.need_motor_enable = True + self.max_z_velocity = config.getfloat('max_z_velocity', 9999999.9) radius = config.getfloat('delta_radius') arm_length = config.getfloat('delta_arm_length') self.arm_length2 = arm_length**2 @@ -122,6 +123,8 @@ class DeltaKinematics: if end_pos[2] > self.limit_z: if end_pos[2] > self.max_z or xy2 > (self.max_z - end_pos[2])**2: raise homing.EndstopMoveError(end_pos) + if move.axes_d[2]: + move.limit_speed(self.max_z_velocity, 9999999.9) def move_z(self, move_time, move): if not move.axes_d[2]: return |