# HG changeset patch # User Edouard Tisserant # Date 1599746906 -7200 # Node ID 7f67a7f6bfcc7bd120f5d99970254eaadaf24891 # Parent 4dd67aa45855de05717c8065021a70c1b87acd63 Runtime/PLCObject : move call to PreStartPLC right after call to the "start" method of all python extensions, and then just before the start of the python loop executing python_* blocks. diff -r 4dd67aa45855 -r 7f67a7f6bfcc runtime/PLCObject.py --- a/runtime/PLCObject.py Thu Aug 13 19:00:38 2020 +0100 +++ b/runtime/PLCObject.py Thu Sep 10 16:08:26 2020 +0200 @@ -440,6 +440,7 @@ if cmd == "Activate": self.PythonRuntimeCall("start") + self.PreStartPLC() self.PythonThreadLoop() self.PythonRuntimeCall("stop", reverse_order=True) else: # "Finish" @@ -471,8 +472,6 @@ if not self.LoadPLC(): self._fail(_("Problem starting PLC : can't load PLC")) - self.PreStartPLC() - if self.CurrentPLCFilename is not None and self.PLCStatus == PlcStatus.Stopped: c_argv = ctypes.c_char_p * len(self.argv) res = self._startPLC(len(self.argv), c_argv(*self.argv))