# HG changeset patch # User Andrey Skvortsov # Date 1482932030 -10800 # Node ID 3638463d6e026c15ae64b9cac1f45a1ef11ca187 # Parent af9b0ccb418ed3bb6512d8ad235af8ac61ef55a2 fix issue with creating SFC transitions using ST and IL Beremiz generates text representation for transitions without names. Therefore transition name in its IL code is not needed. diff -r af9b0ccb418e -r 3638463d6e02 PLCControler.py --- a/PLCControler.py Mon Dec 26 14:01:54 2016 +0300 +++ b/PLCControler.py Wed Dec 28 16:33:50 2016 +0300 @@ -2184,7 +2184,7 @@ if pou is not None: return self.GetPouInterfaceReturnType(pou, tree, debug) elif words[0] == 'T': - return "BOOL" + return ["BOOL", ([], [])] return None # Change the edited element text diff -r af9b0ccb418e -r 3638463d6e02 plcopen/plcopen.py --- a/plcopen/plcopen.py Mon Dec 26 14:01:54 2016 +0300 +++ b/plcopen/plcopen.py Wed Dec 28 16:33:50 2016 +0300 @@ -1276,9 +1276,7 @@ transition.setname(name) transition.setbodyType(body_type) if body_type == "ST": - transition.setanyText(":= ;") - elif body_type == "IL": - transition.setanyText("\tST\t%s"%name) + transition.settext(":= ;") setattr(cls, "addtransition", addtransition) def gettransition(self, name):