--- a/PLCControler.py Tue Jul 10 19:09:28 2007 +0200
+++ b/PLCControler.py Tue Jul 10 19:19:54 2007 +0200
@@ -552,12 +552,14 @@
# Extract varlists from a list of vars
def ExtractVarLists(self, vars):
+ print "extract varlist"
varlist_list = []
current_varlist = None
current_type = None
for var in vars:
- if current_type != (var["Class"], var["Retain"], var["Constant"], var["Location"] != ""):
- current_type = (var["Class"], var["Retain"], var["Constant"], var["Location"] != "")
+ print var["Class"], var["Retain"], var["Constant"], var["Location"]
+ if current_type != (var["Class"], var["Retain"], var["Constant"], var["Location"] in ["", None]):
+ current_type = (var["Class"], var["Retain"], var["Constant"], var["Location"] in ["", None])
current_varlist = plcopen.varList()
varlist_list.append((var["Class"], current_varlist))
if var["Retain"] == "Yes":