Cicode Programming Reference > Cicode Function Categories > Tag Functions Introduction > 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.


TagScaleStr(sTag, Percent [, EngUnits] )


The name of the tag.


The percentage of full scale of the returned value.


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


// 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