The QUALITY data type is a new data type in Cicode which incorporates the CitectSCADA quality. The QUALITY data type and the Cicode quality labels can be used in Cicode expressions.
The operators allowed for the QUALITY data type are:
The assignment operation also allows for the QUALITY data type.
q1 = q2;
q1 = Tag1.Field.Q;
//the following expression will generate a compiler error as a tag //element can be modified only as a whole
Tag1.Field.Q = q1;
A set of Cicode functions are provided which allow quality fields to be initialized, a specific quality field to be extracted, and other operations on the QUALITY data type. Conversion between the QUALITY data type and other Cicode data types is not allowed. Direct conversion from Quality to string will return an empty string.
//this will generate a compiler error
INT n = Tag1.Q;