Open gryn opened 4 years ago
Not entirely sure if it is something I would want to add to this plugin as it is out of scope.
Mind explaining the purpose of the example you provided? OctoPrint will already poll for temps automatically if auto reporting isn't supported.
If anything add this to FeatHub as requests don't really belong here.
Hi, sorry if I put this request in the wrong bucket.
What's happening is a lot like when you request a blocking temp change. (I.e. you ask, please wait until we are at 200C). The printer "locks up" and is unresponsive until after the command is completed. This is what happens with G4 commands as well, which are "wait for an elapsed time" commands. So, I'd like the printer to wait 10 minutes, but during that time the printer becomes unresponsive. It also doesn't tell you the temperature during this period (which is unlike the wait for temp command). In order to make things manageable, I break my wait into smaller chunks, which you see above: wait 60 seconds, ask for temp, immediately wait another 60 seconds, etc.
Ironically, I am doing this because I am waiting for the printer to cool down, and there is no way to get the "wait for temp" commands to work in a way that doesn't activate the PID heating routine. i.e. if I ask it to wait for the heat bead to be at 30C or below, it will actually try to "heat" the bead to 30C, which is much slower, and can even be impossible (if the target temperature is very close to the ambient the heating cycle pumps too much heat into the bed and the temperature never settles since the PID is tuned for much higher temperatures). So, I'm left with just waiting a set period of time, which has worked out well enough.
So, I still think the G4 command could be relevant to this plugin (if only because it would solve a similar problem in a similar way). However, I guess there is also a different way to fix my current task: if the plugin supported an extension to the wait for temp command that didn't involve activating the heater.
Basically, I'm trying to simulate M190 R28 but without activating the heater. Perhaps something like M190 Q28 would mean "cool down until you reach this temperature, don't heat".
Should this support the G4 wait command as well?
This blocking call also stops cancelling from happening, and stops polling of temperatures (at least on my model printer). For example I have to implement long waits in this way:
So that I can cancel and get feedback. If the G4 command could be processed locally, then the printer would continue to be responsive during the period.