Aller au contenu

Messages recommandés

Posté(e)

Bonjour, 

j'ai l'erreur suivante quand je veux imprimer des pièces sur mon plateau (dimensions de la pièces Ø19,5 cm) :

Move out of range: 138.840 235.913 0.078 [303.150]

Je n'arrive pas à comprendre d'où vient le problème.

Si quelqu'un a la solution je suis preneur.

PS : ci-dessous mes fichiers printer.cfg, macro.cfg, macro_bed_mesh.cfg

Révélation

#fichiers macros

[respond] 
[include macro_bed_mesh.cfg]
[include macros.cfg]
[include macro_clean_nozzle.cfg]
[exclude_object]

[board_pins]
aliases:
  EXP1_1=PC6,EXP1_3=PB10,EXP1_5=PB14,EXP1_7=PB12,EXP1_9=<GND>,
  EXP1_2=PB2,EXP1_4=PB11,EXP1_6=PB13,EXP1_8=PB15,EXP1_10=<5V>,
  PROBE_IN=PB0,PROBE_OUT=PB1,FIL_RUNOUT=PC6

#SYSTEME 
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
restart_method: command

[temperature_sensor raspberry_pi]
sensor_type: temperature_host
min_temp: 10
max_temp: 85

[temperature_sensor mcu_temp]
sensor_type: temperature_mcu
min_temp: 0
max_temp: 100

[virtual_sdcard]
path: ~/gcode_files
path: /home/pifbr/corexy_data/gcodes

[display_status]

[pause_resume]

[printer]
kinematics: cartesian
max_velocity: 300 
max_accel: 5500 #3000
max_accel_to_decel: 5500 #3000
square_corner_velocity: 5 
max_z_velocity: 5
max_z_accel: 100

[fan]
pin: PA0
#ligne piquée sur https://github.com/Aussie84d/MainSail-Klipper/blob/main/printer.cfg
[idle_timeout]
gcode:
    TURN_OFF_HEATERS
timeout: 600                            ; Seconds to wait before running G-Code. Default is 600 seconds.
# nouvelle commande mainsail

# Machine definitions
[stepper_x]
step_pin: PB9
dir_pin: PC2
enable_pin: !PC3
microsteps: 16
rotation_distance: 40.136  
endstop_pin: ^PA5
position_endstop: 0
position_max: 235
homing_speed: 50

[stepper_y]
step_pin: PB7
dir_pin: PB8
enable_pin: !PC3
microsteps: 16
rotation_distance: 39.858
endstop_pin: ^PA6
position_endstop: 0 
position_max: 235
homing_speed: 50

[stepper_z]
step_pin: PB5#PB6
dir_pin: !PB6#!PB5
enable_pin: !PC3
microsteps: 16
rotation_distance: 8.05
endstop_pin: probe:z_virtual_endstop    # enable to use BLTouch
position_min: -5                        # enable to use BLTouch
position_max: 250

[safe_z_home]
# home_xy_position:  159.5, 122.5 #avec Satsana
home_xy_position: 159.5, 122.5 #avec voron afterburner
speed: 80.0
z_hop: 10.0
z_hop_speed: 10.0

[filament_switch_sensor my_sensor]
pause_on_runout: true
runout_gcode:
     M600
switch_pin: !PA4  


#----------------------------------------//--------------------------------------------------------
#EXTRUDER
#----------------------------------------//--------------------------------------------------------

[extruder]
max_extrude_only_distance: 200.0
step_pin: PB3
dir_pin: !PB4 #pour OMG V2 dir_pin: PB4 et pour Voron afterburner avec kit BMG dir_pin: !PB4
enable_pin: !PC3
microsteps: 16
rotation_distance: 7.402   #pour OMG V2 = 8.458, pour Voron afterburner avec kit BMG e/step = 415 soit 7.71
#gear_ratio: 50:10  # d'après ficher technique BMG
#full_steps_per_rotation: 200
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA1
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC5
control: pid
pid_Kp: 21.527
pid_Ki: 1.063
pid_Kd: 108.982
min_temp: 0
max_temp: 275
pressure_advance: 0.01
pressure_advance_smooth_time: 0.040

#----------------------------------------//--------------------------------------------------------
#BED
#----------------------------------------//--------------------------------------------------------

[heater_bed]
heater_pin: PA2
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC4
control: pid
pid_Kp: 54.027
pid_Ki: 0.770
pid_Kd: 948.182
min_temp: 0
max_temp: 130

# BLTouch 
[bltouch]
sensor_pin: ^PB1
control_pin: PB0 
x_offset: -28.87 #pour le satsana -54.3 #pour la version stock = -44  afterburner -28.87
y_offset: 14.95 # pour le satsana -18.2 #pour la version stock -7 afterburner +14.95
#z_offset: 2.290#3.9
#pin_move_time: 0.4
pin_up_touch_mode_reports_triggered: true 
probe_with_touch_mode: True 
set_output_mode : 5V

######################ACCELEROMETRE ADXL345

