<p>There is no such thing as a software endstop for the 3D printer. When you power a printer the print head can be located at every X, Y, Z position (usually, Z is  at the print height of your last print, X is at the minimum X, and Y is at an arbitrary location determined by the last print).</p>

<p>This is exactly why we need endstops, either mechanical, optical or electronic (inductive or capacitive) end stop switches or sensors. You instruct the printer to home by using a known fixed location of the printer; this is the hitting of all endstops. The origin of the printer may have offsets, as the origin of the printer may not coincide with the endstop location. For the Anet A6 this is a few millimeters, e.g. for Marlin firmware this is defined in the configuration by:</p>

<pre>
#define X_MIN_POS -3
#define Y_MIN_POS -5
</pre>

<p>The answer to your question: "Is it possible to do this with software?" is therefore, no, you cannot do this solely with software.</p>

CC BY-SA 4.0
2018-07-29T21:06:52.073Z
2018-07-29T21:16:02.713Z
2018-07-29T21:16:02.713Z
0scar
<p>The <a href="https://www.elektor.com/downloads/dl/file/id/1606/installation_instruction_anet_a6_3d_printer.pdf" rel="nofollow noreferrer">A6 3D Printer 
Installation Instruction</a> shows that there is an endstop, part <code>2-7-2</code>, page 4, included in the kit:</p>

<p><a href="https://i.sstatic.net/5AJmU.png" rel="nofollow noreferrer" title="Limit switches"><img src="https://i.sstatic.net/5AJmU.png" alt="Limit switches" title="Limit switches"></a></p>

<p>It needs to be fitted as shown on page 8:</p>

<p><a href="https://i.sstatic.net/uybcV.png" rel="nofollow noreferrer" title="Image showing Z-axis minimum stop"><img src="https://i.sstatic.net/uybcV.png" alt="Image showing Z-axis minimum stop" title="Image showing Z-axis minimum stop"></a></p>

<p>Page 36 shows the correct length of the wires, which should prevent the wires being pulled out of the sensors/switches:</p>

<p><a href="https://i.sstatic.net/my8Gp.png" rel="nofollow noreferrer" title="Wire lengths"><img src="https://i.sstatic.net/my8Gp.png" alt="Wire lengths" title="Wire lengths"></a></p>

<p>Page 38 shows where the Z-axis endstop is attached to the controller board:</p>

<p><a href="https://i.sstatic.net/NRa3u.jpg" rel="nofollow noreferrer" title="Controller board connections"><img src="https://i.sstatic.net/NRa3u.jpg" alt="Controller board connections" title="Controller board connections"></a></p>

<p>To be fair, this assembly guide seems to be rather poor quality and after having looked through it a number of times I fail to see any actual instructions on how, or where <em>exactly</em>, to mount the Z-axis minimum endstop.</p>

CC BY-SA 4.0
2018-07-30T01:02:30.177Z
I didn't even receive a mechanical endstop switch sadly. That's why I was using a probe, which never worked to begin with either.
seraphina
CC BY-SA 4.0
2018-07-30T01:05:35.187Z
Hmm, sounds like you should get in contact with the vendor and either get them to send you the missing part or replace the defective parts. Is there a list of parts, or BOM (bill of materials) included in your kit? Did you check the package contents upon arrival? You definitively should have a z min stop at least, and the z-probe as an (optional) extra. If they don't send you one and refuse to help, then all is not lost as endstop switches are cheap ($1-3) on ebay, and printed mounts (in required) are available on thingiverse (generally - I haven't checked for this particular case)
Greenonline
CC BY-SA 4.0
2018-07-30T01:09:01.140Z
I actually think my friend took the endstop when he installed the probe. and the probe doesn't work anymore but that's for another thread. Basically it lights up under metal but M119 always shows it as open where X/Y trigger fine. I'm guessing the signal is not being sent to the board. (And I think that's the case because when I looked that the header for the S_Z, the SIGNAL/GROUND pins weren't in there all the way and the signal wire was frayed, with the pin almost all the way out of the header adapter.)
seraphina
CC BY-SA 4.0
2018-07-30T01:11:57.983Z
Hmmm, I see. It would probably be worth mentioning all of that in your question. Best to edit the question and add that comment to it. That way all of the information is kept in one central place :-)
Greenonline
CC BY-SA 4.0
2018-07-30T01:15:46.563Z
Fair enough, I just was looking to know if I could force endstops in the software until my replacement endstops arrive :)
seraphina
CC BY-SA 4.0
2018-07-30T00:57:45.277Z
2018-07-30T00:57:45.277Z
Greenonline
<p>I had a Z probe installed but the wires came out of the header so I am trying to use software endstops, but any time I <code>G28</code> the nozzle will always ram into the bed. I am using Marlin Firmware. Which I am relatively new with. I'm used to having hardware endstops, but,</p>

<p><strong>I don't have a hardware endstop currently (no probe/no switch).</strong> </p>

<ul>
<li><p>Is it possible to do this with software? </p></li>
<li><p>I took out <code>G28</code>/<code>G29</code> in my G-code and it shows that it is going to z0.2 and working upward (but it still hits the bed). If the bed is level do I need a <code>G28</code>?</p></li>
<li><p>Should Z probe offset be 0?</p></li>
</ul>

<pre>
    #define USE_XMIN_PLUG
    #define USE_YMIN_PLUG
    #define USE_ZMIN_PLUG
    //#define USE_XMAX_PLUG
    //#define USE_YMAX_PLUG
    //#define USE_ZMAX_PLUG
    #if DISABLED(ENDSTOPPULLUPS)
      // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
      //#define ENDSTOPPULLUP_XMAX
      //#define ENDSTOPPULLUP_YMAX
      //#define ENDSTOPPULLUP_ZMAX
      //#define ENDSTOPPULLUP_XMIN
      //#define ENDSTOPPULLUP_YMIN
      //#define ENDSTOPPULLUP_ZMIN
      //#define ENDSTOPPULLUP_ZMIN_PROBE
    #endif
    #define X_MIN_ENDSTOP_INVERTING true  // set to true to invert the logic of the endstop.
    #define Y_MIN_ENDSTOP_INVERTING true  // set to true to invert the logic of the endstop.
    #define Z_MIN_ENDSTOP_INVERTING true  // set to true to invert the logic of the endstop.
    #define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
    #define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
    #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
    #define Z_MIN_PROBE_ENDSTOP_INVERTING true  // set to true to invert the logic of the probe.

    // Enable this feature if all enabled endstop pins are interrupt-capable.
    // This will remove the need to poll the interrupt pins, saving many CPU cycles.
    #define ENDSTOP_INTERRUPTS_FEATURE
    #define PROBE_MANUALLY
    #define X_PROBE_OFFSET_FROM_EXTRUDER 1   // X offset: -left  +right  [of the nozzle]
    #define Y_PROBE_OFFSET_FROM_EXTRUDER -55 // Y offset: -front +behind [the nozzle]
    #define Z_PROBE_OFFSET_FROM_EXTRUDER -3.4
    #define MULTIPLE_PROBING 2
    #define Z_CLEARANCE_DEPLOY_PROBE   0  // Z Clearance for Deploy/Stow
    #define Z_CLEARANCE_BETWEEN_PROBES  3 // Z Clearance between probe points

    // For M851 give a range for adjusting the Z probe offset
    #define Z_PROBE_OFFSET_RANGE_MIN -20
    #define Z_PROBE_OFFSET_RANGE_MAX 20
    #define INVERT_Z_DIR true
    #define Z_MIN_POS 0
    #if ENABLED(MIN_SOFTWARE_ENDSTOPS)
      //#define MIN_SOFTWARE_ENDSTOP_X
      //#define MIN_SOFTWARE_ENDSTOP_Y
      #define MIN_SOFTWARE_ENDSTOP_Z
    #endif
    #define AUTO_BED_LEVELING_BILINEAR
    #define MANUAL_Z_HOME_POS 0

    #define Z_SAFE_HOMING

    #if ENABLED(Z_SAFE_HOMING)
      #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
      #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
    #endif
</pre>

