Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Quality - property of object PmVar

Description:
Quality of the variable value. The values are identical with the stanndard quality values OPC DA.
Syntax:
Long Quality
Calling:
n = oData.Item("dat1").Quality
Values:
The value according to the OPC specification consists from three informations:
- Specifies whether the value is Bad (value <64), Uncertain (value >=64 and <192) or Good (value >=192).
- Specifies closer reason (see the table).
- Specifies the relation to the limits: If the value 0 is added to the table value, then the value is not limited. If 1 is added, then the value is on low limit, 2 on high limit and 3 means that the value is constant and cannot be changed.
 
The following data correspond to the recommended values according to the OPC specification:
 
0 (&h0) - Bad: Non-specific - Bad value with unspecified reason.
4 (&h4) - Bad: Configuration Error - There is some server specific problem with the configuration. For example the item has been deleted from the configuration.
8 (&h8) - Bad: Not Connected - The input is required to be logically connected but it isn't.
12 (&hC) - Bad: Device Failure - A device failure has been detected.
16 (&h10) - Bad: Sensor Failure - A sensor failure had been detected.
20 (&h14) - Bad: Last Known Value - Communication has failed. However, the last known value is available. The 'age' of the value may be determined from the TimeStamp.
24 (&h18) - Bad: Comm Failure - Communication has failed. There isn't the last known value available.
28 (&h1C) - Bad: Out of Service - The block is off the scan or otherwise locked.
32 (&h20) - Bad: Waiting for Initial Data - Wrong value. The value has not been read from the communication so far, or the opposite side does not have the correct initial value.
 
64 (&h40) - Uncertain: Non-specific - There is no specific reason why the value is uncertain.
68 (&h44) - Uncertain: Last Usable Value - The returned value is to be considered as inaccurate due to interrupted data reading. Value is to be considered as old. The age of the value may be determined from TimeStamp.
80 (&h50) - Uncertain: Sensor Not Accurate - The sensor is out of the calibration.
84 (&h54) - Uncertain: Engineering Units Exceeded - The value is outside the limits defined for this parameter.
88 (&h58) - Uncertain: Sub-Normal - The value is derived from multiple sources and has less than the required number of Good sources.
 
192 (&hC0) - Good: Non-specific - The value is good. There are no special conditions.
216 (&hD8) - Good: Local Override - The value has been Overridden. Typically this means that the input has been disconnected and a manually entered value has been 'forced'.
Note:
Property access for read and write. The value of this property can be also obtained in the INFO system in "PmaRoot" item (when looking into the object with this property).
 
The quality of variable value in objects:
- In objects PmaOpcClientGroup and PmaCommGroup, the quality is filled in automatically when receiving the value from the communication. After starting the application, the quality is set to "32=Bad:WaitForInitialData". If the requested data will not reach the PmaCommGroup object, then the quality is set to "24=Bad:CommFailure".
- In the PmaData object, the quality is filled in automatically only if the variable has the ExtOpcClient data extension, or ExtComm and then, after starting the application the quality is set to "32=Bad:WaitForInitialData".

If this variable does not have the data extensions, then the quality is set to "192=Good:NonSpecific" after starting the application. The designer is then able to set the quality directly by writing into this property.

- In objects PmaTrendGroup and PmaCommMsg, the quality is not filled in automatically and after starting the application, the quality is set to "192=Good:NonSpecific". The designer is able to set teh quality directly by writing into this property, but for the purposes of trending or communication, this quality does not influence anything.
Example:
The value quality test of the "Power" variable
JavaScriptVBScriptSelect and copy to clipboard

if (pMe.Pm("/BoilerPlant/Data/#vars/Power").Quality >= 192)
//The value quality is OK (Good)

History:
Pm8.00.00: Created
PROMOTIC 9.0.7 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice