Applies To:
  • CitectSCADA 1.00, 1.01, 1.10, 1.11, 1.20, 2.00, 2.01

Summary:
Question: What happpens when the millisecond counter returned from SysTime wraps around to 0. 

Solution:
The millisecond counter returned from SysTime() will wrap around to 0 after Windows has been running for 49 days. As Cicode integers are 32 bit numbers, this causes no problems - because you should only compare or subract two system time variables. When you compare (or subtract two variables) and one of them crosses 0, the correct result is still returned.

The only problem you could encounter is if you want to time some event over a period greater than 49 days (i.e the event goes on now and off at say 60 days). In this case the time period would be incorrect. You can time any event that is less than 49 days with SysTime. For example, if an event is on in 20 days and off in 60 days (so total time is only 40 days). If you want to time an event over a period greater than 49 days, use the TimeCurrent() function. 


Keywords:
 

Attachments