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

Python Reference

tstevic
2019-07-29
2019-07-30
  • tstevic - 2019-07-29

    I would like to get some good references covering creating scripts to be executed on a PLC (Specifically a Lenze controller). There seems to be some material on the S3 site, but it is all presented as web pages. If it exists, I would like to download the documents as a single file or two.

    The project I am working on requires the script to force values in the processor, read the resulting logic states and then release the force. Thanks in advance.

     
  • mkeller - 2019-07-30

    Hi tstevic.

    tstevic hat geschrieben:
    I would like to get some good references covering creating scripts to be executed on a PLC (Specifically a Lenze controller).

    I think you misunderstood where the python script is executed. The python script is executed in the CODESYS IDE (PC) and not on the CODESYS Runtime (PLC).

    tstevic hat geschrieben:
    There seems to be some material on the S3 site, but it is all presented as web pages. If it exists, I would like to download the documents as a single file or two.

    CODESYS still contains the CHM file of the Scripting API which is generated from the C# code and requires you to translate the syntax to python. You can find it one of the following locations of your installed CODESYS:

    tstevic hat geschrieben:
    The project I am working on requires the script to force values in the processor, read the resulting logic states and then release the force. Thanks in advance.

    Look at the other topics in this sub forum there are some example how to read/write/force variables on a PLC.

    BR
    Martin

     

Log in to post a comment.