PLCControler.py
changeset 29 3b7e23a323a6
parent 28 fc23e1f415d8
child 33 0dd4a876392f
equal deleted inserted replaced
28:fc23e1f415d8 29:3b7e23a323a6
   796     # Return Block types checking for recursion
   796     # Return Block types checking for recursion
   797     def GetBlockResource(self):
   797     def GetBlockResource(self):
   798         blocktypes = []
   798         blocktypes = []
   799         for category in BlockTypes[:-1]:
   799         for category in BlockTypes[:-1]:
   800             for blocktype in category["list"]:
   800             for blocktype in category["list"]:
   801                 if blocktype["type"] != "function":
   801                 if blocktype["type"] == "program":
   802                     blocktypes.append(blocktype["name"])
   802                     blocktypes.append(blocktype["name"])
   803         if self.Project:
   803         if self.Project:
   804             for pou in self.Project.getPous():
   804             for pou in self.Project.getPous():
   805                 if pou.pouType.getValue() != "function":
   805                 if pou.pouType.getValue() == "program":
   806                     blocktypes.append(pou.getName())
   806                     blocktypes.append(pou.getName())
   807         return blocktypes
   807         return blocktypes
   808 
   808 
   809 #-------------------------------------------------------------------------------
   809 #-------------------------------------------------------------------------------
   810 #                       Project opened Pous management functions
   810 #                       Project opened Pous management functions