G30 behaving strangely- random moving between probe
-
@sinned6915 said in G30 behaving strangely- random moving between probe:
@fcwilt that is correct, but that really should not matter: the machine is homed in XYZ, bed is trammed and rehomed in Z in case the bed leveling moved the Z-home point.
it does not explain the random movements.
No but the syntax G30 P# Z-9999 is not defined and that may explain the odd behavior.
What is it you are trying to do?
Thanks.
Frederick
-
@fcwilt unless there is a typo in the documentation, its G30 P# Z-9999 or greater.
https://duet3d.dozuki.com/Wiki/G30
As I stated in the beginning of my original post, I am trying to check accuracy, as described the thread I linked.
https://forum.duet3d.com/topic/14886/probe-accuracy-test-macro-issues
-
I'm confused.
The documentation specifies XY co-ordinates but your post talks about movement occurring with no XY co-ordinates specified - which is not a supported syntax.
Does not the documented syntax G30 Xaaa Ybbb Z-99999 not do what you want?
Frederick
-
@sinned6915 Looking at the code...
If you use G30 P# and specify X and Y values then it will move the probe to the specified location (and will take into account the probe offset to do so). If you use G30 P# and do not specify X and Y values then it will use the current X and Y position as the probe target. However if you have a probe offset then it must move the print head so that the probe is at the "current position", this in turn will modify the "current position" for your next call to G30 P#. This behaviour is probably consistent with the description of the command, but possibly not what you want and possibly not very useful!
-
@gloomyandy said in G30 behaving strangely- random moving between probe:
If you use G30 P# and specify X and Y values then it will move the probe to the specified location (and will take into account the probe offset to do so). If you use G30 P# and do not specify X and Y values then it will use the current X and Y position as the probe target. However if you have a probe offset then it must move the print head so that the probe is at the "current position", this in turn will modify the "current position" for your next call to G30 P#. This behaviour is probably consistent with the description of the command, but possibly not what you want and possibly not very useful!
I see nothing in the current docs that suggest that using G30 P# without XY co-ordinates is actually considered to be valid.
It would seem to be more of a "unintended side effect" of the way the code is implemented rather then, as you observed, something useful.
In the absence of a reason for such behavior perhaps the code needs to be updated to flag the lack of XY co-ordinates as an error.
Just my 2 cents.
Thanks for taking the time to investigate the source code.
Frederick
-
@fcwilt I'm pretty sure that what the code is doing is intentional. I'll let others decide if either the code or documentation is correct/needs to be changed.
I'll also mention that G30 is horribly confusing (and somewhat inconsistent) with how it handles probe offsets and resolving those issues is not easy or obvious!
-
@gloomyandy said in G30 behaving strangely- random moving between probe:
@fcwilt I'm pretty sure that what the code is doing is intentional. I'll let others decide if either the code or documentation is correct/needs to be changed.
I suppose @dc42 would be the person who would know which way to go.
I'll also mention that G30 is horribly confusing (and somewhat inconsistent) with how it handles probe offsets and resolving those issues is not easy or obvious!
Agreed. If G30 Xaaa Ybbb was supported then we would not have to use a G1 Xccc Yddd (adjusting for the probe offsets) followed by just G30.
Frederick
-
@gloomyandy thanks for replying.
can I ask you to confirm that i understand what you are saying-
-
G30 X Y P# will put the probe at X Y and probe
-
G30 P# will use the gcode convention of probing the current (unspecified) position of X Y, but it will move the probe by the offsets given in G31 so that probe is at X Y, not the carraige.
G31 K0 P500 X-10 Y-10 Z4
For the G31 above, it will move the carraige X+10 Y+20 so the probe is at X Y.
So the example macro that given in the other thread without X Y coordinates, the posters must have a G31 X0 Y0 for it not to move between probes.
-
-
@sinned6915 said in G30 behaving strangely- random moving between probe:
@gloomyandy thanks for replying.
can I ask you to confirm that i understand what you are saying-
See my comments below, this is my understanding based on a quick look at the code...
- G30 X Y P# will put the probe at X Y and probe
Correct
- G30 P# will use the gcode convention of probing the current (unspecified) position of X Y, but it will move the probe by the offsets given in G31 so that probe is at X Y, not the carraige.
Correct
G31 K0 P500 X-10 Y-10 Z4
For the G31 above, it will move the carraige X+10 Y+20 so the probe is at X Y.
No it will move to X+10 Y+10 as both offsets are -10
So the example macro that given in the other thread without X Y coordinates, the posters must have a G31 X0 Y0 for it not to move between probes.
I had a quick glance at the thread you linked but could not see any examples of G30 without X and Y parameters, but yes I would expect a 0 offsets to be required (which are the default and common on delta printers that often use the nozzle as the probe).
-
@sinned6915 related github issue:
https://github.com/Duet3D/RepRapFirmware/issues/622