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

Summary:
Question: The time displayed on my pages does not always update every second. On some pages is updates every second and on other pages is updates every 2 or 3 seconds. What is causing this to occur? 

Solution:
In Citect the time on the page is treated the same as any other piece of information. Citect will update the page display when all the data has been returned from the PLC. This includes the time on the page. So if a page takes 2 seconds to read the data from the PLC then the time will be updated every two seconds.

If you must have the time updating every second you can create a new cicode background task which is started when the window is created which calls the cicode below. This cicode will display the time and then sleep for 1 second and keep displaying the time. This will update the time independent of the response time from the PLC.

FUNCTION
UpdateTime()
INT hFont;

   hFont = DspFontHnd("TimeFont");
   WHILE TRUE DO
      DspText(9, hFont, Time());
      Sleep(1);
   END
END

The animation update is also true of the alarm banners and the page title and name. These indicators are updated by a cicode function called _PageDefDisplay() in the file PAGE.CI in the INCLUDE database. If you have a look in this file you will see that this function is attached to event 10 which is called each time the page is updated. If you want all this information updated you may create a task which calls this function every second.

FUNCTION
UpdatePageInfo()
   WHILE TRUE DO
      _PageDefDisplay(); ! update time,date,alarm banners etc
      Sleep(1);
   END
END

 

Keywords:
 

Attachments