[gcode_macro GOTO_CENTER] description: "Fährt zur Mitte des Arbeitsbereichs" gcode: G90 ; Absolute Positionierung G0 X110 Y110 F3000 ; Fahre zur Mitte (X110, Y110) [gcode_macro TOUCH_OFF] description: "Führt einen Touch-Off auf der Z-Achse durch" gcode: G90 ; Absolute Positionierung G0 Z10 F300 ; Hebe die Z-Achse an, falls sie zu tief ist PROBE ; Starte den Touch-Off mit dem definierten Probe-Pin G92 Z0 ; Setze aktuelle Z-Position als 0 G0 Z5 F300 ; Hebe die Z-Achse um 5 mm an [probe] pin: ^!PD2 x_offset: 0 # Falls die Sonde nicht exakt unter der Spindel ist, ggf. anpassen y_offset: 0 z_offset: 0 samples: 3 # Anzahl der Messungen pro Touch-Off sample_retract_dist: 5.0 # Rückzug nach jeder Messung speed: 5.0 # Messgeschwindigkeit activate_gcode: M400 deactivate_gcode: M400 [mcu] serial: /dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0 [printer] kinematics: cartesian_abc max_velocity: 150 max_accel: 800 max_accel_to_decel: 400 max_z_velocity: 5 max_z_accel: 100 square_corner_velocity: 3.0 [stepper_x] step_pin: PF0 dir_pin: !PF1 enable_pin: !PD7 microsteps: 8 rotation_distance: 20 endstop_pin: ^!PE5 position_endstop: 0 position_min: 0 position_max: 220 homing_speed: 30 homing_retract_dist: 5.0 #run_current: 1.2 #hold_current: 0.5 #stealthchop_threshold: 0 [stepper_y] step_pin: PF6 dir_pin: PF7 enable_pin: !PF2 microsteps: 8 rotation_distance: 20 endstop_pin: ^!PL7 position_endstop: 0 position_min: 0 position_max: 209 homing_speed: 30 homing_positive_dir: False homing_retract_dist: 5.0 #run_current: 1.2 #hold_current: 0.5 #stealthchop_threshold: 0 [stepper_z] step_pin: PL3 dir_pin: !PL1 enable_pin: !PK0 microsteps: 8 full_steps_per_rotation: 200 rotation_distance: 4 endstop_pin: ^!PD3 position_endstop: 0 position_max: 200 homing_speed: 2.0 #run_current: 0.8 #hold_current: 0.4 #stealthchop_threshold: 0 [stepper_z1] step_pin: PC1 dir_pin: !PC3 enable_pin: !PC7 microsteps: 8 rotation_distance: 4 endstop_pin: ^!PL6 #run_current: 0.8 #hold_current: 0.4 #stealthchop_threshold: 0 # touch off pin ^!PD2 [output_pin spindle] pin: PH5 pwm: True cycle_time: 0.01 value: 0 shutdown_value: 0 [force_move] enable_force_move: True [gcode_arcs] resolution: 0.1 [gcode_macro M3] gcode: {% set S = params.S|default(0)|float %} {% set SPEED = S / 10000 %} SET_PIN PIN=spindle VALUE={SPEED} G4 P2.0 [gcode_macro M5] gcode: SET_PIN PIN=spindle VALUE=0 G4 P1.0 [virtual_sdcard] path: ~/gcode_files [pause_resume] [display_status] [gcode_macro M6] gcode: M5 G0 Z0 F600 G0 X0 Y0 F3000 [gcode_macro G64] gcode: {% set P = params.P|default(0.02)|float %} SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY={P}