Welcome! Log In Create A New Profile

Advanced

G29 command only probing 1 location

Posted by Orodorin 
G29 command only probing 1 location
July 22, 2014 12:08PM
I've been researching this for the last couple days and I am unable to find any existing responses which have a positive effect on my issue. I am using the most recent commit from Github dated July 20, 2014.

I have everything working up to the point where the G29 command moves to my first coordinate X100 Y20 and does a probe (5 times). However it seems to stop right there rather than continue to probe my other two points. I have tried disabling my end max end stops, switching the invert, physically switching my end stops, physically inverting my end stops to opposite sides. I am using a self build 1x2 and have been successfully printing for a few weeks now (enough to print some parts and the autoleveling arm but I am looking to upgrade my precision a bit so I can print more replacement parts.


Here are the applicable parts of my configuration.h file I think apply to this issue:

// ##########################################################################################
// ##                            Endstop configuration                                     ##
// ##########################################################################################

/* By default all endstops are pulled up to HIGH. You need a pullup if you
use a mechanical endstop connected with GND. Set value to false for no pullup
on this endstop.
*/
#define ENDSTOP_PULLUP_X_MIN true
#define ENDSTOP_PULLUP_Y_MIN true
#define ENDSTOP_PULLUP_Z_MIN true
#define ENDSTOP_PULLUP_X_MAX true
#define ENDSTOP_PULLUP_Y_MAX true
#define ENDSTOP_PULLUP_Z_MAX true

//set to true to invert the logic of the endstops
#define ENDSTOP_X_MIN_INVERTING false
#define ENDSTOP_Y_MIN_INVERTING false
#define ENDSTOP_Z_MIN_INVERTING false
#define ENDSTOP_X_MAX_INVERTING false
#define ENDSTOP_Y_MAX_INVERTING false
#define ENDSTOP_Z_MAX_INVERTING false

// Set the values true where you have a hardware endstop. The Pin number is taken from pins.h.

#define MIN_HARDWARE_ENDSTOP_X true
#define MIN_HARDWARE_ENDSTOP_Y true
#define MIN_HARDWARE_ENDSTOP_Z false
#define MAX_HARDWARE_ENDSTOP_X true
#define MAX_HARDWARE_ENDSTOP_Y false
#define MAX_HARDWARE_ENDSTOP_Z true

// maximum positions in mm - only fixed numbers!
// For delta robot Z_MAX_LENGTH is the maximum travel of the towers and should be set to the distance between the hotend
// and the platform when the printer is at its home position.
// If EEPROM is enabled these values will be overidden with the values in the EEPROM
#define X_MAX_LENGTH 140
#define Y_MAX_LENGTH 90
#define Z_MAX_LENGTH 86.4

/* Z-Probing */

#define FEATURE_Z_PROBE true
#define Z_PROBE_PIN ORIG_Z_MIN_PIN
#define Z_PROBE_PULLUP true
#define Z_PROBE_ON_HIGH true
#define Z_PROBE_X_OFFSET 20.3
#define Z_PROBE_Y_OFFSET -3
#define Z_PROBE_BED_DISTANCE 5.0 // Higher than max bed level distance error in mm

// Waits for a signal to start. Valid signals are probe hit and ok button.
// This is needful if you have the probe trigger by hand.
#define Z_PROBE_WAIT_BEFORE_TEST false
/** Speed of z-axis in mm/s when probing */
#define Z_PROBE_SPEED 2
#define Z_PROBE_XY_SPEED 75
#define Z_PROBE_SWITCHING_DISTANCE 1.5 // Distance to safely switch off probe
#define Z_PROBE_REPETITIONS 5 // Repetitions for probing at one point.
/** The height is the difference between activated probe position and nozzle height. */
#define Z_PROBE_HEIGHT -9
/** These scripts are run before resp. after the z-probe is done. Add here code to activate/deactivate probe if needed. */
#define Z_PROBE_START_SCRIPT "M340 P0 S1500"
#define Z_PROBE_FINISHED_SCRIPT "M340 P0 S600"

/* Autoleveling allows it to z-probe 3 points to compute the inclination and compensates the error for the print.
   This feature requires a working z-probe and you should have z-endstop at the top not at the bottom.
   The same 3 points are used for the G29 command.
*/
#define FEATURE_AUTOLEVEL true
#define Z_PROBE_X1 120
#define Z_PROBE_Y1 20
#define Z_PROBE_X2 120
#define Z_PROBE_Y2 70
#define Z_PROBE_X3 20
#define Z_PROBE_Y3 70
Attachments:
open | download - Configuration.h (52.8 KB)
Re: G29 command only probing 1 location
July 22, 2014 01:59PM
The G29 aborts if measured height is below zero and you add
#define Z_PROBE_HEIGHT -9

which is not good. That should be a positive number or your extruder would hit the bed before the z-probe. With max height 5mm it would result in negative values and abort as described.

Also make sure it is set correctly in eeprom.


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Re: G29 command only probing 1 location
July 22, 2014 03:09PM
Woot,

It's working great grinning smiley. I don't know how many times I've looked at that and missed it.

Thank you,

Ben
Re: G29 command only probing 1 location
October 08, 2014 04:25PM
Z_PROBE_HEIGHT is not working for me.
I get only random effects.
When I looked in the source code I found that Z_PROBE_HEIGHT isn't used anyhere but in configuration.h and Eerpom. (?!)
Also documentation is impossible to understand.
For instance, what "This feature requires a working z-probe and you should have z-endstop at the top not at the bottom." means ???
Re: G29 command only probing 1 location
October 09, 2014 08:45AM
You have to look where the eeprom config values get called, in this case runZProbe:

float distance = (float)sum * invAxisStepsPerMM[Z_AXIS] / (float)repeat + EEPROM::zProbeHeight();

As you see it is a simple constant that gets added to the measured distance. So difference of distance measued and assumed z pos can give a correction.

"For instance, what "This feature requires a working z-probe and you should have z-endstop at the top not at the bottom." means ???"

z-probe = sensor to measure contact with back.

Endstop for z should be a max endstop so homing z goes up to z-max. Since we assume a not leveled bed a z-min endstop could stop measurements since it could trigger before we touch bed or after we touch. The only case where z-min works is when no autoleveling is needed.


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Sorry, only registered users may post in this forum.

Click here to login