Quality-String format specification

A TwinCAT Quality string has the following structure: 'Q#vv|ORBSFDCA|s|TB'.

Variable

Representation

Value range

Description

Prefix

Q#

‘Q#‘

Constant prefix.

Validity

vv

‘00‘,‘01‘..‘11‘

Validity.

Overflow

O

'0'..'1'

Overflow.

OutOfRange

R

'0'..'1'

Not in permissible range.

BadReference

B

'0'..'1'

Incorrect reference.

Oscilatory

S

'0'..'1'

Oscillating.

Failure

F

'0'..'1'

Failure.

OldData

D

'0'..'1'

Data not up to date.

Inconsistent

C

'0'..'1'

Inconsistent.

Inaccurate

A

'0'..'1'

Inaccurate.

Source

s

'0'..'1'

Source (‘0‘:=process, ‘1‘:=replaced).

Test

T

'0'..'1'

Test.

OperatorBlocked

B

'0'..'1'

Operator blocked.

Coding of the Quality.Validity components:

Value

Validity0

Validity1

STRING(2)

Description

Good

0

0

‘00‘

Good (default value).

Invalid

0

1

‘01‘

Invalid.

Reserved

1

0

‘10‘

Reserved.

Questionable

1

1

‘11‘

Questionable.

Coding of the Quality.Source components:

Value

Source

STRING(1)

Description

Process

0

‘0‘

Value comes from the process (default value).

Substituted

1

‘1‘

Value was replaced.

Samples

The table below contains strings and the values of the components after conversion to the structured type: ST_AcsiQuality.

STRING(18)

ST_AcsiQuality

Description

'Q#00|00000000|0|00'

STRUCT(0)

All components have the value: 0.

'Q#01|00000000|1|10'

STRUCT(Validity0:=0, Validity1:=1, Source:=1, Test:=1)

Validity: Invalid. Source: Replaced.Test is set. All other components have the value: 0.

'Q#11|11000001|0|01'

STRUCT(Validity0:=1, Validity1:=1, Overflow:=1, OutOfRange:=1, Inaccurate:=1, OperatorBlocked:=1)

Validity: Questionable.Overflow, OutOfRange, Inaccurate and OperatorBlocked are set. All other components have the value: 0.