Applies To:
  • CitectSCADA 3.40 Service Pack H, 4.20 Service Pack H, 5.00

Summary:
I display the TrendStats Window using the pre-configured button on the Single Trend Template. The window displays and my trend pen names are there but no statistical data appears for a long time. How can I get data to appear immediately?  

Solution:
CIT has confirmed this to be a problem in Citect for Windows versions 3.40 to 5.00.

The Cicode generating these displayed values is waiting for a length of time (in fact the current display period) before completing. So for example if your trend tags are configured with a period of 10 minutes then by default the display period will also be 10 minutes, and it will take this long from when you first display the Trend Stat window before any data is returned. This will only occur the first time you display the Stats window.

The solution is to either select a smaller display period on the Trend page before pushing the TrendStats button, or modifying some Cicode. To do the latter, open the Statpop.ci library in the Include project and make the following modifications.

  1. Remove the local declaration of fPeriod from the TrendPageData() function and define it globally at the start of the library instead. ie REAL grPeriod =3; (Data will display 3 seconds after opening the window)
  2. Replace each instance of fPeriod in the library with grPeriod.
  3. Modify the DspTrnData function by replacing the line

IF TimeCurrent() >= gTimeUpdate THEN

with

IF TimeCurrent() >= (gTimeUpdate - grPeriod) THEN

Note that even though data is now displayed, it will still only update at a rate specified by the current display period.

 

Keywords:
 

Attachments