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

AVEVA™ Plant SCADA

TrnGetSpan

  • Last UpdatedJul 18, 2023
  • 1 minute read

Gets the span time of a trend (if the span was set by the TrnSetSpan() function). The span time is the total time displayed in the trend window.

Note: If you call the TrnSetPeriod() function after the TrnSetSpan() function, the span is automatically set to 0 (zero).

Syntax

TrnGetSpan(nAN)

nAN:

The AN of the chosen trend.

Return Value

The span time, in seconds. 0(zero) is returned if the AN is invalid or if the span was not set by the TrnSetSpan() function.

TrnSetSpan, TrnGetPeriod, TrnSetPeriod

Example

// Use a keyboard command or button to set a span of 2 hours.

TrnSetSpan(40,StrToTime("2:00:00");

// Then use TrnGetSpan function to display the span

Time = TrnGetSpan(40)

DspText(31,0,TimeToStr(Time,5));

See Also

Trend Functions

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