PLCGenerator.py
changeset 2521 48ebcbe7f19b
parent 2459 21164625b393
parent 2519 27955f010b23
child 2629 caa43c61f90c
--- a/PLCGenerator.py	Mon Mar 11 09:18:58 2019 +0100
+++ b/PLCGenerator.py	Mon Mar 11 13:51:07 2019 +0100
@@ -1335,6 +1335,9 @@
                 contact_info = (self.TagName, "contact", next.getlocalId())
                 variable = str(self.ExtractModifier(next, [(next.getvariable(), contact_info + ("reference",))], contact_info))
                 result = self.GeneratePaths(next.connectionPointIn.getconnections(), body, order)
+                if len(result) == 0:
+                    raise PLCGenException(_("Contact \"{a1}\" in POU \"{a2}\" must be connected.").
+                                          format(a1=next.getvariable(), a2=self.Name))
                 if len(result) > 1:
                     factorized_paths = self.FactorizePaths(result)
                     if len(factorized_paths) > 1: