--- a/runtime/PLCObject.py Tue Jun 04 08:35:13 2024 +0200
+++ b/runtime/PLCObject.py Tue Jun 04 14:09:16 2024 +0200
@@ -330,7 +330,7 @@
- def PythonRuntimeCall(self, methodname, reverse_order=False):
+ def PythonRuntimeCall(self, methodname, use_evaluator=True, reverse_order=False): Calls init, start, stop or cleanup method provided by
runtime python files, loaded when new PLC uploaded
@@ -339,7 +339,10 @@
methods = reversed(methods)
- _res, exp = default_evaluator(method)
+ _res, exp = self.evaluator(method) + _res, exp = default_evaluator(method) self.LogMessage(0, '\n'.join(traceback.format_exception(*exp)))
@@ -403,7 +406,7 @@
self.LogMessage(0, traceback.format_exc())
- self.PythonRuntimeCall("init")
+ self.PythonRuntimeCall("init", use_evaluator=False) self.PythonThreadCondLock = Lock()
self.PythonThreadCmdCond = Condition(self.PythonThreadCondLock)
@@ -418,7 +421,7 @@
if self.python_runtime_vars is not None:
self.PythonThreadCommand("Finish")
- self.PythonRuntimeCall("cleanup", reverse_order=True)
+ self.PythonRuntimeCall("cleanup", use_evaluator=False, reverse_order=True) self.python_runtime_vars = None