PLCGenerator.py
changeset 644 6ff54a34102b
parent 617 1a80e0598045
child 684 f10449b18dbe
--- a/PLCGenerator.py	Wed Feb 15 00:26:30 2012 +0100
+++ b/PLCGenerator.py	Wed Feb 15 00:27:31 2012 +0100
@@ -1186,6 +1186,8 @@
                                 transition_infos["content"] = [("\n%s:= "%self.CurrentIndent, ())] + expression + [(";\n", ())]
                                 self.SFCComputedBlocks += self.Program
                                 self.Program = []
+                    if not transition_infos.has_key("content"):
+                        raise PLCGenException, _("Transition \"%s\" body must contain an output variable or coil referring to its name") % transitionValues["value"]
                 self.TagName = previous_tagname
             elif transitionValues["type"] == "connection":
                 body = pou.getbody()