joanm - 2024-01-04

Hello all,

I am working in a project in which there are multiple Modbus TCP slaves.
I need to be able to change the IP addresses of those devices from the HMI and I was planning to use the process depicted here:

https://faq.codesys.com/display/CDSFAQ/Modbus+TCP+Slave%3A+Dynamic+Setting+of+the+IP+Address

I can see the port number is what is used to specify which slave device we want to modify the IP address of.

This said, can I freely set arbitrary port numbers to each device? I mean, can I set the first device to be at port 502, the second one at port 503...

Any drawback or restriction?

Is there any other way to reference to the device without having to change the port numbers?

Thank you all in advance.