1. Overview

KEPServerEX is an industrial connectivity platform that bridges industrial devices with control systems. For Rheonics viscosity and density sensors, the included Smart Module Electronics (SME) enables communication across major protocols, including Modbus, facilitating the integration with customer hardware and needs. This article will walk through setting up KEPServerEX 6 to read Modbus input registers from Rheonics sensors.

KEPSeverEX 6 can be downloaded from its official website as a 100% functional demo.


 

Diagram illustrating the KEPServer architecture, showcasing interconnected devices, including PLCs, sensors, databases, and monitoring systems, linked through KEPServer. Image sourced from the Kepware website

Figure 1. KEPServer Diagram. Image Sourced from Kepware Website

 


2. Rheonics SME: Modbus TCP


The Rheonics SME offers Modbus TCP over an Ethernet interface. The Modbus protocol provides client/server communication between devices connected on an Ethernet network. As shown in Figure 2, an SME (Modbus Server) connected to a network with several Modbus clients is able to send process and status data upon request to multiple clients such as PLCs, HMIs, and more.



Diagram of Modbus TCP communication showing a Rheonics SME connected to a network switch, which connects to two Modbus TCP Clients: a PC as a TCP client and KEPServerEx.

Figure 2. Modbus TCP Communication


KEPServer can be a viable solution for building a centralized data management system, as well as providing protocol conversion from Modbus to OPC, MQTT, or other industry-standard protocols.


3. Setting up the Ethernet Network


The first step is to successfully connect the Rheonics SME to the KEPServer Ethernet network. This involves not only creating a physical connection but also ensuring proper communication by configuring both devices on the same subnet. The exact network topology will depend on the use case and customer requirements.


3.1 Network Configuration on Rheonics SME

The Rheonics SME can be configured with the RCP software; to aid the user, Rheonics Support Portal - RCP provides several articles about minimum requirements, installing the software and most importantly: Running the RCP Program; there are two options for this: USB or Ethernet communication, both of which are described on the article.


Regardless of the communication method used, the network configuration remains the same. The detailed configuration procedure can be found at: Connecting to your SME using ethernet


3.2 Network Configuration on KEPServer

The KEPServer must be on the same local network as the SME. This procedure is well documented on the first part of the following article: Connecting to your SME using ethernet


4. KEPServerEX Settings

In KEPServerEX, setting up a Modbus connection involves several steps. It begins by creating a communication channel that defines the data path. Next, a Modbus device is added to this channel with the appropriate network settings. Finally, tags are configured to read specific Input Registers from the SME which then can be used for data logging, monitoring, or integrating with other applications.


Usually, the default settings in KEPServerEX are correct; the general recommendation is that if the user is not sure about any parameters or settings, it's best to leave them at their default values. If needed, the settings can be modified later.


4.1 Creating a Modbus Channel

Create a New KEPServerEX project or open an existing one. Start by creating a Modbus Channel, see Figure 3. Select the option Modbus TCP/IP Ethernet.



Screenshot of KEPServerEX 6 configuration interface showing the process of creating a Modbus channel. The 'Add Channel Wizard' dialog box is open, with 'Modbus TCP/IP Ethernet' selected as the channel type.

Figure 3. Creating a Modbus Channel


Make sure to select the correct Network Adapter for the Ethernet Network.


Screenshot of the 'Add Channel Wizard' in KEPServerEX showing the selection of a network adapter. The selected adapter is 'ASIX AX88179 USB 3.0 to Gigabit Ethernet Adapter

Figure 4. Network Adapter Selection


Accept all the default values suggested by KEPServer. Press Finish to add the Modbus Channel



Screenshot of the 'Add Channel Wizard' in KEPServerEX showing the final configuration summary for a Modbus channel

Figure 5. End of Channel Configuration



Create as many channels as needed but take into account that multiple devices can also be added to a single channel. If the user needs to retrieve data from several Rheonics sensors, they can all be added to the same channel if they share compatible communication settings.


4.2 Adding a New Device: SME

Add a new device, which in this example will be named "SME." Choose a device name that makes sense, such as the sensor's serial number, especially if multiple devices will be added.


Screenshot of KEPServerEX showing the process of adding a new device. The 'Add Device Wizard' dialog box is open with 'SME' entered as the device name

Figure 6. Adding a New Device


Select “Modbus” model option for general Modbus-compatible devices. 


Screenshot of the Add Device Wizard in KEPServerEX, showing the configuration interface for adding a new device with 'Modbus' selected as the device model.

Figure 7. Modbus as Type of Device


Device IDs are specified as <HOST>.XXX. For this case HOST is the SME’s IP address. XXX is the Modbus Bridge Index, a number from 0 to 255. Since KEPServer and the SME are directly connected via Ethernet, the Modbus Bridge Index should be set to 0.


Screenshot of the Add Device Wizard in KEPServerEX, displaying a field to specify the device's driver-specific station or node ID, with an example value '<192.168.3.6>:0' entered and a 'Next' button to proceed

Figure 8. Device Modbus ID



For Rheonics SME, the Modbus Port is 502. It cannot be changed by the user. If a different port is needed, contact Rheonics Support.



Screenshot of the 'Add Device Wizard' in KEPServerEX showing configuration options for specifying the port, IP protocol, and socket timeout for Modbus communication. The default port is set to 502, the IP protocol is TCP/IP, and 'Close Socket on Timeout' is enabled

Figure 9. Default Port 502 for Modbus

 


