PLCControler.py
changeset 616 8a60ffcfd70b
parent 567 eb523c4fa2da
child 622 05394e275a1c
--- a/PLCControler.py	Sun Jan 08 18:23:55 2012 +0100
+++ b/PLCControler.py	Sun Jan 08 19:16:58 2012 +0100
@@ -1950,9 +1950,15 @@
             if words[0] in ['P', 'T', 'A']:
                 pou = self.Project.getpou(words[1])
                 if pou is not None:
-                    if pou.interface is None:
-                        pou.interface = plcopen.pou_interface()
-                    pou.addpouVar(type, name, location, description)
+                    pou.addpouLocalVar(type, name, location, description)
+    
+    def AddEditedElementPouExternalVar(self, tagname, type, name):
+        if self.Project is not None:
+            words = tagname.split("::")
+            if words[0] in ['P', 'T', 'A']:
+                pou = self.Project.getpou(words[1])
+                if pou is not None:
+                    pou.addpouExternalVar(type, name)
             
     def ChangeEditedElementPouVar(self, tagname, old_type, old_name, new_type, new_name):
         if self.Project is not None: