Welcome! Log In Create A New Profile

Advanced

where is Z max?

Posted by joakimdavell 
where is Z max?
October 09, 2017 05:05PM
Hi,

I have a Zonestar (aliexpress DIY printer) with a sanguinololu board.
I'm using a inductive sensor as z-probe.
I have the probe connected to Z-min(pin 20) and mounted a NC switch at the top as Z-Max and connected to pin 16.
When i trigger the endstop it shows in the debugging
M43 P16 W
Watching pins
PIN:  16   Port: C0        SCL
PIN:  16   Port: C0        SCL

But when it would not show up when i M119
M119*31
Reporting endstop status
x_min: open
y_min: open
z_probe: open


configuration.h

//===========================================================================
//============================== Endstop Settings ===========================
//===========================================================================

// @section homing

// Specify here all the endstop connectors that are connected to any endstop or probe.
// Almost all printers will be using one per axis. Probes will use one or more of the
// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
#define USE_XMIN_PLUG
#define USE_YMIN_PLUG
#define USE_ZMIN_PLUG
//#define USE_XMAX_PLUG
//#define USE_YMAX_PLUG
#define USE_ZMAX_PLUG

pins_sanguinololu_12.h
//
// Limit Switches
//
#define X_STOP_PIN         18
#define Y_STOP_PIN         19
#define Z_STOP_PIN         20

// my own code
#define X_MIN_PIN          18
#define Y_MIN_PIN          19
#define Z_MAX_PIN          16

#ifndef Z_MIN_PROBE_PIN
  #define Z_MIN_PROBE_PIN  20
#endif

//endof my own code
M43

PIN:  15   Port: D7        X_STEP_PIN                  protected
PIN:  16   Port: C0        SCL                         Input  = 0
PIN:  17   Port: C1        SDA                         Input  = 0
PIN:  18   Port: C2        X_MIN_PIN                   protected
.                          X_STOP_PIN                  protected
 PIN:  19   Port: C3        Y_MIN_PIN                   protected
 .                          Y_STOP_PIN                  protected
 PIN:  20   Port: C4        Z_MAX_PIN                   protected
.                          Z_MIN_PROBE_PIN             protected
.                          Z_STOP_PIN                  protected

What am i missing/doing wrong? where do i "activate" the Z-max swtich?
Solved
October 09, 2017 05:36PM
found it!

My Z_STOP_PIN was the same as the Z_MIN_PROBE_PIN thus ignored by the firmware.

pins.h

#ifdef Z_STOP_PIN
  #if Z_HOME_DIR < 0
    #define Z_MIN_PIN Z_STOP_PIN
    #define Z_MAX_PIN -1
  #else
    #define Z_MIN_PIN -1
    #define Z_MAX_PIN Z_STOP_PIN
  #endif
#endif
Re: where is Z max?
October 18, 2017 02:21AM
I just ran into that tonight. My Z min works for homing, but the Z max end stop is not seen. I have RAMPS 1.4. I can't find where Z_STOP_PIN is defined.

This looks like we only get either Z_MIN_PIN or Z_MAX_PIN.

#ifdef Z_STOP_PIN
  #if Z_HOME_DIR < 0
    #define Z_MIN_PIN Z_STOP_PIN
    #define Z_MAX_PIN -1
  #else
    #define Z_MIN_PIN -1
    #define Z_MAX_PIN Z_STOP_PIN
  #endif
#endif

#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN is enabled Tomorrow I'm going to comment it out.
Sorry, only registered users may post in this forum.

Click here to login