PLCGenerator.py
changeset 1626 0779c1b18c01
parent 1614 f8f05f849831
child 1730 64d8f52bc8c8
--- a/PLCGenerator.py	Wed Jan 11 14:15:45 2017 +0300
+++ b/PLCGenerator.py	Thu Jan 12 14:37:55 2017 +0300
@@ -1387,6 +1387,10 @@
 
     def GenerateSFCJump(self, jump, pou):
         jump_target = jump.gettargetName()
+        if not pou.hasstep(jump_target):
+            pname = pou.getname()
+            msg = _("SFC jump in pou \"{a1}\" refers to non-existent SFC step \"{a2}\"").format( a1 = pname, a2 = jump_target)
+            raise PLCGenException, msg
         if jump.connectionPointIn is not None:
             instances = []
             connections = jump.connectionPointIn.getconnections()