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

AVEVA™ Plant SCADA

TrnGetPenNo

  • Last UpdatedJul 18, 2023
  • 1 minute read

Gets the pen number of a pen name. The pens on a trend are either defined in the Page Trends database or set by the TrnSetPen() function.

Syntax

TrnGetPenNo(nAN, Tag)

AN:

The AN of the chosen trend.

Tag:

The trend tag.

Return Value

The pen number, or 0 (zero) if an error is detected.

TrnSetPen

Example

/* Assume that 8 trend fonts, Pen1TrendFont ... Pen8TrendFont are
defined in the Fonts database. The following code will display the
trend tag using the matching font for that pen. */

! For the trend at AN20

STRING sFont;

INT iPen;

iPen = TrnGetPenNo(20,"PV1");

IF 0 < iPen AND iPen < 9 THEN

sFont = "Pen" + IntToStr(iPen) + "TrendFont";

DspStr(31,sFont,"PV1");

END

See Also

Trend Functions

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