Fixed typos.
authoretisserant
Tue, 19 Aug 2008 18:04:56 +0200
changeset 232 cbdfef9b2020
parent 231 fc2d6cbb8b39
child 233 de7ddb376150
Fixed typos.
PLCGenerator.py
--- a/PLCGenerator.py	Tue Aug 12 18:16:09 2008 +0200
+++ b/PLCGenerator.py	Tue Aug 19 18:04:56 2008 +0200
@@ -229,15 +229,15 @@
                 address = var.getaddress()
                 if address:
                     config += [("AT ", ()),
-                               (address, (tagename, "variable", var_number, "address")),
+                               (address, (tagname, "variable", var_number, "address")),
                                (" ", ())]
                 config += [(": ", ()),
-                           (var_type, (tagename, "variable", var_number, "type"))]
+                           (var_type, (tagname, "variable", var_number, "type"))]
                 # Generate variable initial value if exists
                 initial = var.getinitialValue()
                 if initial:
                     config += [(" := ", ()),
-                               (self.ComputeValue(initial.getvalue(), var_type), (tagename, "variable", var_number, "initial"))]
+                               (self.ComputeValue(initial.getvalue(), var_type), (tagname, "variable", var_number, "initial"))]
                 config += [(";\n", ())]
                 var_number += 1
             config += [("  END_VAR\n", ())]
@@ -282,15 +282,15 @@
                 # Generate variable address if exists
                 if address:
                     resrce += [("AT ", ()),
-                               (address, (tagename, "variable", var_number, "address")),
+                               (address, (tagname, "variable", var_number, "address")),
                                (" ", ())]
                 resrce += [(": ", ()),
-                           (var_type, (tagename, "variable", var_number, "type"))]
+                           (var_type, (tagname, "variable", var_number, "type"))]
                 # Generate variable initial value if exists
                 initial = var.getinitialValue()
                 if initial:
                     resrce += [(" := ", ()),
-                               (self.ComputeValue(initial.getvalue(), var_type), (tagename, "variable", var_number, "initial"))]
+                               (self.ComputeValue(initial.getvalue(), var_type), (tagname, "variable", var_number, "initial"))]
                 resrce += [(";\n", ())]
                 var_number += 1
             resrce += [("    END_VAR\n", ())]
@@ -1142,7 +1142,7 @@
                             (var_type, (self.TagName, "variable", var_number, "type"))]
                 if var_initial != None:
                     program += [(" := ", ()),
-                                (self.ComputeValue(var_initial, var_type), (self.TagName, "variable", var_number, "initial"))]
+                                (self.ParentGenerator.ComputeValue(var_initial, var_type), (self.TagName, "variable", var_number, "initial"))]
                 program += [(";\n", ())]
                 var_number += 1
             program += [("  END_VAR\n", ())]