Comments (8)
Thanks, I've updated the wiki's G29
links to the Marlin documentation; your link to the bilinear-specific page is a much better choice. I'm making some changes to the G29
code now, so I'll update the wiki with the G29
particulars with the next release.
FYI, G29 P0
does enable the leveling mesh. It is equivalent to G33 P1 V1
followed by M420 S1
. I added it to be compatible with shamelessly borrowed the idea from Marlin4MPMD firmware. Without G29 P0
, M420 S1
should be used after homing with G28
to re-enable the leveling mesh.
[edit]
Also please note that Marlin 2.0's G29 H
parameter is not supported in the firmware.
from mpmd_marlin_1.1.x.
Also, if there's some way to abort G29 when it starts going wrong (short of rebooting the printer), that would be great to have documented.
from mpmd_marlin_1.1.x.
Another good point.
Marlin's concept of "cancel" is to shut everything down and restart its program from the top. So to cancel the G29
command, Marlin offers M112
which does shutdown everything down and restarts (not technically reboot, though). With mpmd_marlin_1.1.x, M112
should flash a red LED and wait for the user to press the LED push button switch to continue. Pressing the switch initially should also cause the same kind of abort.
Marlin does offer M524
(Abort SD Print), but it seems to have been added as a patch to an all ready kludgy "abort printing" mechanism. There really should be a gentler way to cleanly exit Marlin's longer running commands.
from mpmd_marlin_1.1.x.
In issue #28 @ToxicFrog comments:
It looks like the firmware has some checking for completely ridiculous G29 results caused by one of the switches getting stuck down and/or the switches being so finely balanced that just moving the print head around closes them, and will abort the G29 procedure if it detects this. When that happens, the LCD will show an error message and the indicator LED will flash red. Pressing the button on the front panel will return the LCD to normal operation, but the LED keeps flashing red and the printer won't respond to serial commands until you power cycle it. Since I'm calibrating it via serial rather than using the gcode files on the SD, this is annoying.
What's happening here is that Marlin's motion control is detecting what is considers a motion error (e.g. not reaching a target position, hitting an endstop too soon, etc.). There is a little bit of extra checking because G29
employs a "probing move", but this is not specific to the G29
command; G30
(Single Z Probe) could have the same difficulty. An error is easy to simulate -- gently interfere with the print head's motion. So, Marlin detects a motion error and aborts via Marlin's "kill" routine which shuts everything down and restarts.
In mpmd_marlin_1.1.x, I changed Marlin's "kill" routine to flash a red LED and wait for a button press on the LED push button switch before restarting its program. The change makes it easy to spot a fault that occurs because the code is doing its job, or a fault that occurs because the firmware is "off in the weeds".
In most cases I think this is prefered behavior, but in @ToxicFrog's scenario this behavior is a definite problem. Off the top of my head, I don't have a good way to fix this. Even if the firmware restarted with no user intervention, the serial connection will drop, current machine state is lost, etc. -- all complications for the program on the other end of the serial connection. If such a program could detect the dropped connection, wait a few seconds, and then establish a new connection, then maybe the new connection could signal the firmware in the same way as a button press. I don't know; it seems tricky.
from mpmd_marlin_1.1.x.
Even if the firmware restarted with no user intervention, the serial connection will drop, current machine state is lost, etc. -- all complications for the program on the other end of the serial connection. If such a program could detect the dropped connection, wait a few seconds, and then establish a new connection, then maybe the new connection could signal the firmware in the same way as a button press.
In this case, the program on the other end (octoprint) does detect the dropped connection, and I can ask it to re-establish the connection; when it does, however, the printer never responds. If I power cycle the printer first it re-establishes the connection fine.
It is possible that this is a bad interaction with octoprint. In particular I made some changes to the serial connection settings when I first set it up to work around a bug in the stock MPMD firmware that likely does not exist in mpmd_marlin. So I'll investigate that angle first; from what you've said here, it sounds like pressing the button on the printer and then attempting to reestablish the serial connection should work.
from mpmd_marlin_1.1.x.
You're observation is spot on. And it looks like Octoprint is robust enough so that maybe it will be possible to change the firmware to use a "serial re-connection" to indicate a "button press" in this particular situation. I'll look into it.
Thank you for following up. The information is helpful.
from mpmd_marlin_1.1.x.
Ok, here's what I think can work. Please bear with me as I first run through the scenario:
- the machine is connected via USB
- for whatever reason, kill is called (messages sent to USB)
- the LED flashes red, but the serial connection is still up
- pressing the button, the LED turns to solid red for 2s
- the machine restarts, the serial connection is dropped
I believe this is the sequence. And if the case, the serial port is still operational while waiting for the button press. This is good -- there is already a mechanism in Marlin for this case: M108
(essentially, fake a button press). I can add the code to make this work. So the fix would be:
- pressing the button, the LED turns to solid red for 2s,
OR sendingM108
via the USB connection to restart
I'll also send a "kill action" to the USB host, so it can respond automatically to the situation. The action is a specially formatted message sent to host that would look something like // action:killed
. With this, OctoPrint could respond with M108
.
I think this can work. If it does, then M112
, emergency stop, could be used to abort long commands, since there would be a way to programmatically continue afterwards. Though not very graceful, the process does not need to "hang" waiting for a button press.
[UPDATE Aug 3, 2020]
I've added this to the upcoming release, 119r13
. It seems to work pretty well. Testing with a terminal program, I was able to abort long commands with M112
and continue (reboot) with M108
-- no physical pressing of the button is necessary. Thank you for pointing out the issue, and for following up. This change is a nice improvement to the firmware.
from mpmd_marlin_1.1.x.
Closing, as I think everything is covered with the 119r13
release.
Please do not hesitate to re-open the issue if I've missed something.
from mpmd_marlin_1.1.x.
Related Issues (20)
- error:Probing failed
- communication problem HOT 1
- G29 P0 does not work as expected HOT 1
- Corrupt display HOT 7
- E1"Heating" Error HOT 54
- effector collison with starting g-code HOT 1
- Thermal Runaway after updating firmware HOT 2
- FAN needs support HOT 55
- Control FAN HOT 4
- Question about M92 HOT 2
- Version clarification HOT 2
- Pronterface Serial Exception HOT 11
- Help to compile new firmware HOT 1
- Firmware will not flash from newer cards which the new firmware will read just fine HOT 3
- A hint on wifi file uploads HOT 4
- Bizarre Behavior when Calibrating HOT 2
- Real Z location lost after M420 S1 HOT 1
- Max bed temperature. HOT 2
- PID tune typo? HOT 2
- Printer pauses midprint using octopi HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mpmd_marlin_1.1.x.