runtime/PLCObject.py
branchsvghmi
changeset 3191 26b7c4aa7b38
parent 3182 a7941f053a83
child 3282 725d3e9ac913
--- a/runtime/PLCObject.py	Tue Mar 16 14:19:22 2021 +0100
+++ b/runtime/PLCObject.py	Wed Mar 17 11:07:29 2021 +0100
@@ -459,6 +459,7 @@
                 self.PythonThreadAcknowledge(cmd)
                 self.PythonRuntimeCall("start")
                 self.LogMessage("Python extensions started")
+                self.PostStartPLC()
                 self.PythonThreadLoop()
                 self.PythonRuntimeCall("stop", reverse_order=True)
             elif cmd == "Finish":
@@ -496,6 +497,16 @@
         """
         pass
 
+    def PostStartPLC(self):
+        """ 
+        Here goes actions to be taken after PLC is started, 
+        with all libraries and python object already created,
+        and python extensions "Start" methods being called.
+        This is called before python thread processing py_eval blocks starts.
+        For example : attach additional ressource to web services
+        """
+        pass
+
     @RunInMain
     def StartPLC(self):