I am developing an Ignition Project for data-logging and HMI for a PLC (AB CLX). To begin with, I browsed the PLC tags with the OPC Browser and dragged across all the relevant tags.
Since then, I have worked on the PLC logic and added/removed/changed the name of some of the tags on the PLC. The associated tags in my Ignition project then change their quality to something other than “Good” (I have my PLC connected).
Now that I want to update my Ignition Project to reflect the changes on the PLC, I want to get a list of all the tags with ‘not good’ quality. I don’t want to delete all the tags and drag them in from the OPC browser again because I have configured different scanclasses etc. for each tag. I just want to remove or rename and change the path of the bad tags.
I have written a script to do this:
badTags=[badtag for badtag in allTags if system.tag.getAttribute(badtag.str(), ‘Quality’).str()!=‘Good’]
for tag in badTags:
print ‘%d bad tags out of %d found’ %(len(badTags), len(allTags))
print “Script Done!”[/code]
I also tried exporting the tags, but the “Quality” attribute is not exported.
Is there an easier way to do this?