When working on a local computer, you only need to worry about the "Remote address" and "Remote port" parameters in both the blocks.
In the "UDP Send" block, the "Remote address" specifies the IP address you want to send data to and the "Remote port" specifies the port on which the receiver is listening or expecting data on. In the "UDP Receive" block, the "Remote address" specifies the IP address you want to receive data from and the "Remote port" specifies the port on which the sender will be sending data.
In your case, assuming you want the "UDP Send" block to send data to the "UDP Receive" block, the configuration should be as follows:
- "UDP Send" block: Set the "Remote address" to "127.0.0.1" and the "Remote port" to the "Local port" of the "UDP Receive" block. This is because the "UDP Receive" block is expecting to receive data on its local port (the UDP receiver is listening on port 5002).
- "UDP Receive" block: Set the "Remote address" to "127.0.0.1" and the "Remote port" to the "Local port" of the "UDP Send" block. This is because the "UDP Send" block is sending data over its local port and to receive data from the "UDP Send" block, the receiver must connect to that port.
I have attached an example model to the answer which shows this configuration.
Refer to the following resources for more information:
Hope this helps!