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

Script Ladder Logic creation?

col26
2017-03-09
2017-03-10
  • col26 - 2017-03-09

    We are looking at switching to a PLC vendor that uses Codesys for Development. Can ladder logic creation be scripted with python? Also Can HMI design me scripted?
    I can't really find any good examples or feature lists for Python scripting in codesys.

     
  • mkeller - 2017-03-10

    Hi col26.

    col26 hat geschrieben:
    We are looking at switching to a PLC vendor that uses Codesys for Development. Can ladder logic creation be scripted with python? Also Can HMI design me scripted?
    I can't really find any good examples or feature lists for Python scripting in codesys.

    You can't do Ladder with Scripting but you can import and export PLCopenXML which supports Ladder. But our Ladder does not support everything which is specified in the PLCopenXML. For example, not every element can be connect with every other element.

    Use the following approach:
    - Create the logic you need in our Ladder editor
    - Export it as PLCopenXML
    - Check the exported XML to see how it is done and what is possible

    At the moment the Scripting only support the Image Pool object. There is a big improvement about the Scripting of the Visualization in our Jira database so it will be implemented eventually. I will add a comment about this thread to this Jira entry.

    In general you can check the Scripting API documentation if you want to know what is supported. You find the document 'ScriptEngine.chm' in the directory OnlineHelp of the CODESYS installation.

    BR
    Martin

     

Log in to post a comment.