PLCControler.py
changeset 197 8023d02d78ed
parent 188 d64037e17075
child 207 b1144bb36605
equal deleted inserted replaced
196:54f5020531f6 197:8023d02d78ed
  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']: