A cyclic timer program with input dependent condition

This has confused me. Please confirm:

  • One input can immediately stop the cyclic timer and take the relay to OFF.

  • The other input will stop the cyclic timer and take the relay to ON, but the relay will not go to the ON condition until it would have anyway due to the cyclic timing. Then it stays on as long as the second input is unchanged.

The asymmetry of these requirements is confusing. It would help everyone, well me least, if you explained why you need it to be just this way, or correct any mistakes I have made interpreting your prose.

Perhaps a more careful description of the desired functions. And you could draw a timing diagram.

It doesn't seem like you ever care about the transition of the inputs, only their level. It still means you need debouncing, but you do not (seem) to need edge detection.

Do you care that with the button that can stop and take the relay OFF immediately you can end up with very short ON period?

When the cyclic behaviour resumes, where in the ON and OFF cycle should it restart at, for each input when the input is changed to free the cyclic timer?

a7