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

TrnGetCursorValueStr

Gets the value at a trend cursor for a specified pen. The value is returned as a formatted string using the pen's format specification and (optionally) the engineering units.

Syntax

TrnGetCursorValueStr(AN, Pen, EngUnits)

AN:

The AN where the trend is located.

Pen:

The trend pen number:

0 - The pen currently in focus

1...8 - Pen1. . .Pen8

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 trend value (as a string). If trend data is invalid, or an argument passed to the function is invalid "<na>" is returned. If the actual value is gated (not triggered) "<gated>" is returned. If the trend cursor is disabled, an empty string is returned.

Related Functions

TrnGetCursorValue

Example

! For the trend at AN20
DspText(31,0,TrnGetCursorValueStr(20,0,1));
/* Displays the value at the trend cursor for the focus pen. The value will display as a formatted string (including the engineering units).*/

See Also

Trend Functions