reprappro / RepRapFirmware

OO C++ RepRap Firmware
Other
143 stars 120 forks source link

G1 commands with endstop checks cause following commands to malfunction #55

Open dc42 opened 10 years ago

dc42 commented 10 years ago

If a G1 command includes the S1 parameter to enable endstop checks, then the movement will be terminated if the endstop is hit but the following move will be calculated assuming it starts from the position that would have been reached had the endstop not been reached, leaving the head in the wrong position. For example, G1 Y240 S1 followed by G1 Y0 does not place the head at Y=0.

Fixed in DC42 fork version 0.57r and later.

Workaround: always follow a G1 S1 command by a G92 command that sets the position of the axis concerned to the known position of the endstop. In the case of using a high endstop (e.g. Ormerod Y axis), this requires knowledge of the axis length.

RRP-support commented 10 years ago

The current gcode axis homing commands in SD-Image/sys/ have a G92 [axis]0 command after the relevant move. The Y axis on Ormerod v1 is a special case; the axis has to be set with a G92 Y200 when the switch is hit. When the end that the Y axis homes to is changed in the future, ie from a MAX to a MIN, this will need to be different. In Marlin you could define if the endstop was a MAX or MIN endstop for each axis, and the axis lengths; this would allow for more flexibility.