--- a/opc_ua/client.py Mon Oct 18 20:41:31 2021 +0200
+++ b/opc_ua/client.py Tue Oct 19 12:58:22 2021 +0200
@@ -5,7 +5,8 @@
from editors.ConfTreeNodeEditor import ConfTreeNodeEditor
-from .opcua_client_maker import OPCUAClientPanel, OPCUAClientModel
+from PLCControler import LOCATION_CONFNODE, LOCATION_VAR_INPUT, LOCATION_VAR_OUTPUT +from .opcua_client_maker import OPCUAClientPanel, OPCUAClientModel, UA_IEC_types import util.paths as paths
@@ -84,3 +85,28 @@
return [(c_path, CFLAGS)], LDFLAGS, True
+ def GetVariableLocationTree(self): + current_location = self.GetCurrentLocation() + locstr = "_".join(map(str, current_location)) + name = self.BaseParams.getName() + for direction, data in self.modeldata.iteritems(): + iec_direction_prefix = {"input": "__I", "output": "__Q"}[direction] + dname, ua_nsidx, ua_nodeid_type, _ua_node_id, ua_type, iec_number = row + iec_type, C_type, iec_size_prefix, ua_type_enum, ua_type = UA_IEC_types[ua_type] + c_loc_name = iec_direction_prefix + iec_size_prefix + locstr + "_" + str(iec_number) + "type": {"input": LOCATION_VAR_INPUT, "output": LOCATION_VAR_OUTPUT}[direction], + "size": {"X":1, "B":8, "W":16, "D":32, "L":64}[iec_size_prefix], + "var_name": c_loc_name, + "location": iec_size_prefix + ".".join([str(i) for i in current_location]) + "." + str(iec_number), + "type": LOCATION_CONFNODE, + "location": ".".join([str(i) for i in current_location]) + ".x",