Featured Post

Site Navigation is in the Left Column

Tuesday, August 17, 2021

Duty Cycle Programming Complete

The duty-cycle routines have been written and tested.  

Now, the relay library includes functions to turn the relays on and off as well as functions to control the duty cycle of the device controlled by the relay.

For instance, I do not want to have to constantly check and see if the compressor is being ran too much. With the duty cycle routines, I can program the duty cycle for 90 seconds on and 90 seconds off.  All the main routine needs to do is call for service. The relay will immediately turn on for 90 seconds, then turn off for 90 seconds.  If the main program is still calling for service, the relay will turn on for 90 more seconds.

The duty cycle is completely driven by event handlers and timers.  So the main loop does not need to check the duty cycle times or anything like that.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.