Remove restriction of function block usage in SFC transitions body
authorlaurent
Tue, 11 Sep 2012 16:35:11 +0200
changeset 823 c6ed7b933617
parent 822 050045c32d98
child 824 be669f4c51c4
Remove restriction of function block usage in SFC transitions body
PLCControler.py
editors/Viewer.py
--- a/PLCControler.py	Tue Sep 11 16:33:39 2012 +0200
+++ b/PLCControler.py	Tue Sep 11 16:35:11 2012 +0200
@@ -1468,7 +1468,7 @@
             if words[0] in ["P","T","A"]:
                 name = words[1]
                 type = self.GetPouType(name, debug)
-        if type == "function" or words[0] == "T":
+        if type == "function":
             blocktypes = []
             for category in BlockTypes + self.GetConfNodeBlockTypes():
                 cat = {"name" : category["name"], "list" : []}
--- a/editors/Viewer.py	Tue Sep 11 16:33:39 2012 +0200
+++ b/editors/Viewer.py	Tue Sep 11 16:35:11 2012 +0200
@@ -234,8 +234,6 @@
                     message = _("\"%s\" can't use itself!")%pou_name
                 elif pou_type == "function" and values[1] != "function":
                     message = _("Function Blocks can't be used in Functions!")
-                elif words[0] == "T" and values[1] != "function":
-                    message = _("Function Blocks can't be used in Transitions!")
                 elif self.ParentWindow.Controler.PouIsUsedBy(pou_name, values[0], self.ParentWindow.Debug):
                     message = _("\"%s\" is already used by \"%s\"!")%(pou_name, values[0])
                 else: