I'm trying to find more info about using Python in e!Cockpit. More specifically, I cannot find API information. Pressing F1 on the Scripting screen brings up the offline help, which tells me to open ScriptEngine.chm; but that file seems to document the API calls to the ScriptEngine.dll and not the Python API. The online help for Python has much more relevant information (https://help.codesys.com/webapp/cdsaccesscdsfuncinpythonscripts;product=codesys;version=3.5.16.0) but the link to the API brings up an empty page.
Another problem is that the syntax in the examples in the online help doesn't match the examples that are installed with the software.
What am I missing?
Last edit: da66en 2020-10-06
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I figured some of it out. The offline help is indeed a documentation of the C# methods/classes of the ScriptEngine.dll. They do add some blurbs about how this interfaced in the Python script, but it's a real mess.
Where I'm stuck is that I want to read/write to a current running simulation. create_online_application() can be used to create a new connection, but I don't see a function to connect to an existin connection. Is there not one provided?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to find more info about using Python in e!Cockpit. More specifically, I cannot find API information. Pressing F1 on the Scripting screen brings up the offline help, which tells me to open ScriptEngine.chm; but that file seems to document the API calls to the ScriptEngine.dll and not the Python API. The online help for Python has much more relevant information (https://help.codesys.com/webapp/cdsaccesscdsfuncinpythonscripts;product=codesys;version=3.5.16.0) but the link to the API brings up an empty page.
Another problem is that the syntax in the examples in the online help doesn't match the examples that are installed with the software.
What am I missing?
Last edit: da66en 2020-10-06
You might have to contact Wago for e!Cockpit support.
I figured some of it out. The offline help is indeed a documentation of the C# methods/classes of the ScriptEngine.dll. They do add some blurbs about how this interfaced in the Python script, but it's a real mess.
Where I'm stuck is that I want to read/write to a current running simulation. create_online_application() can be used to create a new connection, but I don't see a function to connect to an existin connection. Is there not one provided?