merged
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Thu, 11 Apr 2019 08:40:17 +0200
changeset 2590 f8c66edffbd4
parent 2588 25f19b76c7b6 (current diff)
parent 2589 d94d4f396bbf (diff)
child 2591 5f685bcd3ad6
merged
--- a/modbus/modbus.py	Wed Apr 10 21:36:12 2019 +0200
+++ b/modbus/modbus.py	Thu Apr 11 08:40:17 2019 +0200
@@ -122,7 +122,7 @@
                 "type": LOCATION_VAR_MEMORY,
                 "size": datasize,
                 "IEC_type": datatype,
-                "var_name": "var_name",
+                "var_name": "MB_" + "".join([w[0] for w in dataname.split()]) + "_" + str(offset),
                 "location": datatacc + ".".join([str(i) for i in current_location]) + "." + str(offset),
                 "description": "description",
                 "children": []})
@@ -227,7 +227,7 @@
                 "type": LOCATION_VAR_MEMORY,
                 "size": datasize,
                 "IEC_type": datatype,
-                "var_name": "var_name",
+                "var_name": "MB_" + "".join([w[0] for w in dataname.split()]) + "_" + str(offset),
                 "location": datatacc + ".".join([str(i) for i in current_location]) + "." + str(offset),
                 "description": "description",
                 "children": []})