--- a/PLCControler.py Wed Sep 02 14:55:22 2009 -0600
+++ b/PLCControler.py Thu Sep 03 08:56:02 2009 -0600
@@ -1228,9 +1228,13 @@
return project.GetBaseType(type)
return None
- # Return Base Types
def GetBaseTypes(self):
- return [value for value in TypeHierarchy.keys() if not value.startswith("ANY")]
+ '''
+ return the list of datatypes defined in IEC 61131-3.
+ TypeHierarchy_list has a rough order to it (e.g. SINT, INT, DINT, ...),
+ which makes it easy for a user to find a type in a menu.
+ '''
+ return [x for x,y in TypeHierarchy_list if not x.startswith("ANY")]
def IsOfType(self, type, reference, debug = False):
project = self.GetProject(debug)