# HG changeset patch # User lbessard # Date 1207240202 -7200 # Node ID e18e354a8006a2b1837ca0c1dec8a4a84ce1e2c5 # Parent 50926b8abac4ad004487ffa3df84281c52027508 But on getinstanceByName in pou class fixed diff -r 50926b8abac4 -r e18e354a8006 plcopen/plcopen.py --- a/plcopen/plcopen.py Wed Mar 26 15:22:40 2008 +0100 +++ b/plcopen/plcopen.py Thu Apr 03 18:30:02 2008 +0200 @@ -831,7 +831,7 @@ def getcontentInstanceByName(self, name): if self.content["name"] in ["LD","FBD","SFC"]: for element in self.content["value"].getcontent(): - if element["value"].getLocalId() == name: + if isinstance(element["value"], PLCOpenClasses.get("fbdObjects_block", None)) and element["value"].getinstanceName() == name: return element["value"] else: raise TypeError, "%s body don't have instances!"%self.content["name"]