The Modbus Data Access and Data Encoding Settings configurations define how data is accessed and encoded for communication with Modbus devices. These settings define address conventions, bit-level access, supported Modbus functions, and byte order. The options for Figure 10 and Figure 11 are the default values and will work for Rheonics Sensors.



Screenshot of the 'Add Device Wizard' in KEPServerEX showing data access settings for Modbus communication. Options include enabling or disabling zero-based addressing, zero-based bit addressing, holding register bit writes, and Modbus functions 06 and 05 for single register and coil writes


Figure 10. Data Access Settings

 


Screenshot of the 'Add Device Wizard' in KEPServerEX showing data encoding settings for Modbus communication. Options include enabling Modbus byte order, first word low, first DWord low, Modicon bit order, and treating longs as decimals.

Figure 11. Data Encoding Settings



Click Finish to end the New Device configuration.


Screenshot of the 'Add Device Wizard' in KEPServerEX showing the configuration summary for a new device.

Figure 12. End of New Device Configuration

 


4.3 Creating Data Tags

Once the device has been added, the user can create as many tags as Input Registers needed. The Input Registers available are shown on Rheonics Support Portal: Modbus TCP - Input Registers. For this example, Median Viscosity (Float32) will be selected.


 Screenshot of KEPServerEX showing the 'Connectivity' hierarchy with 'ChannelModbus' and 'SME,' and a prompt to 'Click to add a static tag' in the main panel

Figure 13. Data Tags Creation


Make sure to set the correct address and select the appropriate data type for Viscosity, as shown in Figure 14. Rheonics input registers use two data types: Float32 and SInt16. For Float32, choose "Float" as the data type; for SInt16, select "Word."


Screenshot of KEPServerEX showing data tag configuration. The 'Property Editor' for the tag 'Viscosity' is open, displaying properties like address (300040), data type (Float), and scan rate (100 ms).

Figure 14. New Data Tag Configuration



It's possible to import and export CSV files to manage predefined tags. By pressing Export, users can save the currently created tags as a backup. Pressing Import allows users to add new tags from the imported file.


Figure 15. Importing Tags from CSV File

 


Figure 16 shows the tags for viscosity, temperature, and density, created for both Float and Int16 data types by importing a CSV file (SME.csv). This CSV file contains predefined configurations for the three main Rheonics parameters and will work with KEPServer's default configuration settings or if the article's guidelines are followed.

 

Screenshot of KEPServerEX showing a list of created tags under the device 'SME' in 'ChannelModbus.' Tags include Density, Viscosity, Temperature and their respective addresses, data types, scan rates, and descriptions

Figure 16. Tags Created on KEPServer



4.4 QuickClient

The Quick Client in KEPServerEX is a tool used to test and monitor the tags that the user has configured. It allows users to verify if the setup process was successful. To access it, select the Quick Client option from the navigation bar. A new window will open with several options. 


When clicking <Channel Name>.<Device>, the tags that were created will be displayed. If live data for the configured registers appears and is continuously updating, it indicates that the configuration is correct and that the data type and input registers are properly set up.


 Screenshot of KEPServerEX showing created tags under 'ChannelModbus.SME,' including tag details like address, data type, and scan rate. The Quick Client window displays live data updates for the tags, confirming proper configuration of data types and input registers

Figure 17. Tags Created on KEPServer

 


5. Troubleshooting

This section addresses common issues with input registers, connectivity, and Modbus configuration. Users can follow these steps to identify and resolve typical Ethernet/Modbus communication issues with Rheonics Sensors.

 

Electronics Issues
No LED lights, display, or output signals1. Check power supply and cabling
Viscosity is not stable2. The sensor is not fully submerged in the liquid 
Probe Issues
NaN values are displayed on the RCP software1. Check wiring from the probe to SME is correct.
2. Measure the internal resistance of the probe. Contact Rheonics support team for detailed instructions.
Communication Issues
No data is visible1. Try to reset the SME and/or restart the devices
2. Try to use the ping command to get a response from either the KEPServer or SME. 
3. Verify there is no duplicated address in the network
4. Check all settings are correct with the RCP
5. Check that communication settings (protocol, port 502, network adapter, and device IP) are correct on KEPServer side
6. Look for hardware malfunction, broken cable or bad Ethernet Port 
Data issues
The measured value is different from my reference standards1. If the fluid is non-Newtonian, the viscosity readings may vary due to the fluid's characteristics (shear rate). For more information: Non-Newtonian fluid viscosity measurement with inline viscometer SRV
Wrong parameter reading1. Verify Modbus register address. It might be off due to 0/1 indexing.
2. Verify the data type matches the expected configuration.
Sensor Status does not match any bit from the sensor status table1. Sensor status byte is swapped.
Density value displayed is always constant1. The density value on the SRV is constant value set with the RCP software.


 

6. References


  1. Rheonics, "SRV Inline Viscometer." [Online]. Available: Rheonics SRV » inline online Viscometer for fluid viscosity monitoring . [Accessed: Nov. 27, 2024].
  2. Rheonics, "SRD Inline Density Meter." [Online]. Available: Rheonics SRD » Density Meter inline online specific gravity concentration.  [Accessed: Nov. 27, 2024]. 
  3. Rheonics, "Electronics and Communication." [Online]. Available: Electronics and Communication » rheonics :: viscometer and density meter. [Accessed: Nov. 27, 2024].
  4. Rheonics, "Modbus TCP Input Registers." [Online]. Available: Modbus TCP - Input Registers . [Accessed: Nov. 27, 2024].