AssGetProperty
This function gets association information about the current Super Genie from the datasource (that is information about a variable tag that has been substituted into the Super Genie). You can only call this function on a Super Genie after the associations are completed.
Use this function to display association information as part of the Super Genie. For example, if you have a Super Genie that is a loop controller, you could display the name of the loop at the top of the loop controller box. Each time the Super Genie is used with different associations (specifically a different tag name association) the correct loop name will be displayed.
If a constant value is associated, then only the constant value can be retrieved through the TagName property. The remaining properties are not valid.
This function replaces AssInfo.
Syntax
AssGetProperty(iArg, sProperty [, iCached] )
iArg:
The argument number or name of the association from which to get information.
sProperty:
The property to read. Property names are case sensitive. Supported properties are:
Address - The configured address of the associated tag (as specified in the variable tags form)
ArraySize - Array size of the associated tag. Returns 1 for non-array types
AssFullName - Full name of the association tag in the form cluster.tagname even if the tag is not resolved
ClusterName - Name of the cluster the associated tag resides on.
DataBitWidth - Number of bits used to store the value
Description - Description of the associated tag
EngUnitsHigh - Maximum scaled value
EngUnitsLow - Minimum scaled value
Format - Format bit string. The format information is stored in the integer as follows:
ErrorValUsed - Returns 1 if the defined error value was used for the SuperGenie association. This means that tag name is invalid/unresolved or the substitutions are not complete. This is only relevant for named SuperGenies. 0 is returned if the association string provided a value, or a default value was not defined.
FormatDecPlaces - Number of decimal places for default format
FormatWidth - Number of characters used in default format
FullName - Full name of the association tag in the form cluster.tagname If the association tag is not resolved, returns an empty string.
Literal - Returns 1 if the substitution is a literal value, returns 0 if the substitution is a tag name.
RangeHigh - Maximum unscaled value
RangeLow - Minimum unscaled value
TagName - Name of the tag for the specified association
Type - Raw type of associated tag
Units - Engineering Units for example, %, mm, Volts
iCached:
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)
Return Value
String representation of the property of the association. On detection of an error, an empty string and an error are set.
Related Functions
Ass, AssChain, AssMetadata, AssMetadataPage, AssMetadataPopup, AssMetadataWin, AssChainPage, AssChainPopUp, AssChainWin, AssChainWinFree, AssGetScale, AssInfo, AssInfoEx, AssPage, AssPopUp, AssScaleStr, AssTag, AssTitle, AssVarTags, AssWin, TagGetProperty, TagGetScale, TagScaleStr, TagInfo
Example
//Using a string identifier for the substitution parameter
AssGetProperty("MILK_LEVEL", "TagName", 0);
// Get the engineering full scale value for the 2nd
// argument of the association of the current Super Genie
EngFullScale = AssGetProperty(2, "EngUnitsHigh", 0);
// Get the cached engineering units for the 3rd argument
// of the association of the current Super Genie
MeasureUnits = AssGetProperty(3, "Units", 1);
See Also