Colway Solutions
Modbus Member Logo

How To: Set Up Communications for Modbus TCP


  1. Open the Communication Setup form by choosing Communication->Setup menu item. This form can be opened by clicking the Communication Setup Toolbar button too.
  2. Enter the IP address of your Modbus TCP device. This information should be available from your device's User Manual.
  3. Change the Port Number from the default value of 502 if your device services connection requests on a different port number. The standard port number for Modbus TCP connections is 502.
  4. Set a communication timeout period in the Timeout text box. Exercise caution in setting this parameter as a value too small will cause timeouts even though the device is responding correctly to Modbus requests. Device response times greatly vary from anywhere between 10ms to tens of seconds depending on the speed of the device's microcontroller and the medium of communication. For direct Ethernet connections a typical value of timeout is between 1 second to 5 seconds. However for slower media like GPRS you may have to set this to anywhere between 10 seconds to even a minute.
  5. If you want the Tester to automatically reconnect to the last configured device on startup, check the Reconnect on startup checkbox. This will save you the hassle of manually reconnecting every time the test harness is started.
  6. If you want the Tester to automatically reconnect to the device if an existing connection drops due to network problems, check the Autoreconnect on disconnection checkbox. Set an interval for periodic retries if the reconnection attempt is unsuccessful in the Reconnect Interval text box. It is strongly recommended that this feature be enabled prior to starting long duration stability tests on your device.
  7. Click OK to save the configuration.
One of the most common causes of failure in Modbus TCP communication is to leave the Firewall enabled on the selected Modbus port number. This will cause all Modbus requests to be blocked at the Firewall. Remember to disable the Firewall or add the configured Modbus port number (usually 502) under the Exceptions List of your Firewall.

Next Steps

Topic link Make a connection to your Modbus device

See Also

Topic link Setup Communication Parameters
Privacy Policy Site Map FAQ Contact Us