FBR39120 Posté(e) Septembre 30, 2023 Posté(e) Septembre 30, 2023 Bonjour à tous, Après plusieurs tentative, j'ai enfin réussi à configurer correctement klipper pour ma smartcub. Je vous pose les fichiers config de klipper ici à copier/coller ou sinon à télécharger Pour le fichier : printer.cfg Révélation #" "# This file contains common pin mappings for RAMPS (v1.3 and later) # boards. RAMPS boards typically use a firmware compiled for the AVR # atmega2560 (though the atmega1280 is also possible). # See docs/Config_Reference.md for a description of parameters. [virtual_sdcard] path: ~/printer_data/gcodes path: /home/pifbr/ender3_data/gcodes [include macros.cfg] [temperature_sensor raspberry_pi] sensor_type: temperature_host min_temp: 10 max_temp: 85 [stepper_x] step_pin: PF0 dir_pin: !PF1 enable_pin: !PD7 microsteps: 16 rotation_distance: 39.8 endstop_pin: ^PE5 position_endstop: 0 position_max: 192 homing_speed: 50 second_homing_speed: 10 [stepper_y] step_pin: PF6 dir_pin: !PF7 enable_pin: !PF2 microsteps: 16 rotation_distance: 39.741 endstop_pin: ^PJ0 position_endstop: 190 position_max: 190 homing_speed: 50 second_homing_speed: 10 [stepper_z] step_pin: PL3 dir_pin: !PL1 enable_pin: !PK0 microsteps: 16 rotation_distance: 8.024 endstop_pin: ^PD2 position_max: 170 position_min: -50 #-1.5 homing_speed: 15 position_endstop: 166.426 second_homing_speed: 3.0 [extruder] step_pin: PA4 dir_pin: !PA6 enable_pin: !PA2 microsteps: 16 rotation_distance: 20.713 nozzle_diameter: 0.400 filament_diameter: 1.750 heater_pin: PB4 sensor_type: Generic 3950 #NTC 100K beta 3950 sensor_pin: PK5 #control: pid #pid_Kp: 22.2 #pid_Ki: 1.08 #pid_Kd: 114 min_temp: 0 max_temp: 260 [heater_bed] heater_pin: PH5 sensor_type: Generic 3950 #EPCOS 100K B57560G104F sensor_pin: PK6 #control: watermark #pid_Kp: 70.715 #pid_Ki: 1.366 #pid_Kd: 914.880 min_temp: 0 max_temp: 70 [fan] pin: PH6 [mcu] serial: /dev/ttyACM0 [printer] kinematics: cartesian max_velocity: 300 max_accel: 7000 max_z_velocity: 25 max_z_accel: 60 max_accel_to_decel: 7000 [display] lcd_type: hd44780 rs_pin: EXP1_4 e_pin: EXP1_3 d4_pin: EXP1_5 d5_pin: EXP1_6 d6_pin: EXP1_7 d7_pin: EXP1_8 encoder_pins: ^EXP2_3, ^EXP2_5 click_pin: ^!EXP1_2 #kill_pin: ^!EXP2_8 ############################################################################################################################# [homing_override] axes: z set_position_z: 0 gcode: G90 G0 Z2 F600 G28 X Y G28 Z G0 x100 y100 f5000 # The safe_z_home section modifies the default G28 behavior #[safe_z_home] #z_hop: 30 #z_hop_speed: 5 ########################################################################################################################### [output_pin BEEPER_pin] pin: PC0 # Beeper pin. This parameter must be provided. # ar37 is the default RAMPS/MKS pin. pwm: True # A piezo beeper needs a PWM signal, a DC buzzer doesn't. value: 0 # Silent at power on, set to 1 if active low. shutdown_value: 0 # Disable at emergency shutdown (no PWM would be available anyway). cycle_time: 0.001 # PWM frequency : 0.001 = 1ms will give a base tone of 1kHz scale: 1000 # PWM parameter will be in the range of (0-1000 Hz). # Although not pitch perfect. ###################################################################### ## PROBE ###################################################################### [probe] pin: ^!PD3 #valeur PJ1 x_offset: 0.0 y_offset: 0.0 z_offset: 0.8 speed: 5.0 samples: 2 #samples_result: average sample_retract_dist: 2 #samples_tolerance: 0.1 [bed_tilt] #x_adjust: 0 #y_adjust: 0 #z_adjust: 0 # g-code command that may be used to calibrate appropriate x and y # adjustment parameters. # A list of X,Y coordinates (one per line; subsequent lines # indented) that should be probed during a BED_TILT_CALIBRATE # command. Specify coordinates of the nozzle and be sure the probe # is above the bed at the given nozzle coordinates. The default is # to not enable the command. horizontal_move_z: 20 # The height (in mm) that the head should be commanded to move to # just prior to starting a probe operation. The default is 5. speed: 50 points: 10,10 185,8 185,190 10,190 [input_shaper] shaper_type_x = 3hump_ei shaper_freq_x = 83.0 shaper_type_y = 2hump_ei shaper_freq_y = 40.0 # Common EXP1 / EXP2 (display) pins [board_pins] aliases: # Common EXP1 header found on many "all-in-one" ramps clones EXP1_1=PC0, EXP1_3=PH0, EXP1_5=PA1, EXP1_7=PA5, EXP1_9=<GND>, EXP1_2=PC2, EXP1_4=PH1, EXP1_6=PA3, EXP1_8=PA7, EXP1_10=<5V>, # EXP2 header EXP2_1=PB3, EXP2_3=PC6, EXP2_5=PC4, EXP2_7=PL0, EXP2_9=<GND>, EXP2_2=PB1, EXP2_4=PB0, EXP2_6=PB2, EXP2_8=PG0, EXP2_10=<RST> # Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "spi" # Note, some boards wire: EXP2_8=<RST>, EXP2_10=PG0 # See the sample-lcd.cfg file for definitions of common LCD displays. #*# <---------------------- SAVE_CONFIG ----------------------> #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. #*# #*# [heater_bed] #*# control = pid #*# pid_kp = 70.715 #*# pid_ki = 1.332 #*# pid_kd = 938.746 #*# #*# [extruder] #*# control = pid #*# pid_kp = 33.624 #*# pid_ki = 1.822 #*# pid_kd = 155.092 #*# #*# [probe] #*# z_offset = 0.003 #*# #*# [stepper_z] #*# position_endstop = 168.256 Pour le fichier macros.cfg Révélation [gcode_macro START_PRINT] # Use START_PRINT for the slicer starting script - please customise for your slicer of choice 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 %} #M117 Let's go baby... G90 # coordonées absolues G28 # HOMING # déchargement de de filament pour palpage G1 E5 F100 # preparation retrait G92 E0.0 G1 E-15 F1500 # retraction primaire M117 Heating.... BED_TILT_CALIBRATE #palpage plateau M104 S{T_EXTRUDER} M140 S{T_BED} M109 S{T_EXTRUDER} M190 S{T_BED} #Chargement du filament pour impression G92 E0.0 G1 E15 F300 M117 Purge Extruder G92 E0 G1 Z7 F3000 G1 X5 Y190 G1 X100 Y190 F1500.0 E15 G92 E0 G1 Z20 F3000 M117 Start print [gcode_macro END_PRINT] gcode: # Turn off bed, extruder, and fan M140 S0 M104 S0 M106 S0 # Move nozzle away from print while retracting G91 G1 X-3 Y-3 E-3 F300 # Raise nozzle by 10mm G1 Z10 F3000 G90 # Disable steppers M84 M300 M117 Fin impression [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 X30 Y30 Z0.28 F5000.0 ;Move to start position G1 X100 Y30.0 Z0.28 F1500.0 E15 ;Draw the first line G1 X100 Y30.0 Z0.28 F5000.0 ;Move to side a little G1 X50 Y30 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: ##### get user parameters or use default ##### {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set allow_park = False if not macro_found else False if client.park_at_cancel is not defined else True if client.park_at_cancel|lower == 'true' else False %} {% set retract = 5.0 if not macro_found else client.cancel_retract|default(5.0)|abs %} ##### define park position ##### {% set park_x = "" if not macro_found else "" if client.park_at_cancel_x is not defined else "X=" + client.park_at_cancel_x|string if client.park_at_cancel_x is not none %} {% set park_y = "" if not macro_found else "" if client.park_at_cancel_y is not defined else "Y=" + client.park_at_cancel_y|string if client.park_at_cancel_y is not none %} {% set custom_park = True if (park_x|length > 0 or park_y|length > 0) else False %} ##### end of definitions ##### {% if (custom_park or not printer.pause_resume.is_paused) and allow_park %} _TOOLHEAD_PARK_PAUSE_CANCEL {park_x} {park_y} {% endif %} _CLIENT_RETRACT LENGTH={retract} TURN_OFF_HEATERS M106 S0 # clear pause_next_layer and pause_at_layer as preparation for next print SET_PAUSE_NEXT_LAYER ENABLE=0 SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0 CANCEL_PRINT_BASE [gcode_macro PAUSE] description: Pause the actual running print rename_existing: PAUSE_BASE gcode: SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=last_extruder_temp VALUE="{printer[printer.toolhead.extruder].target}" PAUSE_BASE _TOOLHEAD_PARK_PAUSE_CANCEL {rawparams} [gcode_macro RESUME] description: Resume the actual running print rename_existing: RESUME_BASE variable_last_extruder_temp: 0 gcode: ##### get user parameters or use default ##### {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %} {% set sp_move = velocity if not macro_found else client.speed_move|default(velocity) %} ##### end of definitions ##### M109 S{last_extruder_temp} _CLIENT_EXTRUDE RESUME_BASE VELOCITY={params.VELOCITY|default(sp_move)} # Usage: SET_PAUSE_NEXT_LAYER [ENABLE=[0|1]] [MACRO=<name>] [gcode_macro SET_PAUSE_NEXT_LAYER] description: Enable a pause if the next layer is reached gcode: {% set pause_next_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_next_layer %} {% set ENABLE = params.ENABLE | default(1) | int != 0 %} {% set MACRO = params.MACRO | default(pause_next_layer.call, True) %} SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE="{{ 'enable': ENABLE, 'call': MACRO }}" # Usage: SET_PAUSE_AT_LAYER [ENABLE=[0|1]] [LAYER=<number>] [MACRO=<name>] [gcode_macro SET_PAUSE_AT_LAYER] description: Enable/disable a pause if a given layer number is reached gcode: {% set pause_at_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_at_layer %} {% set ENABLE = params.ENABLE | int != 0 if params.ENABLE is defined else params.LAYER is defined %} {% set LAYER = params.LAYER | default(pause_at_layer.layer) | int %} {% set MACRO = params.MACRO | default(pause_at_layer.call, True) %} SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE="{{ 'enable': ENABLE, 'layer': LAYER, 'call': MACRO }}" # Usage: SET_PRINT_STATS_INFO [TOTAL_LAYER=<total_layer_count>] [CURRENT_LAYER= <current_layer>] [gcode_macro SET_PRINT_STATS_INFO] rename_existing: SET_PRINT_STATS_INFO_BASE description: Overwrite, to get pause_next_layer and pause_at_layer feature variable_pause_next_layer: { 'enable': False, 'call': "PAUSE" } variable_pause_at_layer : { 'enable': False, 'layer': 0, 'call': "PAUSE" } gcode: {% if pause_next_layer.enable %} {action_respond_info("%s, forced by pause_next_layer" % pause_next_layer.call)} {pause_next_layer.call} ; execute the given gcode to pause, should be either M600 or PAUSE SET_PAUSE_NEXT_LAYER ENABLE=0 {% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER|int == pause_at_layer.layer %} {action_respond_info("%s, forced by pause_at_layer [%d]" % (pause_at_layer.call, pause_at_layer.layer))} {pause_at_layer.call} ; execute the given gcode to pause, should be either M600 or PAUSE SET_PAUSE_AT_LAYER ENABLE=0 {% endif %} SET_PRINT_STATS_INFO_BASE {rawparams} ##### internal use ##### [gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL] description: Helper: park toolhead used in PAUSE and CANCEL_PRINT gcode: ##### get user parameters or use default ##### {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %} {% set use_custom = False if not macro_found else False if client.use_custom_pos is not defined else True if client.use_custom_pos|lower == 'true' else False %} {% set custom_park_x = 0.0 if not macro_found else client.custom_park_x|default(0.0) %} {% set custom_park_y = 0.0 if not macro_found else client.custom_park_y|default(0.0) %} {% set park_dz = 2.0 if not macro_found else client.custom_park_dz|default(2.0)|abs %} {% set sp_hop = 900 if not macro_found else client.speed_hop|default(15) * 60 %} {% set sp_move = velocity * 60 if not macro_found else client.speed_move|default(velocity) * 60 %} ##### get config and toolhead values ##### {% set origin = printer.gcode_move.homing_origin %} {% set act = printer.gcode_move.gcode_position %} {% set max = printer.toolhead.axis_maximum %} {% set cone = printer.toolhead.cone_start_z|default(max.z) %} ; height as long the toolhead can reach max and min of an delta {% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch'] else False %} ##### define park position ##### {% set z_min = params.Z_MIN|default(0)|float %} {% set z_park = [[(act.z + park_dz), z_min]|max, (max.z - origin.z)]|min %} {% set x_park = params.X if params.X is defined else custom_park_x if use_custom else 0.0 if round_bed else (max.x - 5.0) %} {% set y_park = params.Y if params.Y is defined else custom_park_y if use_custom else (max.y - 5.0) if round_bed and z_park < cone else 0.0 if round_bed else (max.y - 5.0) %} ##### end of definitions ##### _CLIENT_RETRACT {% if "xyz" in printer.toolhead.homed_axes %} G90 G1 Z{z_park} F{sp_hop} G1 X{x_park} Y{y_park} F{sp_move} {% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %} {% else %} {action_respond_info("Printer not homed")} {% endif %} [gcode_macro _CLIENT_EXTRUDE] description: Extrudes, if the extruder is hot enough gcode: {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set use_fw_retract = False if not macro_found else False if client.use_fw_retract is not defined else True if client.use_fw_retract|lower == 'true' and printer.firmware_retraction is defined else False %} {% set length = (params.LENGTH|float) if params.LENGTH is defined else 1.0 if not macro_found else client.unretract|default(1.0) %} {% set speed = params.SPEED if params.SPEED is defined else 35 if not macro_found else client.speed_unretract|default(35) %} {% set absolute_extrude = printer.gcode_move.absolute_extrude %} {% if printer.extruder.can_extrude %} {% if use_fw_retract %} {% if length < 0 %} G10 {% else %} G11 {% endif %} {% else %} M83 G1 E{length} F{(speed|float|abs) * 60} {% if absolute_extrude %} M82 {% endif %} {% endif %} {% else %} {action_respond_info("Extruder not hot enough")} {% endif %} [gcode_macro _CLIENT_RETRACT] description: Retracts, if the extruder is hot enough gcode: {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} {% set length = (params.LENGTH|float) if params.LENGTH is defined else 1.0 if not macro_found else client.retract|default(1.0) %} {% set speed = params.SPEED if params.SPEED is defined else 35 if not macro_found else client.speed_retract|default(35) %} _CLIENT_EXTRUDE LENGTH=-{length|float|abs} SPEED={speed|float|abs} # 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 E50 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-50 F1800 # retrait hors tete G1 E-50 F1500 # longueur du tube bowden (430mm) G92 E0.0 RESTORE_GCODE_STATE NAME=unloading_filament config-20230906-160443.zip 3
Messages recommandés
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 compteSe connecter
Vous avez déjà un compte ? Connectez-vous ici.
Connectez-vous maintenant