fix issue with compiling SFC POU with non-connected transition (type "connection")
--- 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):