mirror of https://github.com/Desuuuu/klipper.git
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>
This commit is contained in:
parent
c49d3fdb17
commit
71b4923208
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue