I have a few projects that run 24/7 , i am having a difficulty with the Timer clearing after 24h ..
I rely on the Timer to make a minimum delay before calling different tasks ..
Better suggestions ?
Code: Select all
' All variables Single
StartS = Timer
Do
If Timer < StartS then ' Here the day change should be detected
Call ResetTimers
StartS = Timer
End if
If Timer - Time1S > 0.2 then ' Do something every 200ms
Call Read165
Time1S = Timer
End if
If Timer - Time2S > 1.0 then ' Do something every 1000ms
Call Write595
Time2S = Timer
End if
Loop ' Main loop
Sub ResetTimers()
Time1S = Timer
Time2S = Timer
End Sub