hello everyone, I'm trying to set the system clock on my plc for daylight savings time so the operator does not need to adjust himself twice a year as I have specific events that happen according to the time of the day, please see attached PDF, this part was done in ST, so far I'm only concerned with the section for novemeber that takes an hour off system time my variables are as follows
RTC_HOUR : 2 digit hour on a 24 hour clock, this can also be adjusted on the hmi
Next_Daylight_novmeber; this is here to prevent a continuous loop by adding a year to the current year then testing again at the beginning of the loop
UNLOCKED : sets %S50 true and false, set to true to adjust the time then back to false to read the current time again
the loops and dates worked as they should and it takes an hour off the system time but for some reason after clearing that specific section the time will change back forward an hour, I have added a debug to the march spring forward a hour and it doesn't even start the loop, there are no other inputs to system time other then on the hmi, that being said the unlocked or %s50 is always kept false unless the operator brings up the keypad which isn't happening
hoping someone can help me out or maybe steer me in a better direction for this
RTC_HOUR : 2 digit hour on a 24 hour clock, this can also be adjusted on the hmi
Next_Daylight_novmeber; this is here to prevent a continuous loop by adding a year to the current year then testing again at the beginning of the loop
UNLOCKED : sets %S50 true and false, set to true to adjust the time then back to false to read the current time again
the loops and dates worked as they should and it takes an hour off the system time but for some reason after clearing that specific section the time will change back forward an hour, I have added a debug to the march spring forward a hour and it doesn't even start the loop, there are no other inputs to system time other then on the hmi, that being said the unlocked or %s50 is always kept false unless the operator brings up the keypad which isn't happening
hoping someone can help me out or maybe steer me in a better direction for this