1. Overview
This article provides a comprehensive approach to troubleshooting Modbus TCP/IP communication issues, specifically for engineers and technicians working with Rheonics Inline Viscometers and Density-Viscosity Meters. Rheonics sensors support out-of-the-box Modbus TCP/IP communication, ensuring seamless integration into customer processes.
2. Network Settings
- Make sure you can ping the Rheonics SME. On Windows, open the command prompt and use the ping command to test the connectivity between the PC and Rheonics Viscometer (as shown on Figure 1).
Figure 1. Ping Command Success
There are two possible outcomes for a ping test:
2.1 There is a response from IP Address
If there is a reply from the IP address, the network settings for both the PC and the Rheonics Sensor are configured correctly. Any issues with Modbus communication would not be caused by Ethernet or TCP/IP.
2.2 There is no response from the IP Address
If there is no response from the IP address, follow these steps to troubleshoot:
- Verify Network Settings on the PC: Ensure that the PC's network settings, such as IP address and subnet mask, are correctly configured.
- Check the Rheonics Sensor's Network Settings: Use the Rheonics Control Panel (RCP) to confirm the sensor's IP address and network configuration.
- Test with a Different Ethernet Cable: Replace the existing Ethernet cable with a known working cable or use a network cable tester (Figure 2) to rule out wiring issues.
Figure 2. Ethernet Cable Tester
3. Modbus Settings
3.1 Verify the Modbus TCP Port
- Ensure that the Modbus server is using the default port (502). Refer to the following article for details on factory settings: Connecting the Modbus TCP outputs
- Check that port 502 is open on firewalls between the PC/Modbus TCP Client and the Rheonics Sensor.
3.2 Check Slave Address Configuration
- Confirm that the Rheonics Sensor's Modbus slave address is set to 255 (Default value).
3.3 Validate Input Register Address
Check and validate Rheonics Input Register addresses. Make sure the data types and the address are correct.
Depending on the PLC or tool being used to read the Input Register, ensure the correct indexing method is being used. Some PLCs or tools are zero-indexed, requiring you to subtract 1 from the register address (e.g., 300137 becomes 136), while others are one-indexed, where the address is used as-is (e.g., 300137).
Register 300137 corresponds to Parameter 12: Viscosity Last Good (Float), as shown in Rheonics Input Register
4. CRC Errors
CRC (Cyclic Redundancy Check) errors indicate that the device is detecting bit activity on the network line, but the received bits do not form data that makes sense to the device. When encountering CRC errors, check the following:
- Ensure that the Pre-Delay is set to at least 50 ms.
5. Modbus Debugging Tools
Modbus Poll is a Modbus master simulator that helps test and verify Modbus communication. It allows real-time monitoring of parameters like viscosity, density, and temperature (Figure 3).
Modbus Poll is particularly useful for:
- Checking if registers are accessible and correctly configured.
- Validating data types, such as integers or floats, against expected values.
Modbus Poll can be downloaded from this Dropbox link and instructions on how to use Modbus Poll can be found at Rheonics Support Article: Quick Modbus TCP verification using Modbus Poll master software.
Figure 3 shows Rheonics Input Registers on Modbus Poll, after using Rheonics ModbusPoll pre-configured files.
Figure 3. Modbus Poll
Take a look at ModScan, another useful tool for debugging Modbus-related issues
6. Correcting Data Types and Endiannes
Typically, the error is a discrepancy between the Modbus TCP values and what is displayed on the sensor or the RCP. This is often due to an incorrect data type or improper endianness settings. To illustrate this, Figure 3 compares two tools used for testing Modbus TCP: ModScan and ModbusPoll, highlighting a difference in Register 136 in red.
Figure 4. ModScan and ModbusPoll comparison
This is a common issue involving both incorrect indexing and data types. When using ModScan, selecting the correct starting address is crucial. For example, choosing Register 0040 as the starting address incorrectly applies the Float (MSRF) format to all registers, resulting in incorrect data being displayed.
Figure 5. ModScan correct viscosity values