this is what I have done so far.
In the first TCP socket Init, I set the socket 2 and port 502( as default), and the second block I set the socket 0 and the port 20000 ( as default).
Int the second modbus config, i set the Ip address of my yaskawa and the port 502 in the slave devices list.
In the first Modbus config I havent set anything since it should be the socket 2 for the slave.
In the connect socket 2 block , I set the remote port 502 and my yaskawa ip address.
in the connect socket 0 block, I set the remote port 20000 and the yaskawa ip address.
I still dont understand how these blocks work, there are too many degrees of freedom in this modbus configuration.
I read the help file, but it didnt help me at all.