--- a/PLCGenerator.py Sun Jan 08 19:16:58 2012 +0100
+++ b/PLCGenerator.py Sun Jan 08 19:19:42 2012 +0100
@@ -202,7 +202,7 @@
(elementtype_name, (tagname, "struct", i, "type"))]
if element.initialValue is not None:
element_text.extend([(" := ", ()),
- (self.ComputeValue(element.initialValue.getvalue(), elementtype_name), (tagname, "struct", i, "initial"))])
+ (self.ComputeValue(element.initialValue.getvalue(), elementtype_name), (tagname, "struct", i, "initial value"))])
element_text.append((";", ()))
elements.append(element_text)
datatype_def += [("STRUCT", ())]
@@ -214,7 +214,7 @@
# Data type has an initial value
if datatype.initialValue is not None:
datatype_def += [(" := ", ()),
- (self.ComputeValue(datatype.initialValue.getvalue(), datatype_name), (tagname, "initial"))]
+ (self.ComputeValue(datatype.initialValue.getvalue(), datatype_name), (tagname, "initial value"))]
datatype_def += [(";\n", ())]
self.Program += datatype_def
@@ -279,7 +279,7 @@
address = var.getaddress()
if address:
config += [("AT ", ()),
- (address, (tagname, variable_type, var_number, "address")),
+ (address, (tagname, variable_type, var_number, "location")),
(" ", ())]
config += [(": ", ()),
(var.gettypeAsText(), (tagname, variable_type, var_number, "type"))]
@@ -287,7 +287,7 @@
initial = var.getinitialValue()
if initial:
config += [(" := ", ()),
- (self.ComputeValue(initial.getvalue(), var_type), (tagname, variable_type, var_number, "initial"))]
+ (self.ComputeValue(initial.getvalue(), var_type), (tagname, variable_type, var_number, "initial value"))]
config += [(";\n", ())]
var_number += 1
config += [(" END_VAR\n", ())]
@@ -332,7 +332,7 @@
# Generate variable address if exists
if address:
resrce += [("AT ", ()),
- (address, (tagname, variable_type, var_number, "address")),
+ (address, (tagname, variable_type, var_number, "location")),
(" ", ())]
resrce += [(": ", ()),
(var.gettypeAsText(), (tagname, variable_type, var_number, "type"))]
@@ -340,7 +340,7 @@
initial = var.getinitialValue()
if initial:
resrce += [(" := ", ()),
- (self.ComputeValue(initial.getvalue(), var_type), (tagname, variable_type, var_number, "initial"))]
+ (self.ComputeValue(initial.getvalue(), var_type), (tagname, variable_type, var_number, "initial value"))]
resrce += [(";\n", ())]
var_number += 1
resrce += [(" END_VAR\n", ())]
@@ -1309,13 +1309,13 @@
(" ", ())]
if var_address != None:
program += [("AT ", ()),
- (var_address, (self.TagName, variable_type, var_number, "address")),
+ (var_address, (self.TagName, variable_type, var_number, "location")),
(" ", ())]
program += [(": ", ()),
(var_type, (self.TagName, variable_type, var_number, "type"))]
if var_initial != None:
program += [(" := ", ()),
- (self.ParentGenerator.ComputeValue(var_initial, var_type), (self.TagName, variable_type, var_number, "initial"))]
+ (self.ParentGenerator.ComputeValue(var_initial, var_type), (self.TagName, variable_type, var_number, "initial value"))]
program += [(";\n", ())]
var_number += 1
program += [(" END_VAR\n", ())]