Cicode Programming Reference > Cicode Function Categories > Trend Functions Introduction > TrnGetMode

TrnGetMode

Gets the mode (real-time or historical trending) of the trend pen.

Syntax

TrnGetMode(AN, Pen)

AN:

The AN of the chosen trend.

Pen:

The trend pen number:

0 - The pen currently in focus

1...8 - Pen1. . .Pen8

Return Value

The current mode, 0 for real-time or 1 for historical.

Related Functions

TrnScroll

Example

! For the trend at AN20
INT Mode;
Mode=TrnGetMode(20,0);
! Gets the current mode of the pen in focus.
IF Mode=0 THEN
DspText(31,0,"Real Time Trending");
ELSE
DspText(31,0,"Historical Trending");
END

See Also

Trend Functions