The ModbusMaster FB (Manual abstract) can manage all the three Modbus protocol types (Ascii, RTU and TCP/IP), it can manages the Modbus protocol over all the communication streams, serial line (See topic), TCP or UDP. The FB has a File input to pass the stream to use.
So use the Modbus communication over IP it’s so simply, just open a TCP/IP client communication on the device with which to communicate (By using the SysTCPClient FB) and then pass the stream to the ModbusMaster FB. This is the printout of the TCPModbusMaster program that shows what to do.
The program reads 8 registers using the 16#03 Read Holding Registers modbus command from a SlimLine slave device (IP address 192.168.0.218) and stores the result on the RxData array. Remind that the Modbus slave on the SlimLine is directly managed by the operating system so no additional slave FB is required (Program download).