View Single Post
Old March 15th, 2019, 05:41 PM   #1
Skidood
Member
Canada

Skidood is offline
 
Join Date: Oct 2016
Location: Ontario
Posts: 160
recover operation after power failure based on elapsed time

Hi group,

I am trying to figure out how to calculate time elapsed during a power failure. If the PLC is off for more than 30 minutes, when the power is restored I want to enable a bit. If the power is off for less than 30 minutes, the bit is left alone.

I believe I previously saw a logic example where the amount of time that has passed since the beginning of the year is constantly stored, and then upon power restoration, the current time/day is compared to that somehow but that strategy seems a bit wonky.
I know that I will be working with the First Pass bit.
I can also tell you that my program already writes the current day, hour, minute and second to their own integer files 4 times per second.

Any takers?
  Reply With Quote