Giter VIP home page Giter VIP logo

klipper.macro.probe_attach_check's Introduction

Probe Attach Check Klipper Macro

Runs one of the two specified macros depending if the probe is mounted or not. This is intended to be used with a detachable probe (magnetic or manual) that is active (high) when disconnected or it hits something

Dependency: https://github.com/vladbabii/klipper.macro.g28_override

The probe can be

  • configured only in probe section
  • used as z endstop in stepper z section

Usage:

PROBE_ATTACH_CHECK ATTACHED="MACRO_1_NAME" DETACHED="MACRO_2_NAME"

How it works

  1. check endstop status
  2. if endstop is not triggered then probe is mounted and runs macro from parameter (then stops)
  3. (if endstop is triggered) move up [probe].sample_retract_dist mm (to check if probe is actually hitting something
  4. check endstops status again
  5. if endstop is triggered then probe is not mounted and run macro (then stop)
  6. if endstop is not triggered then probe is mounted and run macro (then stop)

Example usage for checking a manual probe is attached before probing...

[probe]
## ....
activate_gcode:
  PROBE_ATTACH_CHECK DETACHED="PROBE_ERROR_NOT_PICKED_UP"

[gcode_macro PROBE_ERROR_NOT_PICKED_UP]
gcode:
  RESPOND PREFIX="error" MSG="Probe > ERROR > Probe is not picked up"
  M112 # Emergency stop
  
[gcode_macro PRINT_START]
gcode:
   ...
   PROBE_ATTACH_CHECK ATTACHED="PROBE_ERROR_PICKED_UP"
   
   ... heating, etc goes here

[gcode_macro PROBE_ERROR_PICKED_UP]
gcode:
  RESPOND PREFIX="error" MSG="Probe > ERROR > Probe is still attached!"
  M112 # Emergency stop

klipper.macro.probe_attach_check's People

Contributors

vladbabii avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.