helphelphelp
Member
Hello,
I'm trying to program a machine to reset a counter at midnight. I can do this no problem but I have a question about what will happen when the machine is powered off.
I currently have the counter set up to reset when the clock strikes midnight. When hour, minute and second are all 0, the counter resets. If the machine were to be powered off for some reason at the time the machine resets, unlikely but not impossible, the counter would then not be reset because it never sees the hour, minute and second hit 0.
Is there a way around this? Is there another condition I can add to reset the counter after powerup if it's a new day?
Thanks for the help!
Cheers
I'm trying to program a machine to reset a counter at midnight. I can do this no problem but I have a question about what will happen when the machine is powered off.
I currently have the counter set up to reset when the clock strikes midnight. When hour, minute and second are all 0, the counter resets. If the machine were to be powered off for some reason at the time the machine resets, unlikely but not impossible, the counter would then not be reset because it never sees the hour, minute and second hit 0.
Is there a way around this? Is there another condition I can add to reset the counter after powerup if it's a new day?
Thanks for the help!
Cheers