Acceleration control after gcode start

Basic Information:

Printer Model: DIY
MCU / Printerboard: BTTskr 1.4

Hi all.
How do I control the acceleration of the printer at the start print time? I can control all the acceleration values ​​on Orcaslicer and I can lower them all but when the printer has finished all the preparation of the start.gcode it moves to the starting point too fast and the belt loses steps, how can I lower the acceleration of that movement?
THX

Hello @mv83 !

Have a look on line 10.

[printer]
kinematics:
#   The type of printer in use. This option may be one of: cartesian,
#   corexy, corexz, hybrid_corexy, hybrid_corexz, rotary_delta, delta,
#   deltesian, polar, winch, or none. This parameter must be specified.
max_velocity:
#   Maximum velocity (in mm/s) of the toolhead (relative to the
#   print). This value may be changed at runtime using the
#   SET_VELOCITY_LIMIT command. This parameter must be specified.
max_accel:
#   Maximum acceleration (in mm/s^2) of the toolhead (relative to the
#   print). Although this parameter is described as a "maximum"
#   acceleration, in practice most moves that accelerate or decelerate
#   will do so at the rate specified here. The value specified here
#   may be changed at runtime using the SET_VELOCITY_LIMIT command.
#   This parameter must be specified.
#minimum_cruise_ratio: 0.5
#   Most moves will accelerate to a cruising speed, travel at that
#   cruising speed, and then decelerate. However, some moves that
#   travel a short distance could nominally accelerate and then
#   immediately decelerate. This option reduces the top speed of these
#   moves to ensure there is always a minimum distance traveled at a
#   cruising speed. That is, it enforces a minimum distance traveled
#   at cruising speed relative to the total distance traveled. It is
#   intended to reduce the top speed of short zigzag moves (and thus
#   reduce printer vibration from these moves). For example, a
#   minimum_cruise_ratio of 0.5 would ensure that a standalone 1.5mm
#   move would have a minimum cruising distance of 0.75mm. Specify a
#   ratio of 0.0 to disable this feature (there would be no minimum
#   cruising distance enforced between acceleration and deceleration).
#   The value specified here may be changed at runtime using the
#   SET_VELOCITY_LIMIT command. The default is 0.5.
#square_corner_velocity: 5.0
#   The maximum velocity (in mm/s) that the toolhead may travel a 90
#   degree corner at. A non-zero value can reduce changes in extruder
#   flow rates by enabling instantaneous velocity changes of the
#   toolhead during cornering. This value configures the internal
#   centripetal velocity cornering algorithm; corners with angles
#   larger than 90 degrees will have a higher cornering velocity while
#   corners with angles less than 90 degrees will have a lower
#   cornering velocity. If this is set to zero then the toolhead will
#   decelerate to zero at each corner. The value specified here may be
#   changed at runtime using the SET_VELOCITY_LIMIT command. The
#   default is 5mm/s.
#max_accel_to_decel:
#   This parameter is deprecated and should no longer be used.

Thx. This is my setting.

[printer]

kinematics: cartesian

max_velocity: 400

max_accel: 500

max_z_velocity: 10

max_z_accel: 100

I think that’s not the problem, I also installed KAMP, after the purge line it moves in the print area too abruptly, the accelerations while printing and moving from one side to another are ok. This is my start gcode

[gcode_macro START_PRINT]
gcode:

    G92 E0 ; Reset Extruder

    {% set BED_TEMP = params.BED_TEMP|default(60)|float %}

    {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(200)|float %}

    M140 S{BED_TEMP} ;Start heating bed

    G28 ; Home all axes

    M190 S{BED_TEMP} ;Wait for bed to reach temp before proceeding

    BED_MESH_CLEAR                  # clear current mesh

    G4 P500                  # wait required to prevent MCU overload / inconsistant meshing

    BED_MESH_CALIBRATE  ADAPTIVE=1 ADAPTIVE_MARGIN=5 ; Auto bed leveling

    G1 Z5.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed

    M104 S{EXTRUDER_TEMP}   # Start heating extruder

    #G1 X0.1 Y20 Z0.3 F5000.0   # Move to start position

    M109 S{EXTRUDER_TEMP} # Wait for extruder to reach temp before proceeding

    SMART_PARK  # Option activated in KAMP

    LINE_PURGE  # Option activated in KAMP

Please attach a recent klippy.log to your next post.

klippi.log (48.1 KB)

You may have a look on line 5

