-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
heaters: drop control delay #6706
base: master
Are you sure you want to change the base?
Conversation
02261b9
to
466345f
Compare
Thank you for your contribution to Klipper. Unfortunately, a reviewer has not assigned themselves to this GitHub Pull Request. All Pull Requests are reviewed before merging, and a reviewer will need to volunteer. Further information is available at: https://www.klipper3d.org/CONTRIBUTING.html There are some steps that you can take now:
Unfortunately, if a reviewer does not assign themselves to this GitHub Pull Request then it will be automatically closed. If this happens, then it is a good idea to move further discussion to the Klipper Discourse server. Reviewers can reach out on that forum to let you know if they are interested and when they are available. Best regards, PS: I'm just an automated script, not a human being. |
Thanks. For what it is worth though, I'm not sure this is a good idea. In particular, I'm not sure the safety checks would work the same way they do now. (For example, consider the case where the host has frozen or delayed but has some messages queued up for transmit.) I guess the main question I would have is - how do we measure an improvement from a change like this? What kind of tests can be run to demonstrate the real-world benefits of it? Cheers, |
I understand safety concerns with heaters, so there I tried to not break important one - timeout.
Rereaded the code and I agree there are hypothetical situations where we have a lot of updates in the queue (up to 5/0.3 ~ 16), Current clock requirements will force all those messages to "decay". However, the initial intention was to reduce apply latency.
There is no rush or pressure from my side, I try to fix an issue that is not even mine. There are users with strange extruder heaters and as a consequence, strange behavior of PID regulation. I think PID itself is totally fine. So, only heater/thermistor/mass/loop time can be an issue. I can do a test setup with a small thermal mass heater, and thermistor and check if it is more stable. But it will be just a spherical cow in a vacuum. A perfect test will be to get results from a users with unstable pid/temperature and check if it goes better - like if fix is in the right direction. I only heard of strange things (I talk about 1-2 degree swings) on:
So, this is a target audience and I think this is who actually can give usable feedback, like magnified graph of before and after or graphs from log file (or just log file), or we can even apply some analysis to check if it is more "stable". Such degree swings, I think will be only important for materials with temperature-dependent properties (filaflex foam or LW-PLA what I know). For everything else, this is just a graph cosmetical issue. Thanks
|
cd16736
to
617aa28
Compare
Heaters control is reactive, the faster we apply new PWM - the better. Add command to directly apply PWM as fast as it arrives. Signed-off-by: Timofey Titovets <[email protected]>
617aa28
to
db91f1e
Compare
Heaters control is reactive, the faster we apply new PWM - the faster we will see a response.
Add command to directly apply PWM as fast as it arrives.
As a bonus, we relaxed time constraints,
Timer Too Close
should happen "never".As a safety check, we still have
Missed scheduling of next digital out event
.This code is mostly related to this topic/comment: https://klipper.discourse.group/t/remove-the-300ms-heater-control-delay/17771/11
I'm not sure about the right value for- is the right onereqclock
. If I understood the code correctly thereqclock=0
command should be sent in the next batch.This is more like a simple and safe solution because we just avoid timer calculation on the host.
I think the proper way to do this for heaters is to make another timer function and update fields
on_duration, off_duration, end_time
on each command arrival.In addition, if we want to remove the 5-second limit, cycles counter can be used there, which will be decremented on each cycle, and then there will be no dependence on timer resolution.
Thanks.