Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

e!Cockpit Python Help

da66en
2020-10-06
2020-10-06
  • da66en - 2020-10-06

    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
  • Morberis

    Morberis - 2020-10-06

    You might have to contact Wago for e!Cockpit support.

     
  • da66en - 2020-10-06

    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?

     

Log in to post a comment.