[mcu rpi]
serial: /tmp/klipper_host_mcu

[adxl345 bed]
cs_pin: rpi:None
spi_bus: spidev5.0

[adxl345 hotend]
cs_pin: rpi:None
spi_bus: spidev6.0

[resonance_tester]
accel_chip_x: adxl345 hotend
accel_chip_y: adxl345 bed
probe_points:
   115, 115, 20 
max_smoothing: 0.2  

[input_shaper]
shaper_type_x = mzv
shaper_freq_x = 45.4
shaper_type_y = mzv
shaper_freq_y = 43.4

#############################################################################

# Calibration

[screws_tilt_adjust]
screw1: 72.5, 41.5
screw1_name: front left screw
screw2: 240, 41.5 #198.5,41.5
screw2_name: front right screw
screw3: 240, 212.5 #198.5,212.5
screw3_name: rear right screw
screw4: 72.5,212.5
screw4_name: rear left screw
horizontal_move_z: 10
speed: 200 #50
screw_thread: CW-M4

[bed_mesh]
speed: 250
horizontal_move_z: 10 #5
mesh_min: 40, 40
mesh_max: 190, 190 
probe_count: 9,9
algorithm: bicubic # décommenter 
relative_reference_index: 40
fade_start: 1
fade_end: 10 #10
#fade_target: 0 #commenter la ligne

#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [bltouch]
#*# z_offset = 2.843
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*#       0.037177, 0.034698, 0.017349
#*#       0.027263, 0.000000, -0.000000
#*#       0.019828, -0.042133, -0.044612
#*# tension = 0.2
#*# min_x = 95.0
#*# algo = lagrange
#*# y_count = 3
#*# mesh_y_pps = 2
#*# min_y = 95.01
#*# x_count = 3
#*# max_y = 135.0
#*# mesh_x_pps = 2
#*# max_x = 134.99
#*#
#*# [input_shaper]
 

Révélation


[gcode_macro START_PRINT]
#variable_T_BED: 60
#variable_T_EXTRUDER: 200
#variable_STANDBY_T_EXTRUDER: 170
gcode:
    {% set T_BED = params.T_BED|default(60)|float %}
    {% set T_EXTRUDER = params.T_EXTRUDER|default(200)|float %}
    {% set STANDBY_T_EXTRUDER = params.STANDBY_T_EXTRUDER|default(170)|float %}
    {% set FL_SIZE = params.SIZE|default("0_0_0_0")|string %}    
    M117 Homing
    # Use absolute coordinates
    G90
    # Reset Pressure Advance to 0, will be adjusted later in gcode based on material settings from cura
    #M900 K0
    # Reset the G-Code Z offset (adjust Z offset if needed)
    SET_GCODE_OFFSET Z=0.0
    # Home the printer
    G28
    ADAPTIVE_BED_MESH SIZE={FL_SIZE}
    
    # Move the nozzle near the bed
    G1 X15 Y20 Z5 F6000
    # Move the nozzle very close to the bed
    G1 Z0.15 F300    
    M117 Waiting for temperature
    # Start bed and extruder heating and continue
    M104 S{STANDBY_T_EXTRUDER}
    M140 S{T_BED}
    {% if printer.heater_bed.temperature < params.T_BED|float*0.85 %}
        M190 S{params.T_BED|float*0.85} # wait till 0.85 of bed temp is reached, then continue  
    {% endif %}
    
    M140 S{T_BED} 
    M104 S170
    M190 S{T_BED}
    M109 S{T_EXTRUDER}
    
    # Prime line
    PURGE
    M117 Printing...


[gcode_macro END_PRINT]
gcode =
    G91 ; relative positioning
    G1 Z2 ; lift z up
    G90 ; absolute positioning
    G1 X0 Y200 ; bring nozzle left and bed forward
    M106 S0 ; turn off cooling fan
    M104 S0 ; turn off extruder
    M140 S0 ; turn off bed
    M84 ; disable motors
    M117 PRINT COMPLETE!  ;
#[gcode_macro END_PRINT]
#gcode:
#    G91
#    G1 E-3 F1800
#    G1 Z+20 F3000

#   G90
#    G1 X10 Y220 F2000

    ##disable hotend, bed and steppers
#    M104 S0
#    M140 S0
#    M84
#    M117 Complete
#    M300


[gcode_macro M600]
gcode:
    {% set X = params.X|default(50)|float %}
    {% set Y = params.Y|default(0)|float %}
    {% set Z = params.Z|default(10)|float %}
    SAVE_GCODE_STATE NAME=M600_state
    PAUSE
    G91
    G1 E-.8 F2700
    G1 Z{Z}
    G90
    G1 X{X} Y{Y} F3000
    G91
    G1 E-50 F1000
    RESTORE_GCODE_STATE NAME=M600_state

