v2.4: update z_calibration
This commit is contained in:
		
							parent
							
								
									fce3702a8a
								
							
						
					
					
						commit
						37cc42b363
					
				
					 5 changed files with 128 additions and 119 deletions
				
			
		
							
								
								
									
										51
									
								
								macros.cfg
									
										
									
									
									
								
							
							
						
						
									
										51
									
								
								macros.cfg
									
										
									
									
									
								
							|  | @ -83,23 +83,6 @@ gcode: | |||
|   {% endif %} | ||||
| 
 | ||||
| 
 | ||||
| [gcode_macro G32] | ||||
| gcode: | ||||
|   BED_MESH_CLEAR | ||||
|   M117 > home | ||||
|   G28 | ||||
|   M117 > qgl | ||||
|   QUAD_GANTRY_LEVEL | ||||
|   M117 > brushie | ||||
|   BRUSHIE | ||||
|   M117 > home | ||||
|   G28 | ||||
|   M117 > bed mesh calibrate | ||||
|   BED_MESH_CALIBRATE | ||||
|   # BED_MESH_PROFILE load=default # load default bed_mesh profile | ||||
|   G0 X150 Y150 Z30 F3600 | ||||
| 
 | ||||
| 
 | ||||
| [gcode_macro M600] | ||||
| description: Change filament | ||||
| gcode: | ||||
|  | @ -114,13 +97,17 @@ gcode: | |||
| gcode: | ||||
|   {% set BED=params.BED|default(100) %} | ||||
|   {% set EXTRUDER=params.EXTRUDER|default(250) %} | ||||
|   {% set QGL=params.QGL|default(1)|int %} | ||||
|   {% set BMC=params.BMC|default(0)|int %} | ||||
|   {% set PURGE=params.PURGE|default(1)|int %} | ||||
|   {% set SOAK=params.SOAK|default(0)|int * 1000 * 60 %} | ||||
|   {% set Z_ADJUST=params.Z_ADJUST|default(0.0)|float %} | ||||
|   # TODO | ||||
|   {% set BMC=params.BMC|default(0) %} | ||||
|   {% set ERCF=params.ERCF|default(0) %} | ||||
|   M117 > configuring | ||||
|   SET_LED LED=caselight RED=0.00 GREEN=0.00 BLUE=0.50 | ||||
|   G4 P2000 | ||||
|   SET_GCODE_OFFSET Z=0.0 # reset z offset | ||||
|   M140 S{BED}            # start bed heating | ||||
|   M104 S{EXTRUDER}       # start extruder heating | ||||
|   G92 E0                 # reset extruder | ||||
|  | @ -131,7 +118,26 @@ gcode: | |||
|   M117 > homing | ||||
|   SET_LED LED=caselight RED=0.00 GREEN=0.50 BLUE=0.00 | ||||
|   G4 P2000 | ||||
|   G32                    # home, qgl and mesh | ||||
|   {% if BMC %} | ||||
|     BED_MESH_CLEAR | ||||
|   {% endif %} | ||||
|   M117 > home | ||||
|   G28 | ||||
|   {% if QGL %} | ||||
|     M117 > qgl | ||||
|     QUAD_GANTRY_LEVEL | ||||
|   {% endif %} | ||||
|   M117 > brushie | ||||
|   BRUSHIE | ||||
|   M117 > calibrate z | ||||
|   CALIBRATE_Z | ||||
|   {% if BMC %} | ||||
|     M117 > bed mesh calibrate | ||||
|     BED_MESH_CALIBRATE | ||||
|   {% else %} | ||||
|     M117 > bed mesh load | ||||
|     BED_MESH_PROFILE LOAD=default | ||||
|   {% endif %} | ||||
| 
 | ||||
|   M117 > heating | ||||
|   SET_LED LED=caselight RED=0.50 GREEN=0.00 BLUE=0.00 | ||||
|  | @ -139,14 +145,18 @@ gcode: | |||
|   G92 E0                 # reset extruder | ||||
|   M190 S{BED}            # set and wait for bed temperature | ||||
|   M109 S{EXTRUDER}       # set and wait for nozzle temperature | ||||
|   {% if SOAK > 0 %} | ||||
|     M117 > soaking for {SOAK/1000/60|int} min | ||||
|     G4 P{SOAK} | ||||
|   {% endif %} | ||||
| 
 | ||||
|   M117 > starting | ||||
|   SET_GCODE_OFFSET Z_ADJUST={params.Z_ADJUST|default(0.0)|float} MOVE=1 | ||||
|   SET_LED LED=caselight RED=0.50 GREEN=0.50 BLUE=0.50 | ||||
|   G4 P2000 | ||||
|   # SET_FAN_SPEED FAN=exhaust_fan SPEED=0.5 | ||||
|   {% if PURGE %} | ||||
|     PURGE_NOZZLE | ||||
|   {% endif %} | ||||
| 
 | ||||
