--- a/PLCControler.py Thu Sep 24 18:13:54 2009 +0200
+++ b/PLCControler.py Thu Sep 24 18:16:04 2009 +0200
@@ -75,6 +75,13 @@
"InOut" : (plcopen.interface_inOutVars, ITEM_VAR_INOUT)
}
+LOCATIONS_ITEMS = [LOCATION_PLUGIN,
+ LOCATION_MODULE,
+ LOCATION_GROUP,
+ LOCATION_VAR_INPUT,
+ LOCATION_VAR_OUTPUT,
+ LOCATION_VAR_MEMORY] = range(6)
+
ScriptDirectory = os.path.split(os.path.realpath(__file__))[0]
def GetUneditableNames():
@@ -1170,6 +1177,9 @@
for i in xrange(len(self.PluginTypes)):
self.PluginTypes.pop(0)
+ def GetVariableLocationTree(self):
+ return []
+
# Function that returns the block definition associated to the block type given
def GetBlockType(self, type, inputs = None, debug = False):
for category in BlockTypes + self.PluginTypes:
@@ -1848,7 +1858,7 @@
connection.setconnectionParameter(idx, None)
idx += 1
- def AddEditedElementPouVar(self, tagname, type, name):
+ def AddEditedElementPouVar(self, tagname, type, name, location="", description=""):
if self.Project is not None:
words = tagname.split("::")
if words[0] in ['P', 'T', 'A']:
@@ -1856,7 +1866,7 @@
if pou is not None:
if pou.interface is None:
pou.interface = plcopen.pou_interface()
- pou.addpouVar(type, name)
+ pou.addpouVar(type, name, location, description)
def ChangeEditedElementPouVar(self, tagname, old_type, old_name, new_type, new_name):
if self.Project is not None: