Applies To:
  • CitectSCADA 5.31, 5.40, 5.41, 5.42
  • CitectHMI 5.31, 5.40, 5.41, 5.42

The trend stats popup does not use the currently selected condense or stretch mode when calculating the minimum, maximum, average, and standard deviation values. If you have spikes in the trend and are displaying a long period of time, the condense mode has a large effect on the min and max values. 

When you open the stats popup it starts a task that reads the trend data and performs the calculations on it. Unfortunately, in CitectSCADA version 5.31 to 5.42 it uses the default display mode instead of the current user-selected display mode when reading the data. This has been fixed in Citect 5.50. In 5.31 to 5.42 it is necessary to modify a Cicode function in the Include project to correct this.

Note: Modifying the Include project is not recommended unless it is necessary. Installing CitectSCADA service packs or releases may overwrite the Include project files, so it will be necessary to redo any changes. The Include project is not backed up when you back up your project. Please make a copy of any files that you modify in case the changes do not work as expected.

1. Open c:\citect\user\include\

2. Search for the function TrendPageData()

3. Add this line to the declarations at the beginning of the TrendPageData() function:

INT DisplayMode;

4. Replace this line:


...with these lines:

DisplayMode = (TrnGetDisplayMode(hAN, iPen) BITAND 0x18C) + 1;

5. Re-compile your project so changes to the Include project take effect.

Citect has confirmed this to be a problem in CitectHMI/SCADA version 5.31 to 5.42. This problem has been fixed in version 5.50.