Fixed bug when debugging PLC with Graphic Viewer in debug open and re-transfer PLC
authorLaurent Bessard
Fri, 11 Oct 2013 10:07:56 +0200
changeset 1360 ebfe9c22af2a
parent 1359 cce13b237b07
child 1361 7158aa054226
Fixed bug when debugging PLC with Graphic Viewer in debug open and re-transfer PLC
PLCControler.py
--- a/PLCControler.py	Fri Oct 11 08:58:32 2013 +0200
+++ b/PLCControler.py	Fri Oct 11 10:07:56 2013 +0200
@@ -807,15 +807,15 @@
         tagname = self.GetPouInstanceTagName(instance_path)
         if tagname is not None:
             infos = self.GetPouVariables(tagname, debug)
-            infos["type"] = tagname
+            infos.type = tagname
             return infos
         else:
             pou_path, var_name = instance_path.rsplit(".", 1)
             tagname = self.GetPouInstanceTagName(pou_path)
             if tagname is not None:
                 pou_infos = self.GetPouVariables(tagname, debug)
-                for var_infos in pou_infos["variables"]:
-                    if var_infos["name"] == var_name:
+                for var_infos in pou_infos.variables:
+                    if var_infos.name == var_name:
                         return var_infos
         return None