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

Reading and writing register.

Kassu
2014-08-20
2014-08-22
  • Kassu - 2014-08-20

    Hi All,
    I have a problem with CodeSys(version 2.3.9, ST language). So, I should both read and write to the same registers over modbus(RS485) but I have any idea how I can do it.
    Register numbers are between 40000 - 42000 and I can write values to those registers but how I can read those registers?
    And I am a newbie with CodeSys, so, please simple asnwer if it possible.

    • Kassu
     
  • shooter - 2014-08-22

    yes you can write to registers using AT %MX0.0 :BOOL;

     
  • Kassu - 2014-08-22

    shooter hat geschrieben:
    yes you can write to registers using AT %MX0.0 :BOOL;

    Thanks for you answer but write is not problem. I can write those register but I donΓ€t understand how I can read the same register. That is my problem.

    • Kassu
     
  • shooter - 2014-08-22

    in the varlist you can say
    input AT %MX0.0 : BOOL;
    output AT %MX0.0 :BOOL;
    so you can write them from 2 places it is bad practice as you can also use same name for input and output.
    if you mean reading from distance you will have to make communications protocol to the receiving unit.

     

Log in to post a comment.