Cicode Programming Reference > Cicode Function Categories > Tag Functions Introduction > TagScaleStr

TagScaleStr

Gets the value of a tag at a specified scale. The value is returned as a formatted string using the tags format specification and (optionally) the engineering units. Use this function to write generic Cicode that will work with any type of tag.

Note: This function is being deprecated and is replaced by the TagGetScale function. If the Tag properties are updated TagScaleStr does not get the updated values whereas TagGetScale does.

Syntax

TagScaleStr(sTag, Percent [, EngUnits] )

sTag:

The name of the tag.

Percent:

The percentage of full scale of the returned value.

EngUnits:

Optional flag to determine if the value is returned with engineering units:

0 - Do not return the value with engineering units

1 - Return the value with engineering units

Return Value

The scale of the tag (as a string).

Related Functions

AssGetProperty, AssGetScale, AssInfo, AssScaleStr, TagGetProperty, TagGetScale, TagInfo

Example

// Display the zero, 50% and full scale of the tag CV_123_PV
DspText(31,0,TagScaleStr("CV_123_PV", 0, 1));
DspText(32,0,TagScaleStr("CV_123_PV", 50, 1));
DspText(33,0,TagScaleStr("CV_123_PV", 100, 1));

See Also

Tag Functions