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

AVEVA™ Plant SCADA

TrnSetSpan

  • Last UpdatedJul 18, 2023
  • 1 minute read

Sets the span time of a trend. The span time is the total time displayed in the trend window. You can set the period to contain fractions of a second. For example, if you set a trend with 240 samples to a span of 10 minutes, then each sample would be 2.5 seconds. Choose a span long enough to provide a sufficient sample rate to capture accurate real time data.

Syntax

TrnSetSpan(nAN, Span)

AN:

The AN of the chosen trend.

Span:

The span time (in seconds).

Return Value

0 (zero) if successful, otherwise an error code is returned.

TrnSetPeriod, TrnGetSpan, TrnSetSpan

Example

// 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