-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Request] Print pause with input GPIO #1351
Comments
Hi @temuccio, It looks like there is some information missing from your bug report that will be needed in order to solve the problem. Please take a look at the Contribution Guidelines which will provide you with a template to fill out here so that your bug report is ready to be investigated (I promise I'll go away then too!). If you did not intend to report a bug, please take special note of the title format to use as described in the Contribution Guidelines. I'm marking this one now as needing some more information. Please understand that if you do not provide that information within the next two weeks (until 2016-06-04 22:00) I'll close this ticket so it doesn't clutter the bug tracker. This is nothing personal, so please just be considerate and help the maintainers solve this problem quickly by following the guidelines linked above. Remember, the less time the devs have to spend running after information on tickets, the more time they have to actually solve problems and add awesome new features. Thank you! Best regards, PS: I'm just an automated script, not a human being, so don't expect any replies from me :) Your ticket is read by humans too, I'm just not one of them. |
For this request I think of resolve in this mode: |
There does appear to be a "ZCHANGE" event on the page listed above. If code could be hooked in here to poll a GPIO and optionally trigger a PAUSE event if it was high (or low), that would do it. You could hook up a filament-end switch with a pull-up or pull-down resistor, and could avoid a failed print. |
You'd just need to ensure there's always enough filament between the sensor and extruder to complete any one Z layer, even in the worst case. (Suppose the filament triggers the sensor just after the ZCHANGE event.) |
Yes FlyByPC, the idea is it this, but I don't understand how put in pause. How I write a condition in command line? |
I don't know Python, although it's on my list to learn. It looks like you can "fire" events, which are seen by anything "subscribed" to them. Here's the code in events.py. Maybe it's as easy as adding a GPIO check and conditional pause event to the ZCHANGE event? In Arduino C, it would read something like: void event_ZCHANGE{ //... rest of code here if (digitalRead(FILAMENTPIN) == LOW){fireEvent(PAUSE);} }//event_ZCHANGE |
the best way to do it is via a custom plugin that would get a "nudge" from the GPIO and issue a "pause" and some kind of notification (play a sound?) ... what kind of filament sensor are we taking about ? |
You have two options here:
The event hooks are the wrong approach - a GPIO input from a filament sensor won't trigger an event in OctoPrint. Also keep in mind that this is functionality that will NOT be added to OctoPrint proper, since OctoPrint is platform agnostic and runs on anything under the sun that runs Python 2.7 - that doesn't necessarily have to be a Pi or anything else with GPIO for that matter. So plugin-only (or external) it is. |
@temuccio: I put together a quick plugin. Change it as you need ... |
Thanks! The API -- and/or the plugin -- is probably just what I'm looking for. Gina -- would it be possible to add this to the next version of OctoPi, since that's targeted for RPi? |
@FlyByPC Bundling an existing universally applicable plugin might be possible, but then again it would make more sense to have people just install whatever they need through the plugin repository (that's what it's there for). Most people don't connect stuff to GPIO, so having it included by default adds unnecessary ballast. |
That makes sense. I didn't know about the API -- and that alone should make a solution pretty straightforward. Thanks. |
@MoonshineSG thanks for the plugin, the next week I cat test it. For the filament sensor , I use a sensor's paper in the common printer (in attach two foto for the idea). It's works at 3.3V ad is it compatible with raspberry. |
a clever approach using an optical sensor (using the sample code above, since then promoted to full fledge plugin): http://www.thingiverse.com/thing:1646220 |
Considering that the intent behind this request was a filament sensor and for that there's now a plugin available, I'd say this can be considered resolved. |
That sounds good. Thanks!
…_____
From: Gina Häußge [mailto:notifications@github.com]
Sent: Friday, January 27, 2017 12:41
To: foosel/OctoPrint
Cc: M. Eric Carr; Mention
Subject: Re: [foosel/OctoPrint] [Request] Print pause with input GPIO
(#1351)
Considering that the intent behind this request was a filament sensor and
for that there's now a plugin available, I'd say this can be considered
resolved.
�
You are receiving this because you were mentioned.
Reply to this email directly, view
<#1351 (comment)> it
on GitHub, or mute
<https://github.com/notifications/unsubscribe-auth/AD3fKCx3JJji69meqfu5ViDZS
A8J24bRks5rWiwSgaJpZM4Ij3b9> the thread.
<https://github.com/notifications/beacon/AD3fKDWLoaNsT-yyRvQ59nQYxLGsdQvZks5
rWiwSgaJpZM4Ij3b9.gif>
|
I'm using the "pause print at Z layer" plugin for Cura, that allows for e.g. filament change at a certain height. That plugin auto-pauses the print, requiring a "Resume" click in the Octoprint UI to resume the print. My printer (Anet A8 / Marlin) doesn't seem to have a menu option to resume the print, so I have to do if from the web for now. Does that mean a GPIO pause/resume function makes sense after all? GPIO stop may as well, as a sort of "emergency stop" function. |
Hello,
it is possible to send pause command at printer when an input of GPIO change status.
With this mode I can control il filament is present or it is finished and, in this case, I don't lose the print.
The text was updated successfully, but these errors were encountered: