QualityBits Type

The QualityBits type is a collection of boolean values representing the quality bits as returned when reading property values. For further reference, see the following table.

 

Enum value

Bit

Description

None

0

Variable active/inactive

DefaultValueSetExplicitly

1

Default value set explicitly

DefaultValueSetAutomatically

2

Default value set automatically

ValueRangeViolated

3

WinCC OA value range violated

OutOfRangeValue

4

Value of the variable "out of range"

ExplicitInvalid

5

Explicit invalid

InvalidSetByInterfaceDriver

6

Invalid set by an interface driver

DriverFailed

7

Driver failed

DefaultValueInvalid

8

Default value invalid

SetDuringGeneralQuery

9

Set during general query

SetDuringIndividualQuery

10

Set during an individual query

InterfaceDriverActive

11

Interface driver active

ValueCorrected

12

Value corrected

ValueCondensedOrCompressed

13

Value condensed or compressed, used (HDB & RAIMA) with archiving/compression.

CorrectedValueCondensed

14

Corrected value condensed

AdditionalCorrectionValue

15

Additional correction value

CompressedValueInvalid

16

Compressed value invalid

SourceTimeInvalid

17

Source time invalid (corrected by the Event Manager)

DisableLastValueStorage

19

Disable last value storage

ValueChanged

20

Value changed

ValueUp

21

Value up (or set to same value)

DriverOutOfService

32

Driver out of service

DriverAlarm

33

Driver alarm

DriverFault

34

Driver fault

DriverOverriden

35

Driver overridden

DriverSubscribed

36

Driver subscribed

DriverPropertyInvalid

37

Driver property invalid

TrendTimeShift

40

Trend time shift

TrendLogEnabled

41

Trend log enabled

TrendError

42

Trend error

TrendPurge

43

Trend purge

TrendRollover

44

Trend rollover

TrendValueIsStatus

45

Trend value is status

TrendLogInterrupted

46

Trend log interrupted

TrendStartLogging

48

Trend starts logging

TrendValueReduced

49

Trend value reduced

Priority1

50

Priority 1 (0 bit; 2^0)

Priority2

51

Priority 2 (1 bit; 2^1)

Prority4

52

Priority 4 (2 bit; 2^2)

It is possible to retrieve a specific element by specifying its index in square brackets and obtain the number of elements in the collection with the method length. It is also possible to obtain the corresponding array with the method toArray.

Examples of Use

 

var propertyValue = read("System1.ApplicationView:ApplicationView.Logics.VirtualObjects.Analog01", "Value");

 

var quality = propertyValue.value.quality;

console("Quality = {0}", quality)

console("Quality bits count = {0}", quality.length)

for (var i = 0; i < quality.length; i++)

{

    console("bit {0} = {1}", i, quality[i]);

}