# Marlin, end stops, and position report - possible bug?

Am seeing the following behavior in Marlin:

When moving the printhead, if an end stop is hit, a position report (M114) erroneously reports the print head position as where it was trying to go, as opposed to where it's position actually is.

For example (using pronsole):

> M114
X:1.00 Y:1.00 Z:1.00 E:0.00 Count A: 142 B:0 Z:1260
> G0 Z100
endstops hit:  Z:16.88
> M114
X:1.00 Y:1.00 Z:100.00 E:0.00 Count A: 142 B:0 Z:21263


In this example, the Z endstop was hit at (z:16.88), but the printer appears to think it is at the target location (z:100).

The "Count" Z appears to remain accurate however.

Question: Is this a bug in Marlin, or is this correct behavior and I am misunderstanding something?

• If it a bug you should make a report to their github page. Jan 11 '17 at 22:07
• Thanks, and yes I will if it is. First just seeking confirmation that this is a bug - I would be surprised that this would exist in something as mature as Marlin, as it would clearly throw the whole print job off - so I am first seeking confirmation from those smarter/more experienced that I if it is indeed a bug, or am I just misunderstanding something? Jan 12 '17 at 1:28
• I understand the concern to want to be sure that you have an issue before reporting it. However in this case they would be the best people to report it to. If you think about it, really, you just did a report, but to the wrong people :-)! It is likely the same amount of effort for us to look and not have an answer as it is for the guys who wrote the code. In my opinion the best use of effort is asking them.. I open bug reports all the time at companies like google. No big deal to do a report. Just don't think we will have the detailed knowledge to answer. But I could be wrong. Jan 12 '17 at 3:05