editors/SFCViewer.py
changeset 1740 b789b695b5c6
parent 1730 64d8f52bc8c8
child 1742 92932cd370a4
equal deleted inserted replaced
1739:ec153828ded2 1740:b789b695b5c6
   339         if blockName == "SFC_Divergence":
   339         if blockName == "SFC_Divergence":
   340             blockName = block.Type
   340             blockName = block.Type
   341         return blockName
   341         return blockName
   342 
   342 
   343     # This method check the IEC 61131-3 compatibility between two SFC blocks
   343     # This method check the IEC 61131-3 compatibility between two SFC blocks
   344     def BlockCompatibility(self,startblock = None, endblock = None, direction = None):
   344     def BlockCompatibility(self, startblock = None, endblock = None, direction = None):
   345         if startblock!= None and endblock != None and (isinstance(startblock,SFC_Objects)\
   345         if startblock!= None and endblock != None and (isinstance(startblock, SFC_Objects)\
   346                                                                or isinstance(endblock,SFC_Objects)):
   346                                                                or isinstance(endblock, SFC_Objects)):
   347             # Full "SFC_StandardRules" table would be symmetrical and
   347             # Full "SFC_StandardRules" table would be symmetrical and
   348             # to avoid duplicate records and minimize the table only upper part is defined.
   348             # to avoid duplicate records and minimize the table only upper part is defined.
   349             if (direction == SOUTH or direction == EAST):
   349             if (direction == SOUTH or direction == EAST):
   350                 startblock, endblock = endblock, startblock
   350                 startblock, endblock = endblock, startblock
   351             start = self.GetBlockName(startblock)
   351             start = self.GetBlockName(startblock)