editors/SFCViewer.py
changeset 1743 c3c3d1318130
parent 1742 92932cd370a4
child 1744 69dfdb26f600
equal deleted inserted replaced
1742:92932cd370a4 1743:c3c3d1318130
   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 is not None and endblock is not 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