hi richard , the main clock cant be stopped and needs to be a running test
the rollover from sec to mins is the issue as well as mins to hours
with the Set_Day= 0, Set_Hour= 0 ,Set_min= 0, Set_sec = 10
this code has that issue of when the clock roles over
the OT variables are used to display the OT clock
Days, Hours, Mins,Secs variables are the main clock
"Set_" varables are the time allowed
the OT clock is only enabled after the Set time is = > than the main clock
Code:
if OT_Days => Set_Day and OT_Hours => Set_Hour and OT_Minutes => Set_Min and OT_Seconds => Set_OT_Sec then OT_Enable = 1
if OT_Enable = 1 THEN
if Days > Set_Day then OT_Days = Days - Set_Day
if Hours > Set_Hour then OT_Hours = Hours - Set_Hour
if Minutes > Set_Min then OT_Minutes = Minutes - Set_Min
if Seconds > Set_Sec then OT_Seconds = Seconds - Set_Sec
endif
Bookmarks