Adding comments for deferencing set and reset
authorlbessard
Wed, 01 Oct 2008 18:16:33 +0200
changeset 281 eb49f3f511cc
parent 280 9ca192486f2f
child 282 a18ddbbc5c58
Adding comments for deferencing set and reset
PLCGenerator.py
--- a/PLCGenerator.py	Wed Oct 01 17:49:02 2008 +0200
+++ b/PLCGenerator.py	Wed Oct 01 18:16:33 2008 +0200
@@ -856,9 +856,9 @@
                 self.Program += [(self.CurrentIndent + "IF ", var_info + (storage,))] + expression
                 self.Program += [(" THEN\n  ", ())]
                 if storage == "set":
-                    return [("TRUE;\n" + self.CurrentIndent + "END_IF", ())]
-                else:
-                    return [("FALSE;\n" + self.CurrentIndent + "END_IF", ())]
+                    return [("TRUE; (*set*)\n" + self.CurrentIndent + "END_IF", ())]
+                else:
+                    return [("FALSE; (*reset*)\n" + self.CurrentIndent + "END_IF", ())]
             edge = variable.getedge()
             if edge == "rising":
                 return self.AddTrigger("R_TRIG", expression, var_info + ("rising",))