Cicode Programming Reference > Cicode Function Categories > Tag Functions > TagSetOverrideGood

TagSetOverrideGood

Sets a quality Override element for a specified tag to Good Non Specific.

Syntax

TagSetOverrideGood (STRING Tag [,INT Synch [, STRING ClusterName]])

Tag:

The variable tag name or the equipment and item name (using <equipment>.<item> notation) associated with that tag as a string. The name of the tag can be prefixed by the name of the cluster that is "ClusterName.Tag" or "ClusterName.Equipment.Item".

Note: If the tag name exceeds the length limit of 254 characters the hardware alarm "Tag name exceed length limit" will be raised.

Synch:

An optional boolean argument that specifies whether the command is synchronous (blocking) or asynchronous (non- blocking). If it is specified as synchronous (blocking) the function will wait until the write has completed and returned from the server before further code execution. This parameter is "False", or asynchronous, by default. If you specify this parameter the other parameters need to be explicitly specified.

ClusterName:

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

Return Value

0 (zero) if successful, otherwise an error code is returned.

Related Functions

TagSetOverrideQuality, TagSetOverrideBad, TagSetOverrideUncertain, TagSetOverrideBad, QualityIsOverride

Example

TagSetOverrideGood("Tag1");
 

Setting the value of the OverrideMode element to anything other than 3 will overwrite the quality that has been applied to the Override element using this function. See the example below and OverrideMode for more details.

 

//The OverrideMode is switched off
Tag1.OverrideMode = 0;
//The quality of Override element is set to Good
TagSetOverrideGood("Tag1");
//The OverrideMode is set to 1 and
//the Field element is copied to the Override element.
//The quality of the Override element is overwritten.
Tag1.OverrideMode = 1;
//The quality is set again to Good
TagSetOverrideGood("Tag1");

See Also

Tag Functions

Published June 2018