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

TrnGetScaleStr

Gets the scale of the trend tag being plotted by a specified pen. The value is returned as a formatted string using the pen's format specification and (optionally) the engineering units.

Syntax

TrnGetScaleStr(AN, Pen, Percent, EngUnits)

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.

EngUnits:

Engineering units mode:

0 - Do not include the engineering units at the end of the formatted string.

1 - Include the engineering units at the end of the formatted string.

Return Value

The scale of the trend tag being plotted by Pen (as a string). If AN or Pen is invalid, <na> is returned and an error code is set.

Related Functions

TrnGetScale

Example

! For the trend at AN20
DspText(31,0,TrnGetScaleStr(20,0,0,1));
/* Displays the zero scale of the focus pen. The scale displays as a formatted string (including the engineering units). */
DspText(32,0,TrnGetScaleStr(20,2,50,1));
/* Displays the 50% scale of Pen2. The scale displays as a formatted string (including the engineering units). */
DspText(33,0,TrnGetScaleStr(20,0,100,0));
/* Displays the full scale of the trend tag being plotted by the focus pen. The scale displays as a formatted string (excluding the engineering units). */

See Also

Trend Functions