06 Deploy & Retract Strategies

The overall concept to deploying and retracting Euclid Probe is to approach the probe dock from the side, move over the probe so that the magnets pick up the probe out of the well in the dock, pause for the firmware to recognize that the probe state has changed, then exit the dock. When the magnets have picked up the probe, the probe is aligned with the exit gate so the probe can travel out of the dock.

To retract or dock the probe, the process is reversed: approach and then enter the dock, park the carriage over the dock well, move quickly to the side, swiping the magnets apart. When the magnets are detached, the probe will drop into the well, below the level of the exit gate and be secure.

Care must be taken to consider the order of operations in the overall homing and bed leveling scheme. It is recommended that a different macro be written to deeply and retract the probe, and to call them when homing, probing or bed leveling.

RepRap Firmware version 2.x does not have the logic capability to perform checks as to whether or not the probe is deployed. While Euclid Probe has proven itself to be reliable for probe deployments and retractions, users are advised to observe and not leave their printer unattended.
The deploy and retract macros are give for a fixed doc located at X5 Y290.
The homez.g macro and the 4-point bed leveling macro are provided as examples illustrating the eschema.

RepRap Firmware version 3.x can utilize gcode meta commands, which are highly recommended to perform logic checks as to whether or not the probe is deployed.
The deploy and retract macros are give for a fixed dock located at X5 Y290. The homez.g macro and the 4-point bed leveling macro are provided as examples illustrating the eschema.

Examples are given for both fixed docks (X, Y, Z constant) and docks that bed attached and can move in the Z axis (X & Y constant, varying Z).

Klipper macros can be very simple and straight forward. There is no need for complicated macros, docking sensors or other extraneous bits or bobs.

Insert the following into the head of the main printer.cfg file to include the dock and position locations.

[include euclid.cfg]

The following are the definitions of the carriage position points and the Probe Deploy & Probe Retract Macros. We have provided them as euclig.cfg file for download.

[gcode_macro move_to_dock]
# Dock position at X53 Y350 Z3.7
  G90                 ; absolute coordinate system
  G0 X53 Y350 Z3.7    ; move to X53 Y350

[gcode_macro move_to_dockside]
# Location adjacent to dock Y-30
  G90                 ; absolute coordinate system
  G0 X53 Y320 Z3.7    ; move to X53 Y350

[gcode_macro move_outof_dock]
# Location adjacent to dock for exit X+40 
  G90                 ; absolute coordinate system
  G0 X93 Y350 Z3.7    ; move to X93 Y350 Z3.7

# Macro to Deploy Bed Probe
[gcode_macro M401]
    {% if printer.probe.last_query %}
      G0 Z10 F12000        ;  set approach elevation of Z10
      move_to_dockside     ;  
      move_to_dock         ;  translate over probe pickup location
      G4 P2500             ;  pause for firmware detection
      move_outof_dock      ;  translate to side to exit dock   
      G0 Z20 F12000        ;  raise to elevation of Z20
    {% endif %}

# Macro to Stow Bed Leveling Probe
[gcode_macro M402]
    {% if not printer.probe.last_query %}
     G0 Z20 F12000               ;  set approach elevation of Z20
     move_outof_dock             ;  move toolhead to dock exit position
     move_to_dock                ;  move probe into to dock 
     G4 P250                     ;  pause
     move_to_dockside            ;  swipe probe off 
     G4 P250                     ;  pause
     G0 Z20 F12000               ;  move up to elevation of Z20
    {% endif %}

[gcode_macro do_error_if_probe_deployed]
    {% if not printer.probe.last_query %}
      {action_raise_error("Euclid Probe is already deployed - Remove and Return it to the dock")}
    {% endif %}

[gcode_macro error_if_probe_deployed]
    G4 P300

[gcode_macro do_error_if_probe_not_deployed]
    {% if printer.probe.last_query %}
      {action_raise_error("Euclid Probe Unsuccessfully Deployed!")}
    {% endif %}

[gcode_macro error_if_probe_not_deployed]
    G4 P300

Then to utilize or implement Euclid Probe, you invoke the M401 and M402 routines-

 G0 Z10 F500           ; raise bed to 10
 G28 X Y               ; home Y & Y
 M401                  ; deploy Euclid Probe
 G0 X200 Y235 F12000   ; move to X200 Y235
 G28 Z                 ; home Z
 G0 Z10 F500           ; raise bed to 10
 M402                  ; retract Euclid Probe
axes: z
set_position_z: -5

The following strategy is based on the Allen Key Probe function predefined in Marlin.

// For Z_PROBE_ALLEN_KEY see the Delta example configurations.
 * Allen key retractable z-probe as seen on many Kossel delta printers - https://reprap.org/wiki/Kossel#Automatic_bed_leveling_probe
 * Deploys by touching z-axis belt. Retracts by pushing the probe down. Uses Z_MIN_PIN.

  // 2 or 3 sets of coordinates for deploying and retracting the spring loaded touch probe on G29,
  // if servo actuated touch probe is not defined. Uncomment as appropriate for your printer/probe.

  #define Z_PROBE_ALLEN_KEY_DEPLOY_1 { 165, 50, 10 }  // Dock side approach position

  #define Z_PROBE_ALLEN_KEY_DEPLOY_2 { 165, 14, 0 }  // Mount over dock position for probe coupling

  #define Z_PROBE_ALLEN_KEY_DEPLOY_3 { 130, 14, 0 } // Translate probe out of dock 

  #define Z_PROBE_ALLEN_KEY_DEPLOY_4 { 130, 14, 15 } // Vertically lift probe up to clear bed & dock 

  #define Z_PROBE_ALLEN_KEY_STOW_1 { 130, 14.0, 10.0 } // Move the probe into X,Y dock approach position

  #define Z_PROBE_ALLEN_KEY_STOW_2 { 130, 14.0, 0.0 } // Move probe down to dock entry position

  #define Z_PROBE_ALLEN_KEY_STOW_3 { 165.0, 14.0, 0.0 } // Move probe into dock

  #define Z_PROBE_ALLEN_KEY_STOW_4 { 165.0, 50.0, 0.0 } // Swipe probe off of mount 


⇦ Previous Step Firmware Configuration