Turning printer after finished print?
-
@DIY-O-Sphere I know how to control PSU. The question was - is there a way to trigger/set some kind of flag that can be used let's say in stop.g to wait for cooldown and switch off PSU after print is done.
something like in stop.g
if <flag_power_at_the_end> M81 S1
Not by manually adding M81 at the end of gcode file, but some flag that could be set/cleared during the print without changing gcode file or configuration.
-
If you want to wait for a cool down, set a temp for the hotend to 50c (just above where it turns off the fan) and then use M116 to wait for the temp, and then turn off with M81
Or if you know it takes 20 minutes just add a G4 dwell command to wait that long, then M81 to turn off.
-
@Phaedrux according to https://duet3d.dozuki.com/Wiki/Gcode#Section_M81_ATX_Power_Off M81 S1 will wait for cooldown. The issue here is not with PSU control itself, or with waiting for cooldown.
Perhaps detailed usecase would clear things a little.
I have power button connected to io pin, I have a trigger set for that button, but currently only when print is not in progress.What I would like to do is:
- print in progress, gcode file has no PSU related commands in it
- I press the button during print
- Printer will turn off after print is finished and hotend cooled down (I would expect that I need to call M81 S1 somehow when print is done).
EDIT: I just realized that just calling M81 S1 during the print might do the job. Need to check that.
-
Kind of like the Auto sleep function in DWC?
https://duet3d.dozuki.com/Wiki/Duet_Web_Control_v2_and_v3_(DWC)_Manual#Section_Job_Control
-
@BoA said in Turning printer after finished print?:
EDIT: I just realized that just calling M81 S1 during the print might do the job. Need to check that.
Yep. Here's a copy of my "stop.g" I use on one of my printers (that turns off the PSU when the print is done and the hot end has cooled down.) The commands are commented:
G90 ; absolute positioning G1 S1 X150 Y75 Z150 F1800 ; move the build plate down and get the head out of the way G10 P0 S0 R0; set T0 temp ; turn off tool 0 heater G10 P1 S0 R0; set T1 temp ; turn off tool 1 heater M140 S0 ; turn off bed ; turn off bed heater M106 S0 ; turn off the layer fan M84 ; turn off the motors M300 P1000 ; make some noise M81 S1 ; tell the printer to turn off the 24V PSU when things cool down
-
-
Something could probably be accomplished with daemon.g and conditional gcode.
Perhaps your stop.g could create a daemon.g that uses conditional gcode to monitor a tool temp and if its < some value, toggles an I/O pin?
I've never played around with daemon.g, so I'm not entirely sure how that works.
-
Perhaps when variables are available you can use the button to set a variable, and then at the end of the print there can be a condition that checks the state of the variable and proceeds accordingly.
-
@BoA
All you have to do is have your button's trigger set some other output high.
Then in your stop.g check the condition of that output.
In your start.g you'd set that output low to ensure it's reset each print. -
@OwenD genius!