CC BY-SA 4.0
2018-07-29T17:53:13.290Z
Your question is pretty unclear, I think I understand that you are not using any hardware end stops. How would the printer know where to stop? You need a working mechanical/optical end stop or a some sort of distance sensor.
0scar
CC BY-SA 4.0
2018-07-29T20:11:58.617Z
What kind of input shall trigger the "Endstop" signal? The new sensor? a switch? The "here is the endstop" signal need to be given somehow.
Trish
CC BY-SA 4.0
2018-07-30T01:10:35.997Z
Thanks! I'm pretty familiar with manufactured bots, but i've never done a DIY kit. I had to rebuild the UM2+/TAZ6/Replicator 2 where I work, fell in love with them and bought my own. But it's never made a successful first layer :(
seraphina
CC BY-SA 4.0
2018-08-05T10:02:59.503Z
Might be relevant. Please see [this answer](https://3dprinting.stackexchange.com/questions/857/adjusting-the-z-end-stop#answer-859) to [Adjusting the Z end stop?](https://3dprinting.stackexchange.com/questions/857/adjusting-the-z-end-stop) where software stops *are* mentioned
Greenonline
<marlin><anet-a6>
Anet A6 Z-axis min endstop not triggering
seraphina
# Anet A6 Z-axis min endstop not triggering

(Asked by: username_0 on 2018-07-29)

I had a Z probe installed but the wires came out of the header so I am trying to use software endstops, but any time I G28 the nozzle will always ram into the bed. I am using Marlin Firmware. Which I am relatively new with. I'm used to having hardware endstops, but,
I don't have a hardware endstop currently (no probe/no switch). 

Is it possible to do this with software? 
I took out G28/G29 in my G-code and it shows that it is going to z0.2 and working upward (but it still hits the bed). If the bed is level do I need a G28?
Should Z probe offset be 0?


    #define USE_XMIN_PLUG
    #define USE_YMIN_PLUG
    #define USE_ZMIN_PLUG
    //#define USE_XMAX_PLUG
    //#define USE_YMAX_PLUG
    //#define USE_ZMAX_PLUG
    #if DISABLED(ENDSTOPPULLUPS)
      // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
      //#define ENDSTOPPULLUP_XMAX
      //#define ENDSTOPPULLUP_YMAX
      //#define ENDSTOPPULLUP_ZMAX
      //#define ENDSTOPPULLUP_XMIN
      //#define ENDSTOPPULLUP_YMIN
      //#define ENDSTOPPULLUP_ZMIN
      //#define ENDSTOPPULLUP_ZMIN_PROBE
    #endif
    #define X_MIN_ENDSTOP_INVERTING true  // set to true to invert the logic of the endstop.
    #define Y_MIN_ENDSTOP_INVERTING true  // set to true to invert the logic of the endstop.
    #define Z_MIN_ENDSTOP_INVERTING true  // set to true to invert the logic of the endstop.
    #define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
    #define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
    #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
    #define Z_MIN_PROBE_ENDSTOP_INVERTING true  // set to true to invert the logic of the probe.

    // Enable this feature if all enabled endstop pins are interrupt-capable.
    // This will remove the need to poll the interrupt pins, saving many CPU cycles.
    #define ENDSTOP_INTERRUPTS_FEATURE
    #define PROBE_MANUALLY
    #define X_PROBE_OFFSET_FROM_EXTRUDER 1   // X offset: -left  +right  [of the nozzle]
    #define Y_PROBE_OFFSET_FROM_EXTRUDER -55 // Y offset: -front +behind [the nozzle]
    #define Z_PROBE_OFFSET_FROM_EXTRUDER -3.4
    #define MULTIPLE_PROBING 2
    #define Z_CLEARANCE_DEPLOY_PROBE   0  // Z Clearance for Deploy/Stow
    #define Z_CLEARANCE_BETWEEN_PROBES  3 // Z Clearance between probe points

    // For M851 give a range for adjusting the Z probe offset
    #define Z_PROBE_OFFSET_RANGE_MIN -20
    #define Z_PROBE_OFFSET_RANGE_MAX 20
    #define INVERT_Z_DIR true
    #define Z_MIN_POS 0
    #if ENABLED(MIN_SOFTWARE_ENDSTOPS)
      //#define MIN_SOFTWARE_ENDSTOP_X
      //#define MIN_SOFTWARE_ENDSTOP_Y
      #define MIN_SOFTWARE_ENDSTOP_Z
    #endif
    #define AUTO_BED_LEVELING_BILINEAR
    #define MANUAL_Z_HOME_POS 0

    #define Z_SAFE_HOMING

    #if ENABLED(Z_SAFE_HOMING)
      #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2)    // X point for Z homing when homing all axes (G28).
      #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2)    // Y point for Z homing when homing all axes (G28).
    #endif

**Tags:** marlin, anet-a6
> **Comments:**
> **username_1**: Your question is pretty unclear, I think I understand that you are not using any hardware end stops. How would the printer know where to stop? You need a working mechanical/optical end stop or a some sort of distance sensor.  
> **username_2**: What kind of input shall trigger the "Endstop" signal? The new sensor? a switch? The "here is the endstop" signal need to be given somehow.  
> **username_0**: Thanks! I'm pretty familiar with manufactured bots, but i've never done a DIY kit. I had to rebuild the UM2+/TAZ6/Replicator 2 where I work, fell in love with them and bought my own. But it's never made a successful first layer :(  
> **username_3**: Might be relevant. Please see [this answer](https://3dprinting.stackexchange.com/questions/857/adjusting-the-z-end-stop#answer-859) to [Adjusting the Z end stop?](https://3dprinting.stackexchange.com/questions/857/adjusting-the-z-end-stop) where software stops *are* mentioned  

---

## 2 answers

### Answer by username_1 on 2018-07-29. Score: 2 | Accepted answer

There is no such thing as a software endstop for the 3D printer. When you power a printer the print head can be located at every X, Y, Z position (usually, Z is  at the print height of your last print, X is at the minimum X, and Y is at an arbitrary location determined by the last print).
This is exactly why we need endstops, either mechanical, optical or electronic (inductive or capacitive) end stop switches or sensors. You instruct the printer to home by using a known fixed location of the printer; this is the hitting of all endstops. The origin of the printer may have offsets, as the origin of the printer may not coincide with the endstop location. For the Anet A6 this is a few millimeters, e.g. for Marlin firmware this is defined in the configuration by:

#define X_MIN_POS -3
#define Y_MIN_POS -5

The answer to your question: "Is it possible to do this with software?" is therefore, no, you cannot do this solely with software.


---

### Answer by username_3 on 2018-07-30. Score: 2

The [A6 3D Printer
Installation Instruction](https://www.elektor.com/downloads/dl/file/id/1606/installation_instruction_anet_a6_3d_printer.pdf) shows that there is an endstop, part `2-7-2`, page 4, included in the kit:

[![Limit switches](https://i.sstatic.net/5AJmU.png "Limit switches")](https://i.sstatic.net/5AJmU.png "Limit switches")

It needs to be fitted as shown on page 8:

[![Image showing Z-axis minimum stop](https://i.sstatic.net/uybcV.png "Image showing Z-axis minimum stop")](https://i.sstatic.net/uybcV.png "Image showing Z-axis minimum stop")

Page 36 shows the correct length of the wires, which should prevent the wires being pulled out of the sensors/switches:

[![Wire lengths](https://i.sstatic.net/my8Gp.png "Wire lengths")](https://i.sstatic.net/my8Gp.png "Wire lengths")

Page 38 shows where the Z-axis endstop is attached to the controller board:

[![Controller board connections](https://i.sstatic.net/NRa3u.jpg "Controller board connections")](https://i.sstatic.net/NRa3u.jpg "Controller board connections")

To be fair, this assembly guide seems to be rather poor quality and after having looked through it a number of times I fail to see any actual instructions on how, or where *exactly*, to mount the Z-axis minimum endstop.

> **Comments:**
> **username_0**: I didn't even receive a mechanical endstop switch sadly. That's why I was using a probe, which never worked to begin with either.  
> **username_3**: Hmm, sounds like you should get in contact with the vendor and either get them to send you the missing part or replace the defective parts. Is there a list of parts, or BOM (bill of materials) included in your kit? Did you check the package contents upon arrival? You definitively should have a z min stop at least, and the z-probe as an (optional) extra. If they don't send you one and refuse to help, then all is not lost as endstop switches are cheap ($1-3) on ebay, and printed mounts (in required) are available on thingiverse (generally - I haven't checked for this particular case)  
> **username_0**: I actually think my friend took the endstop when he installed the probe. and the probe doesn't work anymore but that's for another thread. Basically it lights up under metal but M119 always shows it as open where X/Y trigger fine. I'm guessing the signal is not being sent to the board. (And I think that's the case because when I looked that the header for the S_Z, the SIGNAL/GROUND pins weren't in there all the way and the signal wire was frayed, with the pin almost all the way out of the header adapter.)  
> **username_3**: Hmmm, I see. It would probably be worth mentioning all of that in your question. Best to edit the question and add that comment to it. That way all of the information is kept in one central place :-)  
> **username_0**: Fair enough, I just was looking to know if I could force endstops in the software until my replacement endstops arrive :)  

---

