Modbus slave read/write

jbarrio
2022-07-11
2022-07-22
  • jbarrio - 2022-07-11

    Hello:
    I have created a modbus slave that serves data to an external master. The thing is that I am only able to configure it so that:

    1 The teacher writes in the variables that I publish, but from codesys I cannot modify those variables.
    2 Codesys write the variables and the master I see them but the master cannot write them.
    The ideal for me would be that both codesys and the modbus master could write and the other could see the change made.

    Is there a way to achieve this with codesys?

     
  • rckalex - 2022-07-22

    In the General tab or your Modbus TCP Slave configuration, check "Writeable". Make sure you do not have a Watchdog enabled unless you want values zeroed when the master disconnects. Either map your values in the Modbus TCP Slave Device I/O Mapping tab or define your variables to overlay on the address range mapped for the Holding Registers.

    I can't quite workout what the "Holding and input register data areas overlay" means.

     

    Last edit: rckalex 2022-07-22

Log in to post a comment.