I searched for an example of how to adjust for daylight savings time, but I could not find one anywhere. So after considerable thought and time, I've got it figured out. I thought I would post it for anyone else who might be looking.
Hmmm...this is a new concept for me - could you print your file as a PDF so that those without RSLogix500 can benefit from your wisdom?I specifically avoided EQUALS statements so that if the machine wasn't powered up at that given moment, it wouldn't miss a change.
Yes, I see that, but my question is: "How do you keep your routine from adding MORE than 1 Hour (or subtracting MORE than 1 hour). It seems that each time it runs (and the DST date has rolled around) then it will think it needs to add or subtract from the real-time clock (when it may have just done that the day before).It will check every scan.
Are you saying that the ONS one-shot instructions will prevent double-adding or double-subtracting between machine runs (when the PLC is shut down then restarted more than 1 time)? Perhaps if the PLC is shut down but the program is not reloaded upon restarting, then it will retain the latched bits and the ONS bits.After the first Sunday in November, technically, it will latch in rung 9, and unlatch in rung 10 every scan, but the result will be the same in rung 11 and 12.
Are you saying that the ONS one-shot instructions will prevent double-adding or double-subtracting between machine runs (when the PLC is shut down then restarted more than 1 time)? Perhaps if the PLC is shut down but the program is not reloaded upon restarting, then it will retain the latched bits and the ONS bits.
MOD RTC_Year 4 Any_Integer
EQU Any_Integer 0 OTE Leap_Year_Bit
Sorry, I won't be able to make it. I will be dirt long before then.I'm planning on sitting in the plant on 12/31/2099 as it approaches 1/1/2100 to see if the PLC knows this too. Who's with me????