-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce the reprobe and rewipe features #3553
Conversation
Uses the G26 command to continue allowing G-code to enter the buffer after the final attempt has failed. This G-code should be placed at the beginning of each start G-code profile.
Here's what this feature accomplishes: https://goblinrefuge.com/mediagoblin/u/kuzmenko/m/reprobe-and-rewipe/ |
Originally, Z would move down until With this feature, if |
…to each example configuration header
…6() function The actual execution of G26 is done inside get_serial_commands(), this commit is just for completeness.
If I understood if the probe fails to detect the closed circuit [by going over a z-min value] it will automatically go into a wipe mode ? This seems a really nice feature but IMO as it is this PR cannot be merged for two reasons:
I would propose to port this PR into MarlinDev so we can plan its merge into the Development version of Marlin. |
@jbrazio for your second point, this is not specific to our method of probing because if any other probing method (photoelectric, mechanical switch, ultrasonic, capacitive, inductive) reaches the lowest probing point assigned to Also, the rewipe is an optional feature with a preprocessor def of its own in Configuration.h; you can choose to define it on L582. If The current probing method could easily damage or destroy a probe (if not also the bed) which fails to trigger, again regardless of which transducer method is used. Because of this fault, I would suggest merging it with RCBugFix, even if it is disabled by default (as is in this PR). |
|
||
#ifdef REPROBE | ||
#define Z_RETRY_PT 15 // Z height to move the hotend after failed probe | ||
#define NUM_ATTEMPTS 3 // Number of attempts to make before quiting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"giving up" (as below) is better than "quitting" here.
@scalez how are you currently homing the Z axis, do you have a max endstop on that axis ? |
@jbrazio on the Mini we home to max on Z, TAZ 6 is also using this feature and it homes to min. |
… thinkyhead's suggestions
@thinkyhead c6eef47 reformatted the code, let me know what you think. |
Using the probe as it's |
@jbrazio TAZ 6 has a |
Why am I doing this questions.. if a robot does not have a dedicated home switch thus uses the probe for I like the feature "not to break the bed" if a probe goes bad, but if a probe goes bad.. homing will also go bad. Otherwise, if we have |
…the MIN_PROBE_PT comment in each of the example configuration headers
@jbrazio if someone designs their machine to use their probe for homing then the probe is used to find the origin. Therefore, when the probe is triggered that would be Z=0. Regardless of the method used for homing, when a machine is homed it has found its origin (0, 0, 0). If a machine is using its probe for both homing and probing, and probing failed, then homing would likely also fail, this is just an inherent drawback to using a probe for homing. If you have both a |
All I know is based on this vid: https://youtu.be/_RzFC5FplmY?t=4m24s |
No problem! I'll download their Marlin source and see what they're doing. |
The mini uses simple 4-point leveling, with the "probe" set to -1.43 Z distance from the nozzle. The nozzle+clips are apparently connected to one of the endstop switches (Z min perhaps, as it seems to Home to Z Max). Software endstops are disabled, and |
@thinkyhead we will be using software endstops in our future Minis. Refer to the source code found here: https://github.com/alephobjects/Marlin/tree/Gladiola. |
@thinkyhead Currently, the digital pin can be left as a pullup, but for electromagnetic radiation test purposes we leave the digital pin |
serial_count = 0; | ||
return; | ||
} | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jbrazio @thinkyhead please take a look at this snippet. In case the probing fails all attempts G26
is used to give control back to the host, all other commands are ignored so that the print doesn't process. This is managed in the parser and is intended to handle hosts that aren't aware of this feature.
We prefer to reserve G26
if possible.
Granted if the intent is to be able to do manual cleaning of the nozzle and continue then the host needs to prevent all G-Code from being sent other than G26
, Marlin cannot hold each command it receives in its buffer until it sees a G26
, not enough memory; and it shouldn't throw away all other commands if they're not G26
as done here. This only done to handle "unaware" hosts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jbrazio @thinkyhead would it possible for us to reserve G26
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum you may I've checked and G26
is not defined anywhere. But I assume when we need user intervention we would call stop()
right ? To get out of stop()
you may use M999 S1
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jbrazio currently we don't call stop()
. The buffer can still get filled when IsStopped() == true
. To prevent any host from sending commands into the buffer after probing has failed we throw away all commands other than G26
. That's why we handle G26
in the parser. M999 S1
could be used for this purpose as well but since we allocated G26
before this PR and are afraid of having future conflicts with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@scalez We've had some discussions recently about the handling of commands ahead of the normal command buffer. I don't know how conclusive they were. But understand that if a host fills up the buffer after issuing G29
(most likely while printing a GCode file) then the G26
command may not be seen until the G29
command exits and the machine resumes accepting commands.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thinkyhead Currently we're flushing the command buffer when we enter the PROBE_FAIL_PANIC
state. So even if the buffer is filled it is cleared and there is plenty of room for G26
to enter the buffer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see! So, I'm also wondering why we need a new command or a "special" kind of panic, since we have M999
(and recently added M999 S1
to preserve the rx_buffer
). Also, if, as you say, the buffer is flushed then there should be no need to do special handling of G26
outside of the normal command buffer. (We want to minimize calls to strcmp
in the gcode parser.)
card.closefile(); | ||
card.sdprinting = false; | ||
#endif | ||
clear_buffer(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thinkyhead command buffer is flushed here.
@AnHardt @jbrazio @thinkyhead: After doing some testing it turns our Do you guys have any suggestions? |
@scalez All the functionality will be implemented using |
@jbrazio that would an excellent way to do it imo. |
OK this means that we can then decide if we set a flag to control either |
FWIW |
Conflicts: Marlin/Configuration.h Marlin/Marlin_main.cpp Marlin/example_configurations/Felix/Configuration.h Marlin/example_configurations/Felix/DUAL/Configuration.h Marlin/example_configurations/Hephestos/Configuration.h Marlin/example_configurations/Hephestos_2/Configuration.h Marlin/example_configurations/K8200/Configuration.h Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h Marlin/example_configurations/RigidBot/Configuration.h Marlin/example_configurations/SCARA/Configuration.h Marlin/example_configurations/TAZ4/Configuration.h Marlin/example_configurations/WITBOX/Configuration.h Marlin/example_configurations/adafruit/ST7565/Configuration.h Marlin/example_configurations/delta/biv2.5/Configuration.h Marlin/example_configurations/delta/generic/Configuration.h Marlin/example_configurations/delta/kossel_mini/Configuration.h Marlin/example_configurations/delta/kossel_pro/Configuration.h Marlin/example_configurations/delta/kossel_xl/Configuration.h Marlin/example_configurations/makibox/Configuration.h Marlin/example_configurations/tvrrug/Round2/Configuration.h
@jbrazio I will be creating a new PR soon. |
@jbrazio @thinkyhead @AnHardt one thing that the new PR will depend on is the ability to place a command at the beginning of the We may be able to make a new function similar Here's what needs to occur when a probe fail event is triggered:
@AnHardt's What do you guys think is the best way to solve this? |
Call |
That would be one way to do it.. other one would be to call -edit- |
@Blue-Marlin @jbrazio from the discussion earlier it seemed we wanted it to enter the queue, but if everyone is okay with calling the function directly then I'm cool with that. |
That would be my fault, I spoke about "G12" but I have no issues with direct function calling. |
Uses the G26 command to continue allowing G-code to enter the buffer after the final attempt has failed. This G-code should be placed at the beginning of each start G-code profile.