fix problem with initial values for array of structures
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Thu, 08 Jun 2017 17:29:41 +0300
changeset 1693 72286367d0fd
parent 1692 9cb4d1392baf
child 1694 acb767d6ac85
fix problem with initial values for array of structures

for structures wrong empty repetition attributes were generated
plcopen/plcopen.py
--- a/plcopen/plcopen.py	Tue Jun 06 14:21:53 2017 +0300
+++ b/plcopen/plcopen.py	Thu Jun 08 17:29:41 2017 +0300
@@ -2416,7 +2416,7 @@
 
 cls = PLCOpenParser.GetElementClass("arrayValue", "value")
 if cls:
-    arrayValue_model = re.compile("([0-9]*)\((.*)\)$")
+    arrayValue_model = re.compile("([0-9]+)\((.*)\)$")
     
     def setvalue(self, value):
         elements = []