Applies To:
  • CitectSCADA 1.xx, 2.xx, 3.xx, 4.xx, 5.xx

I want to perform some tests on my system for different dates and times, which will involve changing the system clock by large amounts of time (e.g. to perform some Year 2000 tests). How should I go about this? 

Citect has been designed to provide the best performance when operating under the conditions typical to any control system. This has involved some trade-offs between performance and functionality. The result is that Citect can behave "strangely" when the system clock is altered by large amounts while Citect is running; time-based events and trends may not function correctly. A "large amount" would be a time span of one hour or more, however this may vary from project to project.

Although changing the system time by large amounts is something you might do when testing a project (e.g. for the year 2000), it is not something that would be done in normal day-to-day operation.

Citect will allow the clock to be changed by any amount using either the TimeSet() function or the Windows Control Panel, and it will continue functioning. However, after the time is set ahead Citect must re-calculate any event which is scheduled for a certain time or duration. This includes re-calculating the execution time for all reports, events, logs, etc., with any buffered date (such as trends) being flushed to disk. This operation can take a significant amount of time and can degrade the performance of your system.

Setting the system time back will have a similar effect, with Citect attempting to write logs or trends for times that have already occurred, the possible end result being incorrect data in history files or lost data.

The recommended way to avoid this is to shut Citect down and then make the changes to the system date and time before restarting. If you do need to alter the system clock by large amounts for testing your system, make sure that backups of all data files are kept, and replace the corrupted data files with the backups after the tests are completed.