Macro's on startup
-
Can macros be ran automatically when the duet board is turned on?
For example, I remotely turn mine on and off with a smart plug.
It would be helpful if I could set it to home and warm up as soon as its turned on, so its ready for me to start printing straight away. -
you can put any command at the end of config.g even execution of macros.
but do you really want to heat up on startup?
-
Yea. It's only ever on when I want to print and I only print PLA, so why not?
And I'll give putting something in the config a try. -
You may want to add a blocking timeout and automatically turn off heaters again?
https://duet3d.dozuki.com/Wiki/Gcode#Section_M291_Display_message_and_optionally_wait_for_response
It'll give you the convenience of just turning on the printer and pre-heating it, but should you for whatever reason forget to start a print it can timeout and cool down after T seconds.
Something like
M291 P"Preheating" R"Continue" S3 T3600
followed by whatever g-code you need to put printer in stand-by or idle? -
The doc says: "Tn Timeout in seconds, ignored if S=2 or S=3."
-
@jay_s_uk said in Macro's on startup:
Yea. It's only ever on when I want to print and I only print PLA, so why not?
Where to start? Someone hacks into your smart plug. You leave your' phone laying around and the kids start playing with it. Your smart 'phone app gets updated but there is a glitch that turns all your devices on and you happen to be on holiday for a couple of weeks. Any of those scenarios will leave the heaters turned on for an indefinite amount of time. Then you or someone else could be working on the printer, or just inspecting it and happen to have their fingers in the way of the carriages when someone else remotely turns the printer on, either by accident or design resulting in a few crushed digits when the homing sequence starts.
-
@deckingman
Don't worry, my set up is a little more robust than that. And if someone puts their fingers where they shouldn't, well, its their fault. -
@fma said in Macro's on startup:
The doc says: "Tn Timeout in seconds, ignored if S=2 or S=3."
hmm, back to the drawing board - i have similar "need" but would like a contained fail-safe not something http based off the smart home system.
-
@bearer I believe that conditional gcode is going to be implemented in the not too distant future. That will make things like this a lot easier.