G31 state H

Hi all, 
Repetier version 92.3

a Normally Open switch connected on Z-MIN pin 
and 3 -MAX endstop for a DELTA. 

here is my settings: 

// ################ Endstop configuration #####################

#define ENDSTOP_PULLUP_X_MIN true
#define ENDSTOP_X_MIN_INVERTING true
#define MIN_HARDWARE_ENDSTOP_X false

#define ENDSTOP_PULLUP_Y_MIN true
#define ENDSTOP_Y_MIN_INVERTING true
#define MIN_HARDWARE_ENDSTOP_Y false

#define ENDSTOP_PULLUP_Z_MIN true
#define ENDSTOP_Z_MIN_INVERTING true
#define MIN_HARDWARE_ENDSTOP_Z false

#define ENDSTOP_PULLUP_X_MAX true
#define ENDSTOP_X_MAX_INVERTING true
#define MAX_HARDWARE_ENDSTOP_X true

#define ENDSTOP_PULLUP_Y_MAX true
#define ENDSTOP_Y_MAX_INVERTING true
#define MAX_HARDWARE_ENDSTOP_Y true

#define ENDSTOP_PULLUP_Z_MAX true
#define ENDSTOP_Z_MAX_INVERTING true
#define MAX_HARDWARE_ENDSTOP_Z true

#define max_software_endstop_r true

// #################### Z-Probing #####################

#define FEATURE_Z_PROBE 1
#define Z_PROBE_BED_DISTANCE 10
#define Z_PROBE_PIN ORIG_Z_MIN_PIN
#define Z_PROBE_PULLUP 1
#define Z_PROBE_ON_HIGH 1
#define Z_PROBE_X_OFFSET 25
#define Z_PROBE_Y_OFFSET 0
#define Z_PROBE_WAIT_BEFORE_TEST 0
#define Z_PROBE_SPEED 2
#define Z_PROBE_XY_SPEED 80
#define Z_PROBE_SWITCHING_DISTANCE 1
#define Z_PROBE_REPETITIONS 1
#define Z_PROBE_HEIGHT 40
#define Z_PROBE_START_SCRIPT ""
#define Z_PROBE_FINISHED_SCRIPT ""
#define FEATURE_AUTOLEVEL 1
#define Z_PROBE_X1 0
#define Z_PROBE_Y1 80
#define Z_PROBE_X2 -80
#define Z_PROBE_Y2 80
#define Z_PROBE_X3 80
#define Z_PROBE_Y3 80
#define FEATURE_AXISCOMP 1
#define AXISCOMP_TANXY 0
#define AXISCOMP_TANYZ 0
#define AXISCOMP_TANXZ 0


When i check with G31 the state returned is RANDOMLY High or Low even if the switch is trigger or not. 

What is wrong ? 

Thanks 

Comments

  • PS: the same switch with "other firmware" work correctly, i've tested with a voltmeter. 
    how Printer::isZProbeHit() working ? where is the piece of code that test the pin state ? 
  • Search printer.cpp for Z_PROBE_PIN

    Setup:
    #if FEATURE_Z_PROBE && Z_PROBE_PIN>-1
        SET_INPUT(Z_PROBE_PIN);
    #if Z_PROBE_PULLUP
        PULLUP(Z_PROBE_PIN, HIGH);
    #endif // FEATURE_FEATURE_Z_PROBE

    and in printer.h


  • thanks (y) 

    i play with pullup state connection pin and now works great. 
Sign In or Register to comment.