PLCControler.py
changeset 1265 242512c56ea1
parent 1254 ebc765355536
child 1283 f3cfe1ff917e
equal deleted inserted replaced
1264:27c8578670c8 1265:242512c56ea1
   708                                                          debug)
   708                                                          debug)
   709         return None
   709         return None
   710     
   710     
   711     def GetInstanceInfos(self, instance_path, debug = False):
   711     def GetInstanceInfos(self, instance_path, debug = False):
   712         tagname = self.GetPouInstanceTagName(instance_path)
   712         tagname = self.GetPouInstanceTagName(instance_path)
   713         print instance_path, tagname
       
   714         if tagname is not None:
   713         if tagname is not None:
   715             infos = self.GetPouVariables(tagname, debug)
   714             infos = self.GetPouVariables(tagname, debug)
   716             infos["type"] = tagname
   715             infos["type"] = tagname
   717             return infos
   716             return infos
   718         else:
   717         else:
   719             pou_path, var_name = instance_path.rsplit(".", 1)
   718             pou_path, var_name = instance_path.rsplit(".", 1)
   720             print pou_path, tagname
       
   721             tagname = self.GetPouInstanceTagName(pou_path)
   719             tagname = self.GetPouInstanceTagName(pou_path)
   722             if tagname is not None:
   720             if tagname is not None:
   723                 pou_infos = self.GetPouVariables(tagname, debug)
   721                 pou_infos = self.GetPouVariables(tagname, debug)
   724                 for var_infos in pou_infos["variables"]:
   722                 for var_infos in pou_infos["variables"]:
   725                     if var_infos["name"] == var_name:
   723                     if var_infos["name"] == var_name: