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


This function reads a property of a variable tag from the datasource. This function replaces TagInfo.


TagGetProperty(sName, sProperty [, iCached] [, ClusterName] )


The name of the tag from which to get information. The name of the tag can be prefixed by the name of the cluster that is "ClusterName.Tag".


The property to read. Property names are case sensitive. Supported properties are:

Address - Returns the configured address of the tag (as specified in the variable tags form).

ArraySize - Array size of the associated tag. Returns 1 for non-array types.

DataBitWidth - Number of bits used to store the value

Description - Tag description

EngUnitsHigh - Maximum scaled value

EngUnitsLow - Minimum scaled value

Format - Format bit string. The format information is stored in the integer as follows:

FormatDecPlaces - Number of decimal places for default format

FormatWidth - Number of characters used in default format

RangeHigh - Maximum unscaled value

RangeLow - Minimum unscaled value

Type - Type of tag. Allowed values are:

Units - Engineering Units for example, %, mm, Volts


Optional flag to attempt to retrieve the cached value for the property rather than the current value. This makes the function non-blocking. If the property has not yet been cached, an error is set.

0 - Do not force cached read. Cicode is blocking

1 - Force cached read. Cicode is non-blocking

Default value is 1 (true).


Specifies the name of the cluster in which the Tag resides. The argument is enclosed in quotation marks.

Return Value

String representation of the property of the tag. On error, an empty string and an error is set.

Related Functions

AssGetProperty, AssGetScale, AssInfo, AssScaleStr, TagGetScale, TagScaleStr, TagInfo


// Get the engineering full scale value for the variable "PV131"
EngFullScale = TagGetProperty("PV131", "EngUnitsHigh", 0);
// Get the cached array size for the array variable "PLC_Array"
ArrayLength = TagGetProperty("PLC_Array", "ArraySize", 1);

See Also

Tag Functions