GPIO auto-shutdown doesn't wait for M109 cooling #328

Open
opened 2020-06-12 22:01:26 +01:00 by gbrenans · 0 comments
gbrenans commented 2020-06-12 22:01:26 +01:00 (Migrated from github.com)

Hi,
An issue occured and so far I haven't been able to solve it. Could somebody help me to find a solution ?
I use Octoprint 1.4.0 with Enclosure plugin 4.13.1 on a CR10S pro printer running Marlin 2.0.5_DW6.1 from Tiny Machine.
Enclosure plugin is settled to drive a relay by regular GPIO (used to on/off the printer power supply). It works pretty well if I use the toggle button to switch state directly, or ENC by Gcode as well.
Of course I need to cool down the hotend at the end of the print before shutting down the printer. That's why I've been using M109 at the end of the Gcode with success so far.
I tried both methods to enable auto shutdown:

  • ENC command right after M109 at the end of the Gcode
  • Auto Shutdown toggle button in Enclosure Menu

In both cases, Octoprint seems to ignore M109 command and turns off the power supply immediately...
According to the fact that the relay switches, I presume pinout configuration is OK.

That is what happen if I enable auto shutdown by toggle button:
Send: N101 G1 E-2 Z0.2 F2400*100 Recv: ok N101 P3 B3 Send: N102 G1 X5 Y5 F3000*79 Recv: ok N102 P2 B3 Send: N103 G1 Z10*81 Recv: ok N103 P1 B3 Send: N104 G90*21 Changing monitoring state from "Printing" to "Finishing" Recv: ok N104 P1 B3 Send: N105 M106 S0*99 Recv: ok N105 P2 B3 Send: N106 M104 S0*98 Recv: ==onPrintTimerStopped== Recv: ==onConfigurationStoreWritten== Recv: //action:notification TM3D 10S Pro Ready. Recv: ok N106 P2 B3 Send: N107 M140 S0*99 Recv: //action:notification TM3D 10S Pro Ready. Recv: ok N107 P2 B3 Send: N108 M109 R50*85 Recv: //action:notification TM3D 10S Pro Ready. Recv: T:180.00 /50.00 B:23.66 /0.00 @:0 B@:0 W:? Unexpected error while reading serial port, please consult octoprint.log for details: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2823 Please see https://faq.octoprint.org/serialerror for possible reasons of this. Changing monitoring state from "Finishing" to "Offline (Error: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2823)" Connection closed, closing down monitor

And that is what happen if I use ENC command:
Send: N100 G1 E-2 F2700*48 Recv: ok N100 P4 B3 Send: N101 G1 E-2 Z0.2 F2400*100 Recv: ok N101 P3 B3 Send: N102 G1 X5 Y5 F3000*79 Recv: ok N102 P2 B3 Send: N103 G1 Z10*81 Setting REGULAR output 2 to value False Recv: ok N103 P1 B3 Send: N104 G90*21 Recv: ok N104 P1 B3 Send: N105 M106 S0*99 Recv: ok N105 P2 B3 Send: N106 M104 S0*98 Changing monitoring state from "Printing" to "Finishing" Recv: ==onPrintTimerStopped== Recv: ==onConfigurationStoreWritten== Recv: //action:notification TM3D 10S Pro Ready. Recv: ok N106 P2 B3 Send: N107 M140 S0*99 Recv: //action:notification TM3D 10S Pro Ready. Recv: ok N107 P2 B3 Send: N108 M109 R50*85 Recv: //action:notification TM3D 10S Pro Ready. Recv: T:180.05 /50.00 B:23.97 /0.00 @:56 B@:0 W:? Unexpected error while reading serial port, please consult octoprint.log for details: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2823 Please see https://faq.octoprint.org/serialerror for possible reasons of this. Changing monitoring state from "Finishing" to "Offline (Error: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2823)" Connection closed, closing down monitor

At last...Excuse my english, I'm not fluent :)

Hi, An issue occured and so far I haven't been able to solve it. Could somebody help me to find a solution ? I use Octoprint 1.4.0 with Enclosure plugin 4.13.1 on a CR10S pro printer running Marlin 2.0.5_DW6.1 from Tiny Machine. Enclosure plugin is settled to drive a relay by regular GPIO (used to on/off the printer power supply). It works pretty well if I use the toggle button to switch state directly, or ENC by Gcode as well. Of course I need to cool down the hotend at the end of the print before shutting down the printer. That's why I've been using M109 at the end of the Gcode with success so far. I tried both methods to enable auto shutdown: - ENC command right after M109 at the end of the Gcode - Auto Shutdown toggle button in Enclosure Menu In both cases, Octoprint seems to ignore M109 command and turns off the power supply immediately... According to the fact that the relay switches, I presume pinout configuration is OK. That is what happen if I enable auto shutdown by toggle button: `Send: N101 G1 E-2 Z0.2 F2400*100 Recv: ok N101 P3 B3 Send: N102 G1 X5 Y5 F3000*79 Recv: ok N102 P2 B3 Send: N103 G1 Z10*81 Recv: ok N103 P1 B3 Send: N104 G90*21 Changing monitoring state from "Printing" to "Finishing" Recv: ok N104 P1 B3 Send: N105 M106 S0*99 Recv: ok N105 P2 B3 Send: N106 M104 S0*98 Recv: ==onPrintTimerStopped== Recv: ==onConfigurationStoreWritten== Recv: //action:notification TM3D 10S Pro Ready. Recv: ok N106 P2 B3 Send: N107 M140 S0*99 Recv: //action:notification TM3D 10S Pro Ready. Recv: ok N107 P2 B3 Send: N108 M109 R50*85 Recv: //action:notification TM3D 10S Pro Ready. Recv: T:180.00 /50.00 B:23.66 /0.00 @:0 B@:0 W:? Unexpected error while reading serial port, please consult octoprint.log for details: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2823 Please see https://faq.octoprint.org/serialerror for possible reasons of this. Changing monitoring state from "Finishing" to "Offline (Error: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2823)" Connection closed, closing down monitor` And that is what happen if I use ENC command: `Send: N100 G1 E-2 F2700*48 Recv: ok N100 P4 B3 Send: N101 G1 E-2 Z0.2 F2400*100 Recv: ok N101 P3 B3 Send: N102 G1 X5 Y5 F3000*79 Recv: ok N102 P2 B3 Send: N103 G1 Z10*81 Setting REGULAR output 2 to value False Recv: ok N103 P1 B3 Send: N104 G90*21 Recv: ok N104 P1 B3 Send: N105 M106 S0*99 Recv: ok N105 P2 B3 Send: N106 M104 S0*98 Changing monitoring state from "Printing" to "Finishing" Recv: ==onPrintTimerStopped== Recv: ==onConfigurationStoreWritten== Recv: //action:notification TM3D 10S Pro Ready. Recv: ok N106 P2 B3 Send: N107 M140 S0*99 Recv: //action:notification TM3D 10S Pro Ready. Recv: ok N107 P2 B3 Send: N108 M109 R50*85 Recv: //action:notification TM3D 10S Pro Ready. Recv: T:180.05 /50.00 B:23.97 /0.00 @:56 B@:0 W:? Unexpected error while reading serial port, please consult octoprint.log for details: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2823 Please see https://faq.octoprint.org/serialerror for possible reasons of this. Changing monitoring state from "Finishing" to "Offline (Error: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2823)" Connection closed, closing down monitor` At last...Excuse my english, I'm not fluent :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Gandalf/OctoPrint-Enclosure#328