dynamic Ip modbus GUI

Hi there, as you know when we set up the ip address for Modbus slave, we do in the configuration of codesys, what I want to do is trying to get that Ip configurable from the user interface, at the moment I am using the library of modbus to do that, but it's too complicated to do if I need many ip with heaps of registers each one. I attach some images of how is used through the library which it is complex at the moment of adding new registers. I would want just try to catch the IP address from the configuration and being able to change it from the GUI. All of this, is because I am going to read many meters and their registers, what I want to do is select from the GUI which meter(slave) we want to use, that means we have to insert the Ip address in the GUI to set the meter we want to use. for example, meter 1 xxx.xxx.1.123, meter 2 xxx.xxx.1.124. so I have to select depend the costumer which meter is going to be used from the GUI, it means we have to select the Ip for the meter (slave) we want to read. but of course the costumer is not going to log into the code and change the Ip address through the configuration in Codesys. the image shows a little bit the code for the modbus library and how is exposed and configurable from the GUI, I want to change that because the changes there are complicated rather than the normal configuration of adding registers in the module of codesys of the slave.

Posted by duvanmoreno24 2023-03-31

Log in to post a comment.