Cicode Programming Reference > Cicode Function Categories > Page Functions Introduction > PageTrend

PageTrend

Displays a trend page with the specified trend pens. Use this function to display trends in a single cluster system with a single trend page. You need to create the trend page with the Graphics Builder and set the pen names to blank. Then display that page by calling this function and passing the required trend tags. Call this function from a menu of trend pages.

Note: Because you cannot mix templates in a project, PageTrend will not work if you have included the CSV_Include project in your project. For example, if your project includes the CSV_Include project, PageTrend("pagename", "trendtag") only works on trend pages based on XP-style templates (that is, "Trend"). When using PageTrend to go to a page based on a standard template (for example, "SingleTrend"), the page displays, but no trend tag is added. This also applies for the CSV_Trend_Page function.

This function is not supported in the server process in a multiprocessor environment. Calling this function from the server process results in a hardware alarm being raised. For a multi-cluster system use PageTrendEx.

Syntax

PageTrend(sPage, sTag1 [, sTag2..sTag8] )

sPage:

Name of the trend page (drawn with the Graphics Builder).

sTag1:

The first trend tag to display on the page.

sTag2..sTag8:

Optionally trend tags 2 to 8 to display on the page.

Return Value

0 (zero) if successful, otherwise an error is returned.

Note: Before CitectSCADA version 5.0, page records could be edited in the Project Editor. One of the fields available for configuration was "Page Number". The value entered for a page could then be used in runtime with the Page Cicode functions such as PageDisplay(), PageGoto(), and PageInfo(1).
For example, PageDisplay("1") can be used to display the page that has "1" (without the quotes) set in the Page Number field. PageInfo(1) returns the Page Number of the current page.
From version 5.0 on, this feature is only backwards-supported. The "Alias" field in the project Pages.DBF file still contains the Page Numbers from upgraded projects; however, the Pages database records are no longer available for direct editing in CitectSCADA.

Related Functions

TrnNew, TrnSelect, TrendWin, TrendPopUp, PageTrendEx

Example

Buttons

Text

Process Trend

Command

PageTrend("MyTrend", "PV1", "PV2", "PV3")

Comment

Display the trend page with three trend pens

PageTrend("MyTrend", "PV1", "PV2", "PV3")
/* Display three trend tags on a single trend page. */

See Also

Page Functions