Read/write variables Codesys <> Python script

2018-06-13
5 days ago
  • Peter.skokanek

    Peter.skokanek - 2018-06-13

    Hi,
    I need to Read/Write variables from Codesys to runing python script. I tested example OPCUA where is changing iConunter variable in Codesys project and the value of iCounter is printed by means of OPC UA client "simpleclientRaspi.py". It works well. But I don't need print it I need to use this value in my python script. How can I extract value of iCounter variable?

    Peter

     
  • Peter.skokanek

    Peter.skokanek - 2018-06-14

    I found the right function. It this example it is possible to use : iCounter.get_value()

    Peter

     
    • shakir

      shakir - 2020-10-16

      Hi,
      I have facing the same issue. Would you like to please elaborate how did you do that?As I am new to CODESYS couldn't find the right option yet.
      Thank you.

       

Log in to post a comment.