-
Notifications
You must be signed in to change notification settings - Fork 45
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
output status updated only every 250 ms #6
Comments
This is because the PID Loop itself is evaluated every 250mS. There is no reason to do the io any faster than the PID is dealing with them. |
Perhaps I should clarify. I was referring to the writing of the output to the relay using WriteToOutputCard() which is not an asynchronous process. As far as I can see WriteToOutputCard() needs to be called repeatedly during the cycle until it is time for the relay to go high or low. For that reason calling WriteToOutputCard() every 250 ms seems too infrequent. |
AH! that. is a legitimate point. sorry that I misunderstood. having separate input and output times instead of one ioTime is probably the way to go. |
Yes. Perhaps even do away with the output time altogether and call WriteToOutputCard in every iteration of the loop, because it is a high priority task and quick to execute. |
in osPID-Firmware.ino the output status is written to the relay only every 250ms. This seems excessively granular in a default cycle period of 5s. (line 175, 250 is added to ioTime, meaning that the output status will not be updated for another 250ms).
The text was updated successfully, but these errors were encountered: