PLCGenerator.py
changeset 2519 27955f010b23
parent 2456 7373e3048167
child 2521 48ebcbe7f19b
--- a/PLCGenerator.py	Fri Mar 01 16:55:16 2019 +0300
+++ b/PLCGenerator.py	Tue Mar 05 11:19:36 2019 +0300
@@ -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: