1759 |
1759 |
1760 def AddEditedElementPouVar(self, tagname, type, name): |
1760 def AddEditedElementPouVar(self, tagname, type, name): |
1761 words = tagname.split("::") |
1761 words = tagname.split("::") |
1762 if words[0] in ['P', 'T', 'A']: |
1762 if words[0] in ['P', 'T', 'A']: |
1763 pou = self.Project.getpou(words[1]) |
1763 pou = self.Project.getpou(words[1]) |
|
1764 if not pou.interface: |
|
1765 pou.interface = plcopen.pou_interface() |
1764 pou.addpouVar(type, name) |
1766 pou.addpouVar(type, name) |
1765 |
1767 |
1766 def ChangeEditedElementPouVar(self, tagname, old_type, old_name, new_type, new_name): |
1768 def ChangeEditedElementPouVar(self, tagname, old_type, old_name, new_type, new_name): |
1767 words = tagname.split("::") |
1769 words = tagname.split("::") |
1768 if words[0] in ['P', 'T', 'A']: |
1770 if words[0] in ['P', 'T', 'A']: |