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

AVEVA™ Plant SCADA

TrnGetBufValue

  • Last UpdatedJul 18, 2023
  • 1 minute read

Gets the value of a trend at an offset for a specified pen. The offset should be a value between -1 and the number of samples displayed on the trend.

Syntax

TrnGetBufValue(nAN, Pen, Offset)

nAN:

The AN where the trend is located.

Pen:

The trend pen number:

0 - The pen currently in focus

1...8 - Pen1. . .Pen8

Offset:

The trend buffer offset, in samples. The number of samples can range from -1 to the maximum number of samples that can display on the trend minus 1.

-1 means get the last valid value in the display (provided it is less than 1.5 sample periods old).

If there is no invalid or gated sample within the last 1.5 sample periods, it is assumed that a sample has been missed and an invalid trend value is returned. See the TrnIsValidValue function.

Return Value

The trend value. If the actual value is gated or invalid, the standard invalid or gated values are returned (no error is set). You can check this return value using TrnIsValidValue().

TrnGetCursorValue, TrnIsValidValue

Example

! For the trend at AN20

DspText(31,0,TrnGetBufValue(20,0,10):###.#);

/* Displays the trend value at offset 10 for the pen currently in
focus. */

See Also

Trend Functions

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