beremiz

Parents 578a46fb6b30
Children dde952da3aa4
disallow setting IEC location addresses for TIME, DATE, DT and TOD variables

Size of these types is not defined and depends on the implementation
(IEC 61131-3 2.3.1).
--- a/PLCControler.py Tue May 30 17:09:33 2017 +0300
+++ b/PLCControler.py Thu Jun 01 14:37:14 2017 +0300
@@ -1789,6 +1789,10 @@
if isinstance(typename, TupleType) or self.GetBlockType(typename) is not None:
return False
+ # the size of these types is implementation dependend
+ if typename in ["TIME", "DATE", "DT", "TOD"]:
+ return False
+
datatype = self.GetDataType(typename, debug)
if datatype is not None:
return self.IsLocatableDataType(datatype)