Cicode Programming Reference > Cicode Function Categories > Quality Functions Introduction > QualitySetPart

QualitySetPart

Sets a Quality part’s value to the QUALITY variable.

Syntax

QualitySetPart(QUALITY quality, INT part, LONG value)

quality:

Specifies the quality variable.

part:

The part to extract:

0 – The General Quality value

1 – Quality Substatus value

2 - The Quality Limit value

3 - The Extended Quality Substatus value

4 – The Tag Status Override flag

5 – The Tag Status Control Inhibit flag

6 - The DataSource error code

7 – The OPC Quality (General + Substatus + Limit)

value:  

The new value for the given part.

Return Value

The modified Quality value, or the original value if the given part is not applicable.

Related Functions

QualityGetPart, QualityIsBad, QualityIsContolInhibit, QualityIsGood, QualityIsOverride, QualityIsUncertain, QualityToStr, QualityCreate

Example

QUALITY quality;
LONG qualityGeneral;
// insert code here
quality = QualitySetPart(quality, 0, qualityGeneral);

See Also

Quality Functions