Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: edits/style, syntax


Returns the data quality for the property of the given component as an integer. This function can be used to check the quality of a Tag binding on a component in the middle of the script so that alternative actions can be taken in the event of device disconnections.

A description of the quality codes can be found on the Tag Quality Codes and Overlays page.

Client permissions restrictions


system.gui.getQuality(component, propertyName)

  • Parameters

JComponent component - The component whose property is being checked.

String propertyName - The name of the property as a string value.

  • Returns

intInteger - The data quality of the given property as an integer.

  • Scope

Vision Client

titleCode Examples
Code Block
titleCode Snippet
# The following code checks the quality code on an component. If a quality is anything other than good, a message appears.
# Fetch the quality code from the Value property on a Numeric Label. The Numeric Label isin this example is inside the same container as this script.
qualityCode = system.gui.getQuality(event.source.parent.getComponent('Numeric Label'), "value")
# Evaluate the quality code. If a value other than 192 is returned...:
if str(qualityCode) == "Good":
    # The quality code is good, so continue working. This example simply shows a message, but could be modified to do something more meaningful
	system.gui.messageBox("The property is showing good quality")  
	# ...then show a message informing the user. Using Python's string formatting (%i) to pass the quality code into the message.
	system.gui.messageBox("Operation Aborted \n The associated tag is showing quality code %s \n Please check the device connection" % qualityCode)

system gui getQuality, gui.getQuality