--- a/PLCControler.py Tue Sep 11 19:13:42 2012 +0200
+++ b/PLCControler.py Tue Sep 11 23:38:49 2012 +0200
@@ -621,12 +621,21 @@
for varlist_type, varlist in pou.getvars():
for variable in varlist.getvariable():
- vartype_content = variable.gettype().getcontent()
- if vartype_content["name"] == "derived":
- return self.RecursiveGetPouInstanceTagName(
- vartype_content["value"].getname(),
+ if variable.getname() == parts[0]: + vartype_content = variable.gettype().getcontent() + if vartype_content["name"] == "derived": + return self.RecursiveGetPouInstanceTagName( + vartype_content["value"].getname(), + if pou.getbodyType() == "SFC" and len(parts) == 1: + for action in pou.getactionList(): + if action.getname() == parts[0]: + return self.ComputePouActionName(pou_type, parts[0]) + for transition in pou.gettransitionList(): + if transition.getname() == parts[0]: + return self.ComputePouTransitionName(pou_type, parts[0]) def GetPouInstanceTagName(self, instance_path, debug = False):
@@ -659,7 +668,9 @@
def GetInstanceInfos(self, instance_path, debug = False):
tagname = self.GetPouInstanceTagName(instance_path)
- return self.GetPouVariables(tagname, debug)
+ infos = self.GetPouVariables(tagname, debug) + infos["type"] = tagname pou_path, var_name = instance_path.rsplit(".", 1)
tagname = self.GetPouInstanceTagName(pou_path)