# load filament
#[gcode_macro M701]
[gcode_macro LOAD]
gcode:
    SAVE_GCODE_STATE NAME=loading_filament
    M117 Loading Filament
    M83
    G92 E0.0
    LOW_TEMP_CHECK
    G1 E10 F300   # Traction lente 10mm @ 25mm/s
    G1 E100 F300  # longueur du tube bowden (~430mm) 
    G1 E50 F300    # purge --> lentement 
    G92 E0.0
    RESTORE_GCODE_STATE NAME=loading_filament
    
# unload filament
#[gcode_macro M702]
[gcode_macro UNLOAD]
gcode:
    SAVE_GCODE_STATE NAME=unloading_filament
    M125 # park
    M117 Unloading Filament 
    LOW_TEMP_CHECK
    G91 # set relative
    G1 E5 F100  # preparation retrait
    G92 E0.0
    G1 E-15 F1500  # retraction primaire
    G1 E-55 F1800  # retrait hors tete  
    G1 E-100 F1500 # longueur du tube bowden (430mm)  
    G92 E0.0
    RESTORE_GCODE_STATE NAME=unloading_filament

[gcode_macro Z_OFFSET_CALIBRATION]
gcode:
    G28
    PROBE_CALIBRATE

[gcode_macro REGLAGE_PLATEAU]
gcode:
    G28
    SCREWS_TILT_CALCULATE

[gcode_arcs]
resolution: 1.0

[gcode_macro PURGE]
gcode: 
    M117 Prime Line
    G92 E0 ;Reset Extruder
    # move z axis 
    G1 Z2.0 F3000 ;Move Z Axis up
    # move to prime position 
    G1 X16 Y30 Z0.28 F5000.0 ;Move to start position
    G1 X16 Y200.0 Z0.28 F1500.0 E15 ;Draw the first line
    G1 X16.4 Y200.0 Z0.28 F5000.0 ;Move to side a little
    G1 X16.4 Y50 Z0.28 F1500.0 E30 ;Draw the second line
    G92 E0 ;Reset Extruder
    G1 Z2.0 F3000 ;Move Z Axis up


#[pause_resume]


#[display_status]

