--- a/PLCControler.py Fri Oct 25 09:57:36 2013 +0200
+++ b/PLCControler.py Thu Nov 07 00:16:00 2013 +0100
@@ -1622,7 +1622,7 @@
"list": [pou.getblockInfos()
for pou in project.getpous(name, filter)
if (name is None or
- len(self.GetInstanceList(pou, name, debug)) > 0)]})
+ len(self.GetInstanceList(pou, name, debug)) == 0)]})
return blocktypes
return self.TotalTypes
@@ -1642,7 +1642,7 @@
blocktypes.extend([pou.getname()
for pou in project.getpous(name, ["functionBlock"])
if (name is None or
- len(self.GetInstanceList(pou, name, debug)) > 0)])
+ len(self.GetInstanceList(pou, name, debug)) == 0)])
return blocktypes
# Return Block types checking for recursion
@@ -1676,7 +1676,7 @@
for datatype in project.getdataTypes(name)
if (not only_locatables or self.IsLocatableDataType(datatype, debug))
and (name is None or
- len(self.GetInstanceList(datatype, name, debug)) > 0)])
+ len(self.GetInstanceList(datatype, name, debug)) == 0)])
if confnodetypes:
for category in self.GetConfNodeDataTypes(name, only_locatables):
datatypes.extend(category["list"])