Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

PageTask

  • Last UpdatedJul 18, 2023
  • 1 minute read

PageTask() is used for running preliminary Cicode before displaying a page in a window. It makes it possible for the same Cicode to be run if the page is re-entered by navigating forward or back. PageTask() is similar to TaskNew().

PageTask() returns a handle to a code task the first time it is run. The custom Cicode of the sFunctionName parameter needs to call PageDisplay() in order to display the page. When the page changes, the function and its parameters will be pushed onto the Page Navigation History. The Cicode fnTask will be called again when the page is navigated to using the PageForward or PageBack functions.

Syntax

PageTask(iWinNum, sFunctionName, sFunctionArg)

iWinNum:

The Window number of the window in which to display the page.

sFunctionName:

String representing the Cicode function to run each time the page is navigated to using the forward and backward navigation functions.

sFunctionArg:

String representing the parameters to use with function fnTask.

Return Value

A handle to a code task the first time it is run. BAD_HANDLE (-1) if the function did not complete.

PageDisplay, PageBack, PageForward

Example

FUNCTION DisplayAlarmLog()

PageTask(WinNumber(), "_DisplayAlarmLog", "");

END

FUNCTION _DisplayAlarmLog()

PageFile("[Data]:AlarmLog.Txt");

DspFile(21,DspFont("Courier",-10,Black,Transparent),24,120);

WinTitle("@(Alarm History)");

END

See Also

Page Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in