# HG changeset patch # User Edouard Tisserant # Date 1515594963 -3600 # Node ID 62f9cae9a25f78505aacdfc474efede4e0779c15 # Parent 2081de16e7267eeb03fb1ca7bcb62f518e694ad6 Extend python<->PLC global variable description "GlobalDesc" to support Initial value setting. Rebased from dporopat change "add initial value to runtime.py file", which means : - GlobalDesc is used by some customized beremiz python runtime - Those runtimes need to know what is initial value of these special variables diff -r 2081de16e726 -r 62f9cae9a25f py_ext/PythonFileCTNMixin.py --- a/py_ext/PythonFileCTNMixin.py Wed Jan 10 14:35:04 2018 +0100 +++ b/py_ext/PythonFileCTNMixin.py Wed Jan 10 15:36:03 2018 +0100 @@ -119,6 +119,7 @@ "configname": configname.upper(), "uppername": variable.getname().upper(), "IECtype": variable.gettype(), + "initial" : repr(variable.getinitial()), "pyextname": pyextname }, self.CodeFile.variables.variable) @@ -136,6 +137,7 @@ _%(pyextname)sGlobalsDesc.append(( "%(name)s", "%(IECtype)s", + %(initial)s, %(desc)s, %(onchange)s, %(opts)s))