Wrong quality returned when using the ABBProperty interface
Why does the ABBProperty interface return wrong quality?
The interface ABBProperty of the aspect automation interface has two properties value and quality. The value property contains the value of the 800xA property, but the quality property is always 128, though quality of the 800xA property is ok (192). The method IsQualityOk, IsQualityUncertain and IsQualityBad return false, the method IsQualityNotYetReceived returns true.
Example: Read quality of a the 800xA property Value in a scripting aspect: object.properties("Value").Quality
The interface ABBProperty of the aspect automation interface has two properties value and quality. The value property contains the value of the 800xA property, but the quality property is always 128, though quality of the 800xA property is ok (192). The method IsQualityOk, IsQualityUncertain and IsQualityBad return false, the method IsQualityNotYetReceived returns true.
Example: Read quality of a the 800xA property Value in a scripting aspect: object.properties("Value").Quality
Answers
Try this sample code, I just verified it in 6.0.3-2 (800xA Base 6.0.3 Rollup 4).
Notice: you must run the script with the 32-bit WScript interpreter
REM Need to be called from 32-bit version of WScript
REM E.g.: C:\WINDOWS\SysWOW64\wscript.exe mytest.vbs
REM On Error Resume Next
dim systems
set systems = CreateObject("ABB.ABBSystems")
dim system
set system = systems.defaultsystem
dim obj
set obj = system.object("[Control Structure]Root/Control Network 1/SoftProj/Applications/Application_1/Diagrams/Diagram1")
dim props
set props = obj.properties
REM .Value member is default
wscript.echo "Value: " & props("Diagram:Var1")
REM Quality, numeric
wscript.echo "QualityCode: " & props("Diagram:Var1").Quality
REM Quality, boolean checks
wscript.echo "IsQualityOK: " & props("Diagram:Var1").IsQualityOK
wscript.echo "IsQualityBad: " & props("Diagram:Var1").IsQualityBad
wscript.echo "IsQualityUncertain: " & props("Diagram:Var1").IsQualityUncertain
wscript.echo "IsQualityValueNotYetReceived: " & props("Diagram:Var1").IsQualityValueNotYetReceived
Add new comment