| 
 | ||||
| [gcode_macro PRINT_END] | ||||
|  | @ -158,7 +168,6 @@ gcode: | |||
|   G1 E-10.0 F3600               ; retract filament | ||||
|   TURN_OFF_HEATERS | ||||
|   M107                          ; turn off fan | ||||
|   # SET_FAN_SPEED FAN=exhaust_fan SPEED=0.0 | ||||
| 
 | ||||
| 
 | ||||
| [gcode_macro PRINT_LAYER_CHANGE] | ||||
|  |  | |||
|  | @ -55,7 +55,7 @@ square_corner_velocity: 5.0 | |||
| [include fans.cfg] | ||||
| [include input_shaper.cfg] | ||||
| # [include resonance_test.cfg] | ||||
| [include z_calibration/printer.cfg] | ||||
| [include z_calibration.cfg] | ||||
| 
 | ||||
| 
 | ||||
| ##################################################################### | ||||
|  | @ -335,7 +335,7 @@ timeout: 1800 | |||
| 
 | ||||
| [bed_mesh] | ||||
| speed: 500 | ||||
| horizontal_move_z: 10 | ||||
| horizontal_move_z: 15 | ||||
| mesh_min: 40,60 | ||||
| mesh_max: 260,280 | ||||
| fade_start: 0.6 | ||||
|  | @ -356,7 +356,7 @@ points: | |||
|   250,225 | ||||
|   250,40 | ||||
| speed: 100 | ||||
| horizontal_move_z: 10 | ||||
| horizontal_move_z: 15 | ||||
| retries: 5 | ||||
| retry_tolerance: 0.0075 | ||||
| max_adjust: 10 | ||||
|  |  | |||
|  | @ -1,6 +1,44 @@ | |||
| ##################################################################### | ||||
| #    User Variables | ||||
| ##################################################################### | ||||
| [gcode_macro _USER_VARIABLE] | ||||
| description: Helper: Contains User defined printer variables | ||||
| ##### Homing and general movement ##### | ||||
| variable_z_endstop_x: 208             ; z Endstop x position inside right profile | ||||
| variable_z_endstop_y: 305             ; z Endstop y position | ||||
| variable_z_hop: 15.0                  ; z hop for moves e.g homing | ||||
| variable_xy_home_current: 0.4         ; reduced homing current for x and y | ||||
| variable_z_home_current: 0.3          ; reduced homing current for z | ||||
| variable_home_accel: 1200             ; reduced ACCEL for homing | ||||
| ##### Mag Probe ##### | ||||
| variable_probe_dock_x: 148            ; x toolhead position before docking probe | ||||
| variable_probe_dock_y: 285            ; y toolhead position before docking probe | ||||
| variable_probe_dock_z: 15             ; z toolhead position before docking probe (only for bed dock) | ||||
| variable_probe_undock_x: 200          ; x toolhead position after docking probe | ||||
| variable_probe_undock_y: 305          ; y toolhead position after docking probe | ||||
| variable_probe_undock_z: 15           ; z toolhead position after docking probe (only for bed dock) | ||||
| variable_probe_z_min: 15              ; z minimum height to avoid crash | ||||
| variable_probe_travel_speed: 200      ; dock moves travel speed | ||||
| variable_probe_dock_speed: 100        ; dock speed for attach/dock | ||||
| ##### Respond defaults ##### | ||||
| variable_respond_set_current: 0       ; default of RESPOND if not set in the call | ||||
| variable_respond_set_acc: 0           ; default of RESPOND if not set in the call | ||||
| variable_respond_probe_action: 1      ; default of RESPOND if not set in the call | ||||
| ##### Park Position ##### | ||||
| variable_park_bed: [150,150,30]       ; different park position | ||||
| gcode: | ||||
| 
 | ||||
| ##################################################################### | ||||
| #    Includes | ||||
| ##################################################################### | ||||
| [include z_calibration/macros.cfg] | ||||
| [include z_calibration/homing.cfg] | ||||
| [include z_calibration/probing.cfg] | ||||
| 
 | ||||
| ##################################################################### | ||||
| #    Z Calibration | ||||
| ##################################################################### | ||||
| 
 | ||||
| [z_calibration] | ||||
| #   The X and Y coordinates (in mm) for clicking the nozzle on the | ||||
| #   Z endstop. | ||||
|  | @ -20,12 +58,12 @@ probe_bed_x: 150 | |||
| probe_bed_y: 150 | ||||
| #   The trigger point offset of the used mag-probe switch. | ||||
| #   This needs to be fined out manually. More on this later | ||||
| #   in this section.. | ||||
| switch_offset: 0.42 | ||||
| #   in this section. smaller switch_offset -> more distance to  the build plate | ||||
| switch_offset: 0.7 | ||||
| #   The maximum allowed deviation of the calculated offset. | ||||
| #   If the offset exceeds this value, it will stop! | ||||
| #   The default is 1.0 mm. | ||||
| max_deviation: 1.5 | ||||
| max_deviation: 1.0 | ||||
| #   The number of times to probe each point. The probed z-values | ||||
| #   will be averaged. The default is from the probe's configuration. | ||||
| #samples: default from "probe:samples" section | ||||
|  | @ -41,10 +79,9 @@ max_deviation: 1.5 | |||
| #   The distance in mm to move up before moving to the next | ||||
| #   position. The default is two times the z_offset from the probe's | ||||
| #   configuration. | ||||
| clearance: 7.5 | ||||
| #position_min: default from "stepper_z:position_min" section. | ||||
| #   The moving speed in X and Y. The default is 50 mm/s. | ||||
| speed: 200 | ||||
| # speed: 200 | ||||
| #   Speed (in mm/s) of the Z axis when lifting the probe between | ||||
| #   samples and clearance moves. The default is from the probe's | ||||
| #   configuration. | ||||
|  | @ -1,48 +1,48 @@ | |||
| ##################################################################### | ||||
| #    Macros | ||||
| ##################################################################### | ||||
| [gcode_macro PRINT_START] | ||||
| gcode: | ||||
|     {% set bed_temp = params.BED_TEMP|default(100)|float %} | ||||
|     {% set extruder_temp = params.EXTRUDER_TEMP|default(220)|float %} | ||||
|     {% set z_adjust = params.Z_ADJUST|default(0.0)|float %} | ||||
|     {% set retract = 10 %} | ||||
|     BED_MESH_CLEAR                    ; clear mesh | ||||
|     _CG28                             ; Home the printer | ||||
|     G90                               ; Use absolute coordinates | ||||
|     PARKCENTER                        ; Move to center | ||||
|     M117 Heating.. | ||||
|     _HEATER_ON | ||||
|     M106 S255                         ; set print fan to full speed | ||||
|     M140 S{bed_temp}                  ; Start bed heating | ||||
|     M190 S{bed_temp}                  ; Wait for bed to reach temperature | ||||
|     M109 S{extruder_temp}             ; Set and wait for nozzle to reach temperature | ||||
|     M107                              ; turn print fan off | ||||
|     QUAD_GANTRY_LEVEL PARK=false | ||||
|     M109 S{extruder_temp}             ; Set and wait for nozzle to reach temperature | ||||
|     clean_nozzle                      ; clean nozzle | ||||
|     CALIBRATE_Z | ||||
|     #BED_MESH_PROFILE LOAD=default   ; load mesh if needed | ||||
|     # Adjust the G-Code Z offset with the Z_ADJUST parameter if needed | ||||
|     #SET_GCODE_OFFSET Z_ADJUST={z_adjust} MOVE=1 | ||||
|     M117 Intro Line.. | ||||
|     G90                               ; Use absolute coordinates | ||||
|     G1 Y0 X130 Z5 F12000              ; Move the nozzle to the front and near the bed | ||||
|     G1 Z0.7 F300                      ; Move the nozzle very close to the bed | ||||
|     G92 E0.0                          ; set extruder position to 0 | ||||
|     G1 E{retract} F3600               ; extrude retract | ||||
|     G92 E0.0                          ; set extruder option to 0 | ||||
|     G1 X180 E15.0 F500.0              ; intro line | ||||
|     G92 E0.0                          ; set extruder Poisson to 0 | ||||
|     G1 X174 F6000                     ; move away from intro line | ||||
|     M117 | ||||
| 
 | ||||
| [gcode_macro PARKCENTER] | ||||
| gcode: | ||||
|     {% set Z = params.Z|default(30)|float %} | ||||
|     SAVE_GCODE_STATE NAME=PARKCENTER_state | ||||
|     _CG28                          ; Home if not already homed | ||||
|     G90                            ; absolute positioning | ||||
|     G0 X150 Y150 Z{Z} F12000       ; move to center | ||||
|     RESTORE_GCODE_STATE NAME=PARKCENTER_state | ||||
| 
 | ||||
