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

Get and Set Values On Running Application in Plc

Anonymous
2014-07-11
2019-11-20
  • Anonymous - 2014-07-11

    Originally created by: osmaneliar

    Is possible to get or set values when application is running on plc. Can I connect application directly with python? I mean application started in plc and it is running mode so I created boot application. Can I use created application ?

    Can I run python script with ST Language.

     
  • Anonymous - 2014-07-11

    Originally created by: M.Schaber

    Hi,

    The CODESYS Script Engine runs in the CODESYS IDE, not in the runtime. (It's purpose is to automate development tasks users can also perform manually in the IDE.) Thus, reading and writing variables internally uses the monitoring API of the CODESYS IDE, and cannot be used standalone.

    python.org) and one of the OPC Libraries for python you can find on the net. This also requires that you set up an appropriate "Symbol Configuration" within the project, and an OPC server.

    To run a python script from ST language, you need to spawn a python interpreter. Depending on your runtime system, you may be able to install a python interpreter there, and start it as an external process. But still, you don't have any communication between the IEC code and python. Another possibility is to use a Server running python, and use tcp/ip from the runtime to connect to the server and communicate.

    Technically, it should also be possible to create a runtime module containing a python interpeter (on appropriate platforms). But this option is only available to our OEMs, normal end users usually cannot create runtime modules.

     
  • Anonymous - 2014-07-14

    Originally created by: osmaneliar

    We are OEMs. How can I create runtime module ?

     
  • Anonymous - 2014-07-14

    Originally created by: M.Schaber

    Hi,

    If you are OEM, your runtime team did receive appropriate training at the time when the runtime was ported to your hardware, this is part of the starter package.

    So you should ask your runtime people.

    But you should not underestimate the effort.

    hard or impossible to get it runningPyMite or TinyPython.

     
  • lam.le - 2019-10-28

    @M.Schaber: What if we (OEM) want to create a binary (a tool) which run on device and can talk with codesys runtime to read PLC variables. How can we do that?

     
  • mkeller - 2019-11-20

    Hi.

    lam.le hat geschrieben:
    @M.Schaber: What if we (OEM) want to create a binary (a tool) which run on device and can talk with codesys runtime to read PLC variables. How can we do that?

    You can integrate the CODESYS PLCHANDLER or you can communicate with the CODESYS OPC UA Server if the feature is available on your runtime.

    BTW: If you are an OEM customer you could send such questions to our OEM Support.

    BR
    Martin

     

Log in to post a comment.