[gcode_macro LINE_PURGE]
description = A purge macro that adapts to be near your actual printed objects
gcode = 
	
	{% set travel_speed = (printer.toolhead.max_velocity) * 60 | float %}
	{% set cross_section = printer.configfile.settings.extruder.max_extrude_cross_section | float %}
	
	
	{% if printer.firmware_retraction is defined %}
	{% set RETRACT = G10 | string %}
	{% set UNRETRACT = G11 | string %}
	{% else %}
	{% set RETRACT = 'G1 E-.5 F2100' | string %}
	{% set UNRETRACT = 'G1 E.5 F2100' | string %}
	{% endif %}
	
	
	{% set verbose_enable = printer["gcode_macro _KAMP_Settings"].verbose_enable | abs %}
	{% set purge_height = printer["gcode_macro _KAMP_Settings"].purge_height | float %}
	{% set tip_distance = printer["gcode_macro _KAMP_Settings"].tip_distance | float %}
	{% set purge_margin = printer["gcode_macro _KAMP_Settings"].purge_margin | float %}
	{% set purge_amount = printer["gcode_macro _KAMP_Settings"].purge_amount | float %}
	{% set flow_rate = printer["gcode_macro _KAMP_Settings"].flow_rate | float %}
	
	
	
	{% set all_points = printer.exclude_object.objects | map(attribute='polygon') | sum(start=[]) %}
	{% set purge_x_min = (all_points | map(attribute=0) | min | default(0)) %}
	{% set purge_x_max = (all_points | map(attribute=0) | max | default(0)) %}
	{% set purge_y_min = (all_points | map(attribute=1) | min | default(0)) %}
	{% set purge_y_max = (all_points | map(attribute=1) | max | default(0)) %}
	
	{% set purge_x_center = ([((purge_x_max + purge_x_min) / 2) - (purge_amount / 2), 0] | max) %}
	{% set purge_y_center = ([((purge_y_max + purge_y_min) / 2) - (purge_amount / 2), 0] | max) %}
	
	{% set purge_x_origin = ([purge_x_min - purge_margin, 0] | max) %}
	{% set purge_y_origin = ([purge_y_min - purge_margin, 0] | max) %}
	
	
	{% set purge_move_speed = (flow_rate / 5.0) * 60 | float %}
	
	{% if cross_section < 5 %}
	
	{action_respond_info("[Extruder] max_extrude_cross_section is insufficient for purge, please set it to 5 or greater. Purge skipped.")}
	
	{% else %}
	
	{% if verbose_enable == True %}
	
	{action_respond_info("Moving filament tip {}mms".format(
	(tip_distance),
	)) }
	{% endif %}
	
	{% if printer.firmware_retraction is defined %}
	{action_respond_info("KAMP purge is using firmware retraction.")}
	{% else %}
	{action_respond_info("KAMP purge is not using firmware retraction, it is recommended to configure it.")}
	{% endif %}
	
	{% if purge_y_origin > 0 %}
	
	{action_respond_info("KAMP purge starting at {}, {} and purging {}mm of filament, requested flow rate is {}mm3/s.".format(
	(purge_x_center),
	(purge_y_origin),
	(purge_amount),
	(flow_rate),
	)) }
	
	{% else %}
	
	{action_respond_info("KAMP purge starting at {}, {} and purging {}mm of filament, requested flow rate is {}mm3/s.".format(
	(purge_x_origin),
	(purge_y_center),
	(purge_amount),
	(flow_rate),
	)) }
	
	{% endif %}
	
	SAVE_GCODE_STATE NAME=Prepurge_State
	
	{% if purge_y_origin > 0 %}
	
	G92 E0
	G0 F{travel_speed}
	G90
	G0 X{purge_x_center} Y{purge_y_origin}
	G0 Z{purge_height}
	M83
	G1 E{tip_distance} F{purge_move_speed}
	G1 X{purge_x_center + purge_amount} E{purge_amount} F{purge_move_speed}
	{RETRACT}
	G0 X{purge_x_center + purge_amount + 10} F{travel_speed}
	G92 E0
	M82
	G0 Z{purge_height * 2} F{travel_speed}
	
	{% else %}
	
	G92 E0
	G0 F{travel_speed}
	G90
	G0 X{purge_x_origin} Y{purge_y_center}
	G0 Z{purge_height}
	M83
	G1 E{tip_distance} F{purge_move_speed}
	G1 Y{purge_y_center + purge_amount} E{purge_amount} F{purge_move_speed}
	{RETRACT}
	G0 Y{purge_y_center + purge_amount + 10} F{travel_speed}
	G92 E0
	M82
	G0 Z{purge_height * 2} F{travel_speed}
	
	{% endif %}
	
	RESTORE_GCODE_STATE NAME=Prepurge_State
	
	{% endif %}

1 Like

Ok Thx. I added this line at the bottom of the start gcode after the LINE_PURGE macro is called and the problem was solved

SET_VELOCITY_LIMIT [VELOCITY=printer.toolhead.max_velocity]

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.