Cicode Programming Reference > Cicode Function Categories > Trend Functions Introduction > TrnGetScale

TrnGetScale

Gets the display scale of the trend tag being plotted by a specified pen.

Syntax

TrnGetScale(AN, Pen, Percent)

AN:

The AN of the chosen trend.

Pen:

The trend pen number:

0 - The pen currently in focus

1...8 - Pen1. . .Pen8

Percent:

The percentage of the full scale, from 0 to 100.

Return Value

The scale of the trend tag being plotted by Pen. If AN or Pen is invalid, 0 (zero) is returned and an error code is set.

Related Functions

TrnSetScale, TrnGetDefScale

Example

! For the trend at AN20
DspText(31,0,TrnGetScale(20,0,0));
! Displays the zero scale of the focus pen.
DspText(32,0,TrnGetScale(20,0,50));
! Displays the 50% scale of the focus pen.
DspText(33,0,TrnGetScale(20,0,100));
! Displays the full scale of the focus pen.

See Also

Trend Functions