| # ##################################################################### | ||||
| # #    Macros | ||||
| # ##################################################################### | ||||
| # [gcode_macro PRINT_START] | ||||
| # gcode: | ||||
| #     {% set bed_temp = params.BED_TEMP|default(100)|float %} | ||||
| #     {% set extruder_temp = params.EXTRUDER_TEMP|default(220)|float %} | ||||
| #     {% set z_adjust = params.Z_ADJUST|default(0.0)|float %} | ||||
| #     {% set retract = 10 %} | ||||
| #     BED_MESH_CLEAR                    ; clear mesh | ||||
| #     _CG28                             ; Home the printer | ||||
| #     G90                               ; Use absolute coordinates | ||||
| #     PARKCENTER                        ; Move to center | ||||
| #     M117 Heating.. | ||||
| #     _HEATER_ON | ||||
| #     M106 S255                         ; set print fan to full speed | ||||
| #     M140 S{bed_temp}                  ; Start bed heating | ||||
| #     M190 S{bed_temp}                  ; Wait for bed to reach temperature | ||||
| #     M109 S{extruder_temp}             ; Set and wait for nozzle to reach temperature | ||||
| #     M107                              ; turn print fan off | ||||
| #     QUAD_GANTRY_LEVEL PARK=false | ||||
| #     M109 S{extruder_temp}             ; Set and wait for nozzle to reach temperature | ||||
| #     clean_nozzle                      ; clean nozzle | ||||
| #     CALIBRATE_Z | ||||
| #     #BED_MESH_PROFILE LOAD=default   ; load mesh if needed | ||||
| #     # Adjust the G-Code Z offset with the Z_ADJUST parameter if needed | ||||
| #     #SET_GCODE_OFFSET Z_ADJUST={z_adjust} MOVE=1 | ||||
| #     M117 Intro Line.. | ||||
| #     G90                               ; Use absolute coordinates | ||||
| #     G1 Y0 X130 Z5 F12000              ; Move the nozzle to the front and near the bed | ||||
| #     G1 Z0.7 F300                      ; Move the nozzle very close to the bed | ||||
| #     G92 E0.0                          ; set extruder position to 0 | ||||
| #     G1 E{retract} F3600               ; extrude retract | ||||
| #     G92 E0.0                          ; set extruder option to 0 | ||||
| #     G1 X180 E15.0 F500.0              ; intro line | ||||
| #     G92 E0.0                          ; set extruder Poisson to 0 | ||||
| #     G1 X174 F6000                     ; move away from intro line | ||||
| #     M117 | ||||
| # | ||||
| # [gcode_macro PARKCENTER] | ||||
| # gcode: | ||||
| #     {% set Z = params.Z|default(30)|float %} | ||||
| #     SAVE_GCODE_STATE NAME=PARKCENTER_state | ||||
| #     _CG28                          ; Home if not already homed | ||||
| #     G90                            ; absolute positioning | ||||
| #     G0 X150 Y150 Z{Z} F12000       ; move to center | ||||
| #     RESTORE_GCODE_STATE NAME=PARKCENTER_state | ||||
| # | ||||
|  |  | |||
|  | @ -1,37 +0,0 @@ | |||
| ##################################################################### | ||||
| #    User Variables | ||||
| ##################################################################### | ||||
| [gcode_macro _USER_VARIABLE] | ||||
| description: Helper: Contains User defined printer variables | ||||
| ##### Homing and general movement ##### | ||||
| variable_z_endstop_x: 208             ; z Endstop x position inside right profile | ||||
| variable_z_endstop_y: 305             ; z Endstop y position | ||||
| variable_z_hop: 10.0                  ; z hop for moves e.g homing | ||||
| variable_xy_home_current: 0.4         ; reduced homing current for x and y | ||||
| variable_z_home_current: 0.3          ; reduced homing current for z | ||||
| variable_home_accel: 1200             ; reduced ACCEL for homing | ||||
| ##### Mag Probe ##### | ||||
| variable_probe_dock_x: 148            ; x toolhead position before docking probe | ||||
| variable_probe_dock_y: 285            ; y toolhead position before docking probe | ||||
| variable_probe_dock_z: 10             ; z toolhead position before docking probe (only for bed dock) | ||||
| variable_probe_undock_x: 200          ; x toolhead position after docking probe | ||||
| variable_probe_undock_y: 305          ; y toolhead position after docking probe | ||||
| variable_probe_undock_z: 10           ; z toolhead position after docking probe (only for bed dock) | ||||
| variable_probe_z_min: 10              ; z minimum height to avoid crash | ||||
| variable_probe_travel_speed: 200      ; dock moves travel speed | ||||
| variable_probe_dock_speed: 100        ; dock speed for attach/dock | ||||
| ##### Respond defaults ##### | ||||
| variable_respond_set_current: 0       ; default of RESPOND if not set in the call | ||||
| variable_respond_set_acc: 0           ; default of RESPOND if not set in the call | ||||
| variable_respond_probe_action: 1      ; default of RESPOND if not set in the call | ||||
| ##### Park Position ##### | ||||
| variable_park_bed: [150,150,30]       ; different park position | ||||
| gcode: | ||||
| 
 | ||||
| ##################################################################### | ||||
| #    Includes | ||||
| ##################################################################### | ||||
| [include macros.cfg] | ||||
| [include homing.cfg] | ||||
| [include probing.cfg] | ||||
| [include z_calibration.cfg] | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue