TrnSetSpan
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(AN, Span)
AN:
The AN of the chosen trend.
Span:
The span time (in seconds).
Return Value
0 (zero) if successful, otherwise an error is returned.
Related Functions
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