[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
    TURN_OFF_HEATERS
    CANCEL_PRINT_BASE

[gcode_macro PAUSE]
description: Pause the actual running print
rename_existing: PAUSE_BASE
# change this if you need more or less extrusion
variable_extrude: 1.0
gcode:
    ##### read E from pause macro #####
    {% set E = printer["gcode_macro PAUSE"].extrude|float %}
    ##### set park positon for x and y #####
    # default is your max posion from your printer.cfg
    {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
    {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
    ##### calculate save lift position #####
    {% set max_z = printer.toolhead.axis_maximum.z|float %}
    {% set act_z = printer.toolhead.position.z|float %}
    {% if act_z < (max_z - 2.0) %}
        {% set z_safe = 2.0 %}
    {% else %}
        {% set z_safe = max_z - act_z %}
    {% endif %}
    ##### end of definitions #####
    PAUSE_BASE
    G91
    {% if printer.extruder.can_extrude|lower == 'true' %}
      G1 E-{E} F2100
    {% else %}
      {action_respond_info("Extruder not hot enough")}
    {% endif %}
    {% if "xyz" in printer.toolhead.homed_axes %}
      G1 Z{z_safe} F900
      G90
      G1 X{x_park} Y{y_park} F6000
    {% else %}
      {action_respond_info("Printer not homed")}
    {% endif %} 
    
[gcode_macro RESUME]
description: Resume the actual running print
rename_existing: RESUME_BASE
gcode:
    ##### read E from pause macro #####
    {% set E = printer["gcode_macro PAUSE"].extrude|float %}
    #### get VELOCITY parameter if specified ####
    {% if 'VELOCITY' in params|upper %}
      {% set get_params = ('VELOCITY=' + params.VELOCITY)  %}
    {%else %}
      {% set get_params = "" %}
    {% endif %}
    ##### end of definitions #####
    {% if printer.extruder.can_extrude|lower == 'true' %}
      G91
      G1 E{E} F2100
    {% else %}
      {action_respond_info("Extruder not hot enough")}
    {% endif %}  
    RESUME_BASE {get_params}

Révélation

#########################################
########## ADAPTIVE BED MESH ############
#########################################
# Written by Frix_x#0161 #
# @version: 2.2

# CHANGELOG:
#   v2.2: remove the requirement to set mesh_pps in the [bed_mesh] section. It's now again optional as it should be
#   v2.1: fix for the nominal mesh (when no SIZE parameter is used or SIZE=0_0_0_0)
#   v2.0: split in multple macros to be able to use the center point in the z calibration bed probing position before doing the mesh
#   v1.1: fix for a bug when parsing string when using uppercase letters in the [bed_mesh] section
#   v1.0: first adaptive bed mesh macro


### What is it ? ###
# The adaptive bed mesh is simple: it's a normal bed mesh, but only "where" and "when" it's necessary.
# Sometime I print small parts, sometime I print full plates and I like to get a precise bed_mesh (like 9x9 or more). However, it take a
# lot of time and it's useless to probe all the plate for only a 5cm² part. So this is where the adaptive bed mesh is helping:
# 1. It get the corners coordinates of the fisrt layer surface from the slicer
# 2. It compute a new set of points to probe on this new zone to get at least the same precision as your standard bed mesh. For example, if
#    a normal bed mesh is set to 9x9 for 300mm², it will then compute 3x3 for a 100mm² surface. Also if for whatever reason your parts are in
#    the corner of the build plate (like for a damaged PEI in the center), it will follow them to probe this exact area.
# 3. As the probed points computed are odd, it will also compute the new relative reference index point in the center of the zone and save
#    the coordinates of this point to use them somwhere else (like the probed point of the auto z calibration plugin for example).
# 4. To go further, it will not do any bed_mesh if there is less than 3x3 points to probe (very small part alone) and choose/change the
#    algorithm (bicubic/lagrange) depending of the size and shape of the mesh computed (like 3x3 vs 3x9)

# -------------------------------------------------------------------------------------------------------------------------
### Installation ###
# 1. You need to change some settings in your slicer:
#      a. SuperSlicer is easy: change your custom g_code PRINT_START macro to add the SIZE argument like this:
#               PRINT_START [all your shit..] SIZE={first_layer_print_min[0]}_{first_layer_print_min[1]}_{first_layer_print_max[0]}_{first_layer_print_max[1]}
#      b. Cura is a bit more tricky as you need to install the post process plugin by frankbags called MeshPrintSize.py.
#               In Cura menu, click Help > Show configuration folder. Copy the python script from the following link into the plugins folder: https://gist.github.com/frankbags/c85d37d9faff7bce67b6d18ec4e716ff#file-meshprintsize-py
#               (some users reported problems with newer versions of Cura, so if it's not working, try placing the script here: "C:\Program Files\Ultimaker Cura 5.0.0\share\cura\plugins\PostProcessingPlugin\scripts")
#               Then restart Cura and select in the menu: Extensions > Post processing > select Mesh Print Size
#               At the end, change your custom g_code PRINT_START macro to add the SIZE argument like this:
#               PRINT_START [all your shit..] SIZE=%MINX%_%MINY%_%MAXX%_%MAXY%
# 2. In klipper, configure a normal [bed_mesh] section in your config as you want for your machine (it will be the base to compute the new adaptive bed mesh). Keep
#    in mind that you can push further the precision a little bit with a mesh of 9x9 for example as not all the points will be probed for smaller parts.
# 3. VERY IMPORTANT CHECKS:
#      a. Check that the mesh_min, mesh_max, probe_count and mesh_pps configs entry in your [bed_mesh] section are specified using double numbers like "probe_count: 9,9"
#         as my macro is waiting for TWO numbers and will fail if there is only one specified at thoose positions.
# 4. Optional check: my macro is using the RESPOND command for debugging purposes: either add the [respond] section to your config or delete all the RESPOND lines in my macro
# 5. Finally, there is two way to use this set of macros:
#      a. Normal easy way for most of the users (retro-compatible with version 1): in your klipper config, modify your PRINT_START macro definition to get 
#         the SIZE argument and then call the ADAPTIVE_BED_MESH macro with it to start the probing sequence like so:
#             {% set FL_SIZE = params.SIZE|default("0_0_0_0")|string %}
#             ADAPTIVE_BED_MESH SIZE={FL_SIZE}
#      b. For power users that also use the auto z_calibration plugin: in your klipper config, modify your PRINT_START macro definition to get
#         the SIZE argument and then call the COMPUTE_MESH_PARAMETERS macro with it like so:
#             {% set FL_SIZE = params.SIZE|default("0_0_0_0")|string %}
#             COMPUTE_MESH_PARAMETERS SIZE={FL_SIZE}
#         Then you can call the CALIBRATE_Z command with the computed mesh center point (here is a simple example, but look at my own macros for more safety):
#             {% set mesh_center = printer["gcode_macro _ADAPTIVE_MESH_VARIABLES"].mesh_center %}
#             CALIBRATE_Z BED_POSITION={mesh_center}
#         Finally, do a simple call to ADAPTIVE_BED_MESH when you are ready to effectively do the mesh

# -------------------------------------------------------------------------------------------------------------------------
# Feel free to ping me on Discord (Frix_x#0161) if you need help or have any comments to improve it 🙂


# DO NOT MODIFY THOSE VARIABLES (they are used internaly by the adaptive bed mesh macro)
[gcode_macro _ADAPTIVE_MESH_VARIABLES]
variable_ready: False
variable_do_mesh: False
variable_do_nominal: False
variable_mesh_min: 0,0
variable_mesh_max: 0,0
variable_mesh_center: 0,0
variable_probe_count: 0,0
variable_rri: 0
variable_algo: "bicubic"
gcode:


[gcode_macro COMPUTE_MESH_PARAMETERS]
description: Compute the mesh parameters and store them for later use
gcode:
    # 1 ----- GET ORIGINAL BEDMESH PARAMS FROM CONFIG ----------------------
    {% set xMinConf, yMinConf = printer["configfile"].config["bed_mesh"]["mesh_min"].split(',')|map('trim')|map('int') %}
    {% set xMaxConf, yMaxConf = printer["configfile"].config["bed_mesh"]["mesh_max"].split(',')|map('trim')|map('int') %}
    {% set xProbeCntConf, yProbeCntConf = printer["configfile"].config["bed_mesh"]["probe_count"].split(',')|map('trim')|map('int') %}
    {% set algo = printer["configfile"].config["bed_mesh"]["algorithm"]|lower %}
    {% set xMeshPPS, yMeshPPS = (printer["configfile"].config["bed_mesh"]["mesh_pps"] | default('2,2')).split(',')|map('trim')|map('int') %}

    # If the SIZE parameter is defined and not a dummy placeholder, we do the adaptive
    # bed mesh logic. If it's ommited, we do the original BED_MESH_CALIBRATE function (full bed probing)
    {% if params.SIZE is defined and params.SIZE != "0_0_0_0" %}

        # 2 ----- GET MESH SIZE AND MARGIN FROM MACRO CALL --------------------
        {% set xMinSpec, yMinSpec, xMaxSpec, yMaxSpec = params.SIZE.split('_')|map('trim')|map('int') %}
        {% set margin = params.MARGIN|default(5)|int %}

        # 3 ----- APPLY MARGINS ----------------------------------------------
        # We use min/max function as we want it to be constrained by the original
        # bedmesh size. This will avoid going outside the machine limits
        {% set xMin = [xMinConf, (xMinSpec - margin)]|max %}
        {% set xMax = [xMaxConf, (xMaxSpec + margin)]|min %}
        {% set yMin = [yMinConf, (yMinSpec - margin)]|max %}
        {% set yMax = [yMaxConf, (yMaxSpec + margin)]|min %}

        # 4 ----- COMPUTE A NEW PROBE COUNT ----------------------------------
        # The goal is to have at least the same precision as from the config. So we compute an equivalent number
        # of probe points on each X/Y dimensions (distance between two points should be the same as in the config)
        {% set xProbeCnt = ((xMax - xMin) * xProbeCntConf / (xMaxConf - xMinConf))|round(0, 'ceil')|int %}
        {% set yProbeCnt = ((yMax - yMin) * yProbeCntConf / (yMaxConf - yMinConf))|round(0, 'ceil')|int %}

        # Then, three possibilities :
        # a) Both dimensions have less than 3 probe points : the bed_mesh is not needed as it's a small print.
        # b) If one of the dimension is less than 3 and the other is greater. The print looks to be elongated and
        #    need the adaptive bed_mesh : we add probe points to the small direction to reach 3 and be able to do it.
        # c) If both direction are greater than 3, we need the adaptive bed_mesh and it's ok.
        # At the end we control (according to Klipper bed_mesh method: "_verify_algorithm") that the computed probe_count is
        # valid according to the choosen algorithm or change it if needed.
        {% if xProbeCnt < 3 and yProbeCnt < 3 %}
            RESPOND MSG="Computed mesh parameters: none, bed mesh not needed"
            SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=do_mesh VALUE={False}

            {% set xCenter = xMin + ((xMax - xMin) / 2) %}
            {% set yCenter = yMin + ((yMax - yMin) / 2) %}
            {% set mesh_center = "%d,%d"|format(xCenter, yCenter) %} # we still compute the mesh center for those using klipper_z_calibration
            SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=mesh_center VALUE='"{mesh_center}"'
        {% else %}
            {% set xProbeCnt = [3, xProbeCnt]|max %}
            {% set yProbeCnt = [3, yProbeCnt]|max %}

            # We verify that the number of probe points on each axis is odd or add one to it
            # This is very important to have a relative_reference_index point at the center of the mesh !
            {% if xProbeCnt % 2 == 0 %}
                {% set xProbeCnt = xProbeCnt + 1 %}
            {% endif %}
            {% if yProbeCnt % 2 == 0 %}
                {% set yProbeCnt = yProbeCnt + 1 %}
            {% endif %}

            # Check of the probe points and interpolation algorithms according to Klipper code
            {% if xMeshPPS != 0 or yMeshPPS != 0 %}
                {% set probeCntMin = [xProbeCnt, yProbeCnt]|min %}
                {% set probeCntMax = [xProbeCnt, yProbeCnt]|max %}
                {% if algo == "lagrange" and probeCntMax > 6 %}
                    # Lagrange interpolation tends to oscillate when using more than 6 samples: swith to bicubic
                    {% set algo = "bicubic" %}
                {% endif %}
                {% if algo == "bicubic" and probeCntMin < 4 %}
                    {% if probeCntMax > 6 %}
                        # Impossible case: need to add probe point on the small axis to be >= 4 (we want 5 to keep it odd)
                        {% if xProbeCnt > yProbeCnt %}
                            {% set yProbeCnt = 5 %}
                        {% else %}
                            {% set xProbeCnt = 5 %}
                        {% endif %}
                    {% else %}
                        # In this case bicubic is not adapted (less than 4 points): switch to lagrange
                        {% set algo = "lagrange" %}
                    {% endif %}
                {% endif %}
            {% endif %}

            # 5 ----- COMPUTE THE RELATIVE_REFERENCE_INDEX POINT --------------------
            {% set rRefIndex = (((xProbeCnt * yProbeCnt) - 1) / 2)|int %}
            {% set xCenter = xMin + ((xMax - xMin) / 2) %}
            {% set yCenter = yMin + ((yMax - yMin) / 2) %}

            # 6 ----- FORMAT THE PARAMETERS AND SAVE THEM ---------------------------
            {% set mesh_min = "%d,%d"|format(xMin, yMin) %}
            {% set mesh_max = "%d,%d"|format(xMax, yMax) %}
            {% set probe_count = "%d,%d"|format(xProbeCnt, yProbeCnt) %}
            {% set mesh_center = "%d,%d"|format(xCenter, yCenter) %}
            RESPOND MSG="Computed mesh parameters: MESH_MIN={mesh_min} MESH_MAX={mesh_max} MESH_CENTER={mesh_center} PROBE_COUNT={probe_count} RELATIVE_REFERENCE_INDEX={rRefIndex} ALGORITHM={algo}"
            SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=do_mesh VALUE={True}
            SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=do_nominal VALUE={False}
            SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=mesh_min VALUE='"{mesh_min}"'
            SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=mesh_max VALUE='"{mesh_max}"'
            SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=mesh_center VALUE='"{mesh_center}"'
            SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=probe_count VALUE='"{probe_count}"'
            SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=rri VALUE={rRefIndex}
            SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=algo VALUE='"{algo}"'
        {% endif %}
    {% else %}
        RESPOND MSG="Computed mesh parameters: none, going for a nominal bed mesh"
        SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=do_mesh VALUE={True}
        SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=do_nominal VALUE={True}

        {% set xCenter = xMinConf + ((xMaxConf - xMinConf) / 2) %}
        {% set yCenter = yMinConf + ((yMaxConf - yMinConf) / 2) %}
        {% set mesh_center = "%d,%d"|format(xCenter, yCenter) %} # we still compute the mesh center for those using klipper_z_calibration
        SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=mesh_center VALUE='"{mesh_center}"'
    {% endif %}

    # Finaly save in the variables that we already computed the values
    SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=ready VALUE={True}


[gcode_macro ADAPTIVE_BED_MESH]
description: Perform a bed mesh, but only where and when it's needed
gcode:
    {% set ready = printer["gcode_macro _ADAPTIVE_MESH_VARIABLES"].ready %}

    {% if not 'xyz' in printer.toolhead.homed_axes %}
        { action_raise_error("Must Home printer first!") }
    {% endif %}

    # If the parameters where computed, we can do the mesh by calling the _DO_ADAPTIVE_MESH
    {% if ready %}
        _DO_ADAPTIVE_MESH

    # If the parameters where not computed prior to the ADAPTIVE_BED_MESH call, we call the COMPUTE_MESH_PARAMETERS
    # macro first and then call the _DO_ADAPTIVE_MESH macro after it
    {% else %}
        RESPOND MSG="Adaptive bed mesh: parameters not computed, automatically calling the COMPUTE_MESH_PARAMETERS macro prior to the mesh"
        COMPUTE_MESH_PARAMETERS {rawparams}
        M400 # mandatory to flush the gcode buffer and be sure to use the last computed parameters
        _DO_ADAPTIVE_MESH
    {% endif %}


[gcode_macro _DO_ADAPTIVE_MESH]
gcode:
    # 1 ----- POPULATE BEDMESH PARAMS FROM SAVED VARIABLES ----------------------
    {% set do_mesh = printer["gcode_macro _ADAPTIVE_MESH_VARIABLES"].do_mesh %}
    {% set do_nominal = printer["gcode_macro _ADAPTIVE_MESH_VARIABLES"].do_nominal %}
    {% set mesh_min = printer["gcode_macro _ADAPTIVE_MESH_VARIABLES"].mesh_min %}
    {% set mesh_max = printer["gcode_macro _ADAPTIVE_MESH_VARIABLES"].mesh_max %}
    {% set probe_count = printer["gcode_macro _ADAPTIVE_MESH_VARIABLES"].probe_count %}
    {% set rRefIndex = printer["gcode_macro _ADAPTIVE_MESH_VARIABLES"].rri %}
    {% set algo = printer["gcode_macro _ADAPTIVE_MESH_VARIABLES"].algo %}

    # 2 --------- ADAPTIVE_BED_MESH LOGIC --------------------------------------

    # If it's necessary to do a mesh
    {% if do_mesh %}
        # If it's a standard bed_mesh to be done
        {% if do_nominal %}
            RESPOND MSG="Adaptive bed mesh: nominal bed mesh"
            BED_MESH_CALIBRATE
        {% else %}
            RESPOND MSG="Adaptive bed mesh: MESH_MIN={mesh_min} MESH_MAX={mesh_max} PROBE_COUNT={probe_count} RELATIVE_REFERENCE_INDEX={rRefIndex} ALGORITHM={algo}"
            BED_MESH_CALIBRATE MESH_MIN={mesh_min} MESH_MAX={mesh_max} PROBE_COUNT={probe_count} RELATIVE_REFERENCE_INDEX={rRefIndex} ALGORITHM={algo}
        {% endif %}
    {% else %}
        RESPOND MSG="Adaptive bed mesh: no mesh to be done"
    {% endif %}

    # Set back the 'ready' parameter to false
    SET_GCODE_VARIABLE MACRO=_ADAPTIVE_MESH_VARIABLES VARIABLE=ready VALUE={False}

 

Posté(e)
il y a 5 minutes, FBR39120 a dit :

235.913

Tu as essayé d'aller en Y au-delà de 235 qui est la limite maximale de l'axe Y déclarée dans stepper_y

Quelles dimensions de surface imprimable sont déclarées dans le trancheur ?

Une jupe est-elle utilisée ?

… ?

🙂

 

Posté(e)

image.thumb.png.dbaf7da95f5d0f90eebb5ab10203ea97.png

Et pas de jupe demandée

du coups j'ai regardé mon fichier printer.cfg et j'ai changé dans [stepper_x] et [stepper_y] l'argument position_max: 235 pour le passer à 225

Posté(e) (modifié)

Tu aurais pu faire le contraire: augmenter la taille d'impression dans Prusaslicer 😉

Tu évoques un diamètre de 195 mm, cylindre ? centré sur le plateau ou décalé ? … ?

Comme je ne sais pas ce que tu cherches à imprimer, j'ai beau regarder dans ma boule de  cristal, elle ne me dit pas ce qui ne va pas, même ChatGPT en reste sans voix.

🙂

Modifié (le) par fran6p
Posté(e)

J'aimerais imprimé ceci, un cendrier de ma création, ça rentre un diamètre de 195mm.

Bien qu'en ayant modifié les paramètre klipper pour m'accorder avec les paramètre de mon slicer j'ai toujours le même problème

Move out of range: 126.036 225.974 0.227 [272.757]

Mais cette fois les coordonnées sont différentes.

J'ai aussi demandé à Chat GPT mais il est tout aussi perdu que moi

image.png

Autre chose qui a peut être son importance j'ai remplacé par tête d'impression par celle d'une voron 'voron afterburner, et j'ai changé les positions de la tête dans prusa slicer

car sinon klipper ne peut pas se centrer sur le plateau lorsque je fais un homing

j'ai donc modifié les paramètres suivant dans prusa 

image.png.de4263bcd1b189b0e6d7fe0e267a3c82.png

Posté(e)

Pas sûr que cette modification dans le trancheur soit en cause.

Par contre le centre déclaré dans safe_z_home pourrait être la cause. Tu déclares le centre en 159,5 - 122,5. Avec ta pièce qui fait un diamètre de 195mm, donc un rayon de 97,5 en Y ça passe ( 122,5 + 97,5 = 220) mais en X ça ne passe plus ( 159,5 + 97,5 = 257 ).

Le centre du plateau (pour la buse) est habituellement à la moitié des x_max et y_max.

A voir avec d'autres avis.

🙂

Posté(e) (modifié)
il y a une heure, fran6p a dit :

Par contre le centre déclaré dans safe_z_home pourrait être la cause. Tu déclares le centre en 159,5 - 122,5. Avec ta pièce qui fait un diamètre de 195mm, donc un rayon de 97,5 en Y ça passe ( 122,5 + 97,5 = 220) mais en X ça ne passe plus ( 159,5 + 97,5 = 257 ).

Alors en effet j'avais modifié la valeur de safe_z_home pour que ce soit la pointe de mon BLtouch qui soit centré sur le plateau et j'avais modifié le décalage de l'extrudeur en fonction de la position de ma buse par rapport au bltouch

Nouvelle tentative pour corriger le problème en m'intéressant au paramètre safe_z_home, j'ai mis un scotch sur mon bed et j'ai tracer le centre de celui-ci.

J'ai fait un homing puis j'ai ensuite déplacer ma buse en x et y pour qu'elle pointe sur le centre du plateau.

J'ai utiliser la commande GET_POSITION et j'ai noté les coordonnées que m'indique TOOLHEAD en x et y à savoir 134, 137.5

Et ça refait pareil 

Move out of range: 137.023 235.472 0.132 [273.378]

 

Du coups à tout hasard je retranche mon fichier et je relance l'impression

et ça fait pareil

Modifié (le) par FBR39120
Posté(e)
Il y a 6 heures, LeNooB78 a dit :

C'est un bug de klipper, redémarre le firmware et relance ton impression 

Je l'ai fait et ça fait pareil.

 

Posté(e) (modifié)

Pas vraiment d'idées.

Juste une chose: les dimensions de la zone imprimable sont-elles les mêmes dans Klipper et le trancheur ? Ça s'est déjà vu qu'une surface plus grande déclarée dans le trancheur que celle déclarée dans les sections stepper_x et/ou y provoque ce message d'erreur: move out of range.

🙂

Modifié (le) par fran6p
Posté(e) (modifié)
il y a 16 minutes, fran6p a dit :

Pas vraiment d'idées.

Juste une chose: les dimensions de la zone imprimable sont les mêmes dans Klipper et le trancheur ? Ça s'est déjà vu qu'une surface plus grande déclarée dans le trancheur que celle déclarée dans les sections stepper_x et/ou y provoque ce message d'erreur: move out of range.

🙂

Fort possible,

j'ai eu ce type d'erreur en ayant augmenté les limites du bedmesh. (klipper sonicPad)

🙂

Modifié (le) par hyoti
correction
Posté(e)

Alors voici les paramètres de mon trancheur :

image.thumb.png.3217b5a76f989b8d4c2826a82c1df01a.png

 

et voici les paramètres déclarée dans mon printer.cfg concernant les steppers x et y

Révélation

[stepper_x]
step_pin: PB9
dir_pin: PC2
enable_pin: !PC3
microsteps: 16
rotation_distance: 40.136  
endstop_pin: ^PA5
position_endstop: 0
position_max: 235
homing_speed: 50

[stepper_y]
step_pin: PB7
dir_pin: PB8
enable_pin: !PC3
microsteps: 16
rotation_distance: 39.858
endstop_pin: ^PA6
position_endstop: 0
position_max: 235
homing_speed: 50

J'ai tenté une réduction de l'échelle de la pièce à imprimer et j'ai rencontré le même problème.

Mainsail m'indique également le message suivant

image.png.bce166f40a18581fccb58dc181af67e2.png

Posté(e)

Bon alors je me suis dit peut être que c'est mon STL et qui déconne

Du coups j'ai créé un disque Ø195m dans Prusa hauteur 2 m, que j'ai imprimé en mode vase et bien ça fait la même chose.

Je vais réinstaller klipper complètement pour voir si ça ne corrige pas le problème.

 

Posté(e)

Bonjour,

Je vois que dans le trancheur, tes courses X et Y vont de -3 à 235 mm soir une distance de 238 mm

Or dans le Klipper, on a que 235...  Si tu mets l'origine de X et de Y à 0 dans ton slicer, as-tu toujours le problème ?

Posté(e)

ou sans modifier le trancheur, en précisant dans les sections stepper_xy, le paramètre position_endstop de 0 à -3

Pour l'erreur voir la référence de configuration de la section [bed_mesh]

Révélation
#zero_reference_position:
#   An optional X,Y coordinate that specifies the location on the bed
#   where Z = 0.  When this option is specified the mesh will be offset
#   so that zero Z adjustment occurs at this location.  The default is
#   no zero reference.
#relative_reference_index:
#   **DEPRECATED, use the "zero_reference_position" option**
#   The legacy option superceded by the "zero reference position".
#   Rather than a coordinate this option takes an integer "index" that
#   refers to the location of one of the generated points. It is recommended
#   to use the "zero_reference_position" instead of this option for new
#   configurations. The default is no relative reference index.

🙂

  • +1 1
Posté(e)

J'ai réussi à corriger le problème.

Dans prusa slicer j'ai remis le paramètre par défaut image.png.6bcda054725a514fa81835ef6de87299.png

Dans mon fichier printer.cfg , dans les sections stepper_xy, le paramètre position_endstop de 0 à -3

J'ai lancé une impression d'un disque de Ø195 en mode vase et ça fonctionne.

 

 

  • J'aime 1
Posté(e) (modifié)

Donc c'était bien une histoire de concordance entre le slicer et Klipper comme le suggérait @fran6p...

Par contre j'ai l'impression que tu as sur-corrigé : maintenant c'est Klipper qui doit avoir une surface utilisable plus grande que celle décrite dans le slicer... mais dans ce sens là, ça ne devrait pas poser de problème.

Modifié (le) par RFN_31
Posté(e)

@FBR39120

On peut donc ajouter [RÉSOLU] dans le titre du sujet ?

Si tu peux le faire, «juste fais-le» sinon je modifierai le titre.

Comme l'a dit @RFN_31, il vaut mieux que ce soit du côté de Klipper que les dimensions soient plus grandes, le trancheur lui limitera les impressions à la taille paramétrée. Le seul défaut éventuel est que l'objet imprimé ne sera plus centré sur le plateau mais OSEF 😄

🙂

Créer un compte ou se connecter pour commenter

Vous devez être membre afin de pouvoir déposer un commentaire

Créer un compte

Créez un compte sur notre communauté. C’est facile !

Créer un nouveau compte

Se connecter

Vous avez déjà un compte ? Connectez-vous ici.

Connectez-vous maintenant
  • Sur cette page :   0 membre est en ligne

    • Aucun utilisateur enregistré regarde cette page.
  • YouTube / Les Imprimantes 3D .fr

×
×
  • Créer...