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

QualityCreate

Creates a quality value based on the quality fields provided. When the value of a particular quality field is out of range, the value of its corresponding part in the returned quality remains at 0, and hardware error is generated.

Syntax

QualityCreate(INT generalQuality [, INT qualitySubstatus [, INT qualityLimit [, INT extendedSubstatus [, INT bOverride [, bControlInhibit [, INT datasourceErrorCode ]]]]]] )

generalQuality:

Specifies the general quality.

qualitySubstatus:

Specifies the quality substatus.

qualityLimit:

TheQuality Limit.

extendedSubstatus:

Specifies the extended quality substatus.

bOverride:

Specifies the Tag Status Override Flag.

bControlInhibit:

Specifies the Tag Status Control Inhibit Flag.

datasourceErrorCode:

Specifies the data source error code.

For further information on the quality arguments listed above, refer to the Tag Extensions documentation in the main help.

Return Value

The Quality value of the element.

Related Functions

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

Example

QUALITY q1;
q1 = QualityCreate(QUAL_BAD, QUAL_BAD_NON_SPECIFIC, QUAL_LIMITED_HIGH, QUAL_EXT_NOT_REPLICATED);

See Also

Quality Functions