View Single Post
Old March 15th, 2019, 08:40 PM   #8
Skidood
Member
Canada

Skidood is offline
 
Join Date: Oct 2016
Location: Ontario
Posts: 162
OK here is what I will try.
PLC writes a zero to N7:0 every night at 00:00 and adds 1 to N7:0 once per minute.
It already continually stores current RTC year, month, hour, minute and seconds to integers.

ON power up:
-if current day, month, or year is greater than the last stored day, month, or year respectively, set the 'abort" bit.
- if hour difference is >1, set abort bit
- if hour difference is LEQ 1, THEN:

Multiply current hour of day by 60 and send to N7:1
Add current minutes to N7:1
If N7:1 exceeds N7:0 by more than 30, set the abort bit.
  Reply With Quote