Welcome! Log In Create A New Profile

Advanced

Endstops and current postion

Posted by evgen 
Endstops and current postion
February 08, 2018 04:53AM
Hi,

I work with Marlin 2.0 bugfix on lpc1768 and found some strange behavior of enstops.

Axis X with two endstops. Let's say, Initial position 0, endstops are at -5.0 and +5.0

Home not found.

//Endstop Settings
#define USE_XMIN_PLUG
#define USE_XMAX_PLUG
// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS 0
#define X_MAX_POS 250

//#define MIN_SOFTWARE_ENDSTOPS
//#define MAX_SOFTWARE_ENDSTOPS

//Configuration_adv.h
//#define ENDSTOPS_ALWAYS_ON_DEFAULT

float current_position[XYZE] defined at \module\motion.cpp and reported with M114 command

current_position[0]   stepper.position(0)  
initial          0                       0 
G90
G1 X1         1.0                       1600
G1 X2         2.0                       3200
G1 X5         5.0                       8000
G1 X6         6.0                       8004    echo:endstops hit:  X:5.00 (2 messages)
G1 X5         5.0                       6404
G1 X0         0.0                      -1594   
G1 X10       10.0                      8002   echo:endstops hit:  X:5.00 (4 messages) //wrong position (should be 5.0)
G1 X7        7.0                        3202
G1 X8        8.0                        4802
G1 X20       20.0                      8004   echo:endstops hit:  X:5.00 (2 messages) //wrong position (should be 5.0)
G28 X         0.0                        0
(without ENDSTOPS_ALWAYS_ON_DEFAULT)
G1 X100     100.0                   160000  //not seen endstop and convulsions at real axis stop
G1 X-100   -100.0                  -160000  //not seen endstop and convulsions at real axis stop
(with ENDSTOPS_ALWAYS_ON_DEFAULT)
G1 X100     100.0                   8004  echo:endstops hit:  X:5.00 (2 messages) // seen endstop,  but show wrong position


current_position does not changes at move time.

So the questions is
1) what is current position with endstops and where is instant current position at time of movement?

2) how to use endstops after homing?
UPDATE: answer: - use ENDSTOPS_ALWAYS_ON_DEFAULT

Edited 1 time(s). Last edit at 02/08/2018 08:32AM by evgen.
Sorry, only registered users may post in this forum.

Click here to login