PLCGenerator.py
changeset 1603 18279f12a6be
parent 1581 2295fdc5c271
child 1614 f8f05f849831
--- 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):