#The# The following code checks the quality code on an component. If a quality is anything other than good, a message appears.
#Fetch# Fetch the quality code from the Value property on a Numeric Label. The Numeric Label is this example is inside the same container as this script.
qualityCode = system.gui.getQuality(event.source.parent.getComponent('Numeric Label'), "value")
#Evaluate# Evaluate the quality code. If a value other than 192 is returned...
if qualityCode != 192:
# ...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 %i \n Please check the device connection")
#The# 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")