# HG changeset patch # User Andrey Skvortsov # Date 1481707866 -10800 # Node ID 18279f12a6be85ce7b3eb9b5310e5e6f54e70b0b # Parent 95ecb26fdc4ea3f830d8821c7769a086cf22b2f6 fix issue with compiling SFC POU with non-connected transition (type "connection") diff -r 95ecb26fdc4e -r 18279f12a6be PLCGenerator.py --- a/PLCGenerator.py Tue Dec 13 17:47:34 2016 +0300 +++ b/PLCGenerator.py Wed Dec 14 12:31:06 2016 +0300 @@ -763,7 +763,10 @@ content = instance.getconditionContent() if content["type"] == "connection": self.ConnectionTypes[content["value"]] = "BOOL" - for link in content["value"].getconnections(): + connections = content["value"].getconnections() + if not connections: + raise PLCGenException, _("SFC transition in POU \"%s\" must be connected.") % self.Name + for link in connections: connected = self.GetLinkedConnector(link, body) if connected is not None and not self.ConnectionTypes.has_key(connected): for related in self.ExtractRelatedConnections(connected):