chiark / gitweb /
M206: always use homing ("homeing") offsets
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 1 Aug 2012 20:12:14 +0000 (21:12 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 9 Aug 2012 18:20:23 +0000 (19:20 +0100)
commit965d378ed7d5793305f1d4fda8d4c39a386660cb
treec2feea4afd56caea863e82cd486423f93f510614
parent33f9aa6d9952e7f643bb2f7eba39f7bd1a765f86
M206: always use homing ("homeing") offsets

Previously the parameters set in M206 would only be used if a G82
command was sent with specific axis home values.  This limits its
usefulness.

Really, we should have a way to adjust the XYZ homing of a machine in
the eeprom.  So as the first stage of this, make M206 affect every
home command.  The values set using M206 are now added to the
configuration variables [XYZ]_HOME_POS.

This is achieved by replacing all uses of [XYZ]_HOME_POS in the code
by [XYZ]_HOME_POS_A which is a macro which includes the adjustment.

A question arises: if the M206 offset is set, should this adjustment
to the home position shift or change the possible range of movement
permitted by the software endstops ?

I have taken the view that the software endstops are a backstop safety
feature which is not necessarily entirely accurate, and that reducing
the scope of movement, at either end, is not desirable.  I have
therefore arranged that nonzero values for M206 increase the total
range of movement.

So for example with
  #define X_MIN_POS 0
  #define X_HOME_POS 0
  #define X_MAX_POS 100

M206 X-10 would permit the machine to move from the endstop
(considered X=-10) 110mm in the positive X direction (considered
X=+100).

M206 X+10 would permit the machine to move from the endstop
(considered X=-10) 110mm in the positive X direction (considered
X=+110).

fixes #200 (in ErikZalm/Marlin).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Marlin/Marlin.h
Marlin/Marlin.pde
README.md