diff --git a/ENDER-23.cfg b/ENDER-23.cfg index 66cd01310bf2..54cf4e70be79 100644 --- a/ENDER-23.cfg +++ b/ENDER-23.cfg @@ -15,13 +15,13 @@ path: /home/ste/uploads [include stereotech_config/ender/kinematics_tmc.cfg] [include stereotech_config/ender/homing.cfg] - [include stereotech_config/ender/main_extruder.cfg] [include stereotech_config/ender/module_3d.cfg] +[include stereotech_config/ender/module_3d_macros.cfg] [include stereotech_config/ender/module_5d.cfg] [include stereotech_config/ender/print_macros.cfg] [include stereotech_config/ender/extruder_macros.cfg] [include stereotech_config/ender/variables.cfg] -[include stereotech_config/ender/probe.cfg] +# [include stereotech_config/ender/probe.cfg] diff --git a/docs/stereotech/manual_calibrate_bed_level.txt b/docs/stereotech/manual_calibrate_bed_level.txt new file mode 100644 index 000000000000..65a1602c8f0a --- /dev/null +++ b/docs/stereotech/manual_calibrate_bed_level.txt @@ -0,0 +1,10 @@ +step1 +Z_ENDSTOP_CALIBRATE + +2 +ACCEPT_Z_ENDSTOP + +3 +ACCEPT_Z_ENDSTOP + +..... diff --git a/docs/stereotech/manual_calibrate_old_teamplate.txt b/docs/stereotech/manual_calibrate_old_teamplate.txt new file mode 100644 index 000000000000..cc852eec26d7 --- /dev/null +++ b/docs/stereotech/manual_calibrate_old_teamplate.txt @@ -0,0 +1,42 @@ +"ручная калибровка 5д модуля" + #step5 + MOVE_SERVICE_POSITION + MOVE_CALIBRATION_POINT POINT=0 + #step6 + SET_A_AXIS_OFFSET_POINT POINT=0 + SAVE_A_AXIS_POINT POINT=0 COORDS=107.0,41.1,138.1 + #step7 + MOVE_CALIBRATION_POINT POINT=3 + SET_A_AXIS_OFFSET_POINT POINT=1 + SAVE_A_AXIS_POINT POINT=1 COORDS=106.3,90.9,139.5 + CALC_A_AXIS_OFFSET + MOVE_WCS_ZERO WCS=1 + #step8 + SET_WCS_OFFSET WCS=1 X=0 Y=0 Z=0 + SET_WCS_OFFSET WCS=3 X=0 Y=0 Z=0 + MOVE_WCS_ZERO WCS=2 + #step 9 + SET_WCS_OFFSET WCS=2 X=0 Y=0 Z=0.1 + SET_WCS_OFFSET WCS=4 X=0 Y=0 Z=0.1 + #step10 + HOME_POSITION ABORT=0 + +"ручная настройка точки старта печати FULL" + # step4 + MOVE_SERVICE_POSITION + # step7 + MOVE_WCS_ZERO WCS=1 + # step8 + SET_WCS_OFFSET WCS=1 ADJUST_WCS=2 X=0 Y=0 Z=0 + # step9 + HOME_POSITION ABORT=0 + +"ручная настройка точки старта печати SPIRAL" + # step4 + MOVE_SERVICE_POSITION + # step7 + MOVE_WCS_ZERO WCS=2 + # step8 + SET_WCS_OFFSET WCS=2 ADJUST_WCS=1 X=0 Y=0 Z=0 + # step9 + HOME_POSITION ABORT=0 diff --git a/stereotech_config/ENDER-23.cfg b/stereotech_config/ENDER-23.cfg index 53cef672cc81..7ac00fdcf0e4 100644 --- a/stereotech_config/ENDER-23.cfg +++ b/stereotech_config/ENDER-23.cfg @@ -2,7 +2,7 @@ serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0 restart_method: command -[mcu second] +[mcu second_mcu] serial: /dev/serial/by-id/usb-Klipper_stm32g0b1xx_5800260019504B5735313920-if00 restart_method: command @@ -11,9 +11,18 @@ path: /home/ste/uploads [display_status] - - [include config/ender/kinematics.cfg] [include config/ender/kinematics_tmc.cfg] +[include config/ender/homing.cfg] + + [include config/ender/main_extruder.cfg] [include config/ender/module_3d.cfg] +[include config/ender/module_3d_macros.cfg] +[include config/ender/module_5d.cfg] + +[include config/ender/print_macros.cfg] +[include config/ender/extruder_macros.cfg] +[include config/ender/variables.cfg] + +# [include config/ender/probe.cfg] diff --git a/stereotech_config/ender/extruder_macros.cfg b/stereotech_config/ender/extruder_macros.cfg index 1ceba9bf480e..9bdd58af4103 100644 --- a/stereotech_config/ender/extruder_macros.cfg +++ b/stereotech_config/ender/extruder_macros.cfg @@ -2,7 +2,7 @@ gcode: G91 {% set active_extruder = printer.toolhead.extruder %} - G1 E130 F300 + G1 E100 F300 G90 [gcode_macro EJECT_MATERIAL] @@ -10,7 +10,7 @@ gcode: LOAD_MATERIAL G91 {% set active_extruder = printer.toolhead.extruder %} - G1 E-130 F300 + G1 E-100 F300 G90 [gcode_macro LOAD_MATERIAL] @@ -28,30 +28,13 @@ gcode: [gcode_macro M109] rename_existing: M1091 gcode: - - {% set extruder = params.T|default(-1)|int %} - {% set current_extruder = printer.toolhead.extruder %} - {% if extruder >= 0 %} - {% if extruder == 0 %} - M117 extruder_heating - {% elif extruder == 1 %} - M117 extruder1_heating - {% endif %} - M1091 T{params.T} S{params.S} - {% else %} - {% if current_extruder == 'extruder' %} - M117 extruder_heating - {% elif current_extruder == 'extruder1' %} - M117 extruder1_heating - {% endif %} - M1091 S{params.S} - {% endif %} + M117 extruder_heating + M1091 S{params.S} M117 [gcode_macro TURN_OFF_EXTRUDERS] gcode: M104 T0 S0 - # M104 T1 S0 [delayed_gcode TURN_OFF_EXTRUDERS_DELAYED] gcode: diff --git a/stereotech_config/ender/homing.cfg b/stereotech_config/ender/homing.cfg index 60f2373406a7..d71e731dc50f 100644 --- a/stereotech_config/ender/homing.cfg +++ b/stereotech_config/ender/homing.cfg @@ -10,7 +10,6 @@ gcode: G28 A G28 C {% endif %} - G1 Y{axis_max[1] - 10} [gcode_macro MOVE_SERVICE_POSITION] gcode: @@ -23,24 +22,25 @@ gcode: G0 X{max_x / 2.0} Y50 F3600 SET_IDLE_TIMEOUT TIMEOUT=7200 -# [gcode_macro MOVE_SERVICE_POSITION_HEAD] -# gcode: -# {% set max_x = printer.toolhead.axis_maximum[0] %} -# G54 -# TURN_OFF_HEATERS -# G28 -# G92 E0 -# G90 -# G0 X{max_x / 2.0} Y50 Z200 F3600 -# SET_IDLE_TIMEOUT TIMEOUT=7200 +[gcode_macro MOVE_SERVICE_POSITION_HEAD] +gcode: + {% set max_x = printer.toolhead.axis_maximum[0] %} + G54 + TURN_OFF_HEATERS + G28 + G92 E0 + G90 + G0 X{max_x / 2.0} Y50 Z200 F3600 + SET_IDLE_TIMEOUT TIMEOUT=7200 [gcode_macro HOME_POSITION] gcode: {% set axis_max = printer.toolhead.axis_maximum %} G54 TURN_OFF_HEATERS + G1 C0 G1 Z{axis_max[2] - 50} - G1 Y{axis_max[1] - 50} + G1 Y0 G28 G92 E0 G90 diff --git a/stereotech_config/ender/kinematics.cfg b/stereotech_config/ender/kinematics.cfg index a6c2ece07367..e31758e0d1fe 100644 --- a/stereotech_config/ender/kinematics.cfg +++ b/stereotech_config/ender/kinematics.cfg @@ -25,7 +25,7 @@ microsteps: 16 rotation_distance: 40 endstop_pin: ^PA6 position_endstop: 0 -position_max: 235 +position_max: 230 homing_speed: 20 [stepper_z] @@ -38,7 +38,6 @@ endstop_pin: ^PA7 position_endstop: 0.0 position_max: 250 homing_speed: 20 -# position_max: 100 [stepper_a] step_pin: second_mcu: PB13 @@ -49,7 +48,7 @@ rotation_distance: 360 gear_ratio: 80:20 endstop_pin: second_mcu:PC0 position_endstop: 0 -position_min: 0 +position_min: -10 position_max: 90 homing_speed: 10 diff --git a/stereotech_config/ender/main_extruder.cfg b/stereotech_config/ender/main_extruder.cfg index c1d1e2427cf7..04605fb7d7e0 100644 --- a/stereotech_config/ender/main_extruder.cfg +++ b/stereotech_config/ender/main_extruder.cfg @@ -17,3 +17,16 @@ pid_Ki: 1.063 pid_Kd: 108.982 min_temp: 0 max_temp: 250 + +[gcode_macro T0] +gcode: + M117 set_extruder + {% set current_wcs = printer.gcode_move.current_wcs %} + {% if "x" in printer.toolhead.homed_axes and "y" in printer.toolhead.homed_axes and "z" in printer.toolhead.homed_axes and printer.toolhead.extruder != 'extruder' %} + G54 + MOVE_UP_Z_AXIS Z=5 + G0 X10 Y2 F3600 + {% endif %} + ACTIVATE_EXTRUDER extruder=extruder + SET_WCS WCS={current_wcs} + M117 diff --git a/stereotech_config/ender/module_3d.cfg b/stereotech_config/ender/module_3d.cfg index 1df3094d9d40..1208aa2f2195 100644 --- a/stereotech_config/ender/module_3d.cfg +++ b/stereotech_config/ender/module_3d.cfg @@ -10,5 +10,13 @@ pid_Kd: 948.182 min_temp: 0 max_temp: 130 +[bed_screws] +horizontal_move_z: 10.0 +screw1: 20,210 +screw2: 220,210 +screw1_fine_adjust: 159,0 +screw3: 20,10 +screw4: 220,10 + [fan] pin: PA0 diff --git a/stereotech_config/ender/module_3d_macros.cfg b/stereotech_config/ender/module_3d_macros.cfg new file mode 100644 index 000000000000..de54a24282f5 --- /dev/null +++ b/stereotech_config/ender/module_3d_macros.cfg @@ -0,0 +1,36 @@ +[gcode_macro M140] +rename_existing: M141 +gcode: + {% if printer["gcode_button five_axis_module"].state == "RELEASED" %} + M141 S{ params.S } + {% endif %} + +[gcode_macro M190] +rename_existing: M191 +gcode: + {% if printer["gcode_button five_axis_module"].state == "RELEASED" %} + M117 platform_heating + M191 S{ params.S } + M117 + {% endif %} + +[gcode_macro Z_ENDSTOP_CALIBRATE] +rename_existing: Z_ENDSTOP_CALIBRATE_OLD +gcode: + G54 + TURN_OFF_HEATERS + SET_GCODE_OFFSET Z=0 + G28 + G92 E0 + G0 X117 Y115 Z10 F3600 + SET_IDLE_TIMEOUT TIMEOUT=7200 + Z_ENDSTOP_CALIBRATE_OLD + +[gcode_macro ACCEPT_Z_ENDSTOP] +gcode: + ACCEPT + G28 Z + {% set probe = params.PROBE|default(0)|int %} + {% if probe < 1 %} + BED_SCREWS_ADJUST + {% endif %} diff --git a/stereotech_config/ender/module_5d.cfg b/stereotech_config/ender/module_5d.cfg index 891ff929f1ae..bc4de0372ec5 100644 --- a/stereotech_config/ender/module_5d.cfg +++ b/stereotech_config/ender/module_5d.cfg @@ -1,36 +1,41 @@ [gcode_button five_axis_module] -pin: second_mcu:PC4 +pin: !second_mcu:PC4 press_gcode: QUERY_BUTTON BUTTON=five_axis_module [a_axis_offset] [gcode_macro MOVE_WCS_ZERO] gcode: - {% set z_max = printer.toolhead.axis_maximum %} G54 - G0 Z{z_max[2]} F6000 + G0 Z200 F3600 {% set current_wcs = params.WCS|default(1)|int %} {% set offsets = printer.gcode_move.wcs_offsets[current_wcs] %} {% if offsets[0] == 0 and offsets[1] == 0 %} - G0 X125 Y50 F6000 + G0 X120 Y50 F3600 {% else %} - G0 X{offsets[0]} Y{offsets[1]} F6000 + G0 X{offsets[0]} Y{offsets[1]} F3600 {% endif %} {% if current_wcs == 1 %} G0 A0 {% elif current_wcs == 2 %} - G0 Y87 A90 F6000 + G0 Y110 A90 F3600 C-30 {% endif %} [gcode_macro SET_WCS_OFFSET] +description: macro for set the wcs for: manual calibrate FULL and SPIRALL and manual calibrate 5d module above old template gcode: G54 G90 {% set current_wcs = params.WCS|default(1)|int %} + {% set adjust_wcs = params.ADJUST_WCS|default(0)|int %} SET_WCS WCS={current_wcs} - G10 L20 X{params.X} Y{params.Y} Z{params.Z} + {% if (current_wcs == 2 or current_wcs == 4) and adjust_wcs == 0 %} + # for manual calibrate 5d module by old template + G10 L20 X{params.X} Y{params.Y} Z{params.Z|float + 50.0} + {% else %} + G10 L20 X{params.X} Y{params.Y} Z{params.Z} + {% endif %} G54 - {% set adjust_wcs = params.ADJUST_WCS|default(0)|int %} {% if adjust_wcs > 0 and adjust_wcs != current_wcs %} ADJUST_WCS_OFFSET WCS={current_wcs} ADJUST_WCS={adjust_wcs} X={params.X} Y={params.Y} Z={params.Z} {% endif %} @@ -46,36 +51,26 @@ gcode: {% set delta_x = printer.gcode_move.wcs_offsets[current_wcs][0] - offsets[0] %} {% set delta_y = printer.gcode_move.wcs_offsets[current_wcs][1] - offsets[1] %} {% set delta_z = printer.gcode_move.wcs_offsets[current_wcs][2] - offsets[2] %} - G10 L2 P{adjust_wcs + 1} X{offsets_2[0] + delta_x + params.X|float} Y{offsets_2[1] - delta_z + params.Z|float} Z{offsets_2[2] + delta_y + params.Y|float} + # G10 L2 P{adjust_wcs + 1} X{offsets_2[0] + delta_x + params.X|float} Y{offsets_2[1] - delta_z + params.Z|float} Z{offsets_2[2] + delta_y + params.Y|float} + G10 L2 P{adjust_wcs + 1} X{offsets_2[0] + delta_x + params.X|float} Y{offsets_2[1] - delta_z + params.Z|float} Z{offsets_2[2] + params.Y|float} [gcode_macro MOVE_CALIBRATION_POINT] gcode: G54 {% set point = params.POINT|default(0)|int %} - {% set x = 108 %} - {% set y = 80 %} - + {% set x = 118 %} + {% set y = 174 %} {% if point == 3 or point == 4 %} - {% set y = 87 %} + {% set y = 123 %} {% endif %} - {% if point == 1 %} - {% set x = 58 %} + {% set x = 118 %} {% endif %} - {% if point == 2 %} {% set x = 158 %} {% endif %} G0 A0 - # G0 X{x} Y{y} Z110 F3600 - # point0 - # G0 X108 Y80 Z130 F600 - # point1 - # G0 X58 Y80 Z130 F600 - # point2 - # G0 X158 Y80 Z130 F600 - # point4 - # G0 X158 Y87 Z130 F600 + G0 X{x} Y{y} Z150 F600 {% if point > 3 %} G0 Z150 A90 F600 {% endif %} diff --git a/stereotech_config/ender/print_macros.cfg b/stereotech_config/ender/print_macros.cfg index d89529c54f70..814683cc1938 100644 --- a/stereotech_config/ender/print_macros.cfg +++ b/stereotech_config/ender/print_macros.cfg @@ -90,29 +90,11 @@ gcode: TURN_OFF_HEATERS M107 SET_FAN_SPEED FAN=chamber_fan SPEED=0.0 - MOVE_DOWN_Z_AXIS Z={z} + MOVE_UP_Z_AXIS Z={z} G28 X0 Y0 T0 CANCEL_PRINT_BASE -# [gcode_macro SDCARD_PRINT_FILE] -# rename_existing: SDCARD_PRINT_FILE_BASE -# gcode: -# {% if params.DICT_STATE %} -# {action_respond_info("Realise gcode_macro SDCARD_PRINT_FILE-continued printing. File start with: %s position." % params.FILE_POSITION)} -# ACTIVATE_EXTRUDER EXTRUDER={params.EXTRUDER} -# M140 S{params.HEATER_BED_TEMP|default(75, true)} -# M190 S{params.HEATER_BED_TEMP|default(75, true)} -# M104 S{params.EXTRUDER_TEMP|default(255, true)} -# M109 S{params.EXTRUDER_TEMP|default(255, true)} -# M82 -# START -# LOAD_GCODE_STATE NAME=power_off PARAMS="{params.DICT_STATE}" -# RESTORE_GCODE_STATE NAME=power_off MOVE=1 MOVE_SPEED=30 -# SDCARD_PRINT_FILE_BASE FILENAME={params.FILENAME} POSITION={params.FILE_POSITION} -# {% else %} -# SDCARD_PRINT_FILE_BASE FILENAME={params.FILENAME} -# {% endif %} [gcode_macro START] description: Start Gcode @@ -126,7 +108,7 @@ gcode: {% if printer["gcode_button five_axis_module"].state == "RELEASED" %} G0 Y20 Z30 F2100 {% else %} - G0 Y20 C1 F3600 + G0 Y0 C1 A90 F3600 {% endif %} G92 E0 C0 ENABLE_CONSTRAIN ENABLE=1 @@ -160,14 +142,14 @@ gcode: TURN_OFF_HEATERS M107 SET_FAN_SPEED FAN=chamber_fan SPEED=0.0 - MOVE_DOWN_Z_AXIS Z={z} + MOVE_UP_Z_AXIS Z={z} G28 X0 Y0 T0 {% if printer['gcode_macro END'].power_off %} UPDATE_DELAYED_GCODE ID=CHECK_TEMP DURATION=1 {% endif %} -[gcode_macro MOVE_DOWN_Z_AXIS] +[gcode_macro MOVE_UP_Z_AXIS] description: macro to move down z axis. gcode: {% set max_z = printer.toolhead.axis_maximum.z|float %}