What products are involved?

Rheonics SRV viscometer, SRD density-viscosity meter, DVP gas density-viscosity meterand DVM HPHT density-viscosity meter


What is the purpose of this article?

This article describes the procedure to establish communication between a Rheonics SME (Modbus TCP) and a S7-400 with a PROFIBUS Interface through a Moxa converter (MGate 5111)


Table of contents

1. Overview

Rheonics viscosity and density meters bring fluid intelligence and process control to a broad range of customer applications. Each sensor is equipped with a Smart Module Electronics unit (SME), which drives the sensor, evaluates its response, and enables communication through all major communication protocols.

Rheonics sensors natively support industrial protocols such as Modbus, Ethernet/IP, Profinet, and HART. Other protocols, like Profibus, are supported through converters. These converters are also available from Rheonics pre-configured to work out-of-the-box with Rheonics sensors. The guide provides comprehensive step-by-step instructions for both configuring the converters for use with Rheonics sensors as well as using pre-configured converters from Rheonics. A comprehensive list of digital and analog communication options available on Rheonics automation instruments can be found here.

                                   

Figure 1.  Moxa MGate 5111. Image sourced from Moxa’s website. 

2. Communication Between SME and a PROFIBUS Interface

Customers often find themselves needing to connect devices that use different communication protocols, particularly when expanding or modernizing their systems. A common scenario occurs when an existing network running on PROFIBUS needs to integrate newer Modbus TCP devices, such as smart sensors, HMIs, or third-party control systems. Rather than going through a costly complete system overhaul, a protocol gateway provides a practical solution to bridge these networks.

The MGate 5111 gateways convert data from Modbus RTU/ASCII/TCP, EtherNet/IP, or PROFINET to PROFIBUS protocols. It provides a web console for easy configuration through a web browser using the HTTP/HTTPS protocol. It will be used to establish communication between a Rheonics SME, acting as a Modbus TCP Server, and an S7-400 PROFIBUS interface Figure 2. MGate 5111 Application Example
 

Figure 2. MGate 5111 Application Example


The SME network configuration must be set up to enable Ethernet communication between SME and MGate 5111. Detailed instructions for configuring the network are available at https://support.rheonics.com/en/support/solutions/articles/81000397449-verifying-the-network-setup-on-the-pc-where-the-rcp-software-is-installed

3. Moxa MGate 5111 Configuration

Log in to the Moxa device using its default IP address: 192.168.127.254 in any web browser. The default username is admin, and the password is moxa.

Figure 3.  MGate 5111 Login

3.1 Network Settings

Network Settings is where the IP Configuration, IP Address, Netmask, Default Gateway, and DNS can be modified. Make sure to enter the appropriate IP Address and Subnet Mask. It should be on the same subnet as the SME (same Ethernet network). An incorrect network configuration may prevent the device from communicating with others on the network.


Figure 4. MGate 5111 Network Settings

3.2 Protocol Conversion Settings

The MGate 5111 will act as a Modbus TCP Client when connected to Rheonics Modbus TCP Server, and as a PROFIBUS Slave when connected to the S7-400 (PROFIBUS). To configure the roles, on the Protocol Conversion screen select the correct protocols as shown in Figure 5. For this example, Rheonics SME is the Modbus TCP Server and the S7-400 the PROFIBUS Master.

Figure 5. MGate 5111 Protocol Conversion Settings

3.3 Modbus TCP Settings

On the Modbus TCP Settings screen, users can create Modbus commands or requests for the Modbus Server (Rheonics SME). Comprehensive Modbus TCP documentation, including details on registers, data types, response types, testing with Modbus Poll, and troubleshooting, is available on the Rheonics Support Portal: https://support.rheonics.com/en/support/solutions/folders/81000217062

Figure 6. Modbus Commands


Table 1 is extracted from https://support.rheonics.com/en/support/solutions/articles/81000297664-modbus-tcp-input-registers; these registers will be requested to the SME and mapped to PROFIBUS so the S7-400 can use them. Modbus commands for Viscosity, Density, Temperature, and Sensor Status input registers will be created for this example.


Address (Dec)

Register (Dec)

Length (Reg.)

Type

Description

Parameter 0

Viscosity Median

40

300041

2

Float32

Parameter 0 value as float

Parameter 1

Density Median

48

300049

2

Float32

Parameter 1 value as float

Parameter 2

Temperature Median

56

300057

2

Float32

Parameter 2 value as float

Sensor Status

Sensor Status Error

39

300040

1

 

Sensor Error Status

Table 1. Rheonics SME Input Registers


A new Modbus command is created by clicking the Add button, which opens the window shown in Figure 7. The Modbus command name, Rheonics SME IP Address, and Modbus register address must be configured. 


Figure 7. Modbus Command/Request Configuration


The user can create as many commands as needed. Figure 8 shows the configuration for the registers needed from the Rheonics Modbus TCP Server.


Figure 8. Modbus Commands Example

3.4 Profibus Settings

An ID for the PROFIBUS slave needs to be configured. For addresses between 0 and 99, the rotary switch is adjusted to the desired ID number. For addresses above 99, the rotary switch must be set to 99, and the ID is then configured through the web console.

Figure 9 shows the MGate 5111 rotary switches adjusted to an address of 5, where one dial represents the units (5) and the other represents the tens (0).

Figure 9. MGate 5111 Rotary Switches


In the PROFIBUS Settings screen, PROFIBUS modules are created and configured. The module type, size, and address are specified to correctly map the Modbus Registers to PROFIBUS.

Figure 10 displays the address set by the rotary switches, which is updated automatically in the web interface for addresses below 99.

Figure 10. PROFIBUS Settings


Figure 10 also shows an empty I/O Modules table, where new I/O modules can be added by clicking the "Add" button. After clicking the button, the window shown in Figure 11 will appear. The exact data type and length of the Modbus Registers mapped in the previous step need to be specified.

Figure 11. Creating PROFIBUS Module


The total size of all PROFIBUS modules is subject to a 244-byte memory limit, as indicated by the error message in Figure 12. This is an important limitation; for some applications, this capacity may be insufficient, and an additional gateway might be necessary.

Figure 12.  MGate 5111 PROFIBUS Memory Limit


The PROFIBUS modules required to map the Modbus registers for Viscosity, Density, Temperature and Sensor Status are shown in Figure 13

Figure 13. PROFIBUS Modules Example

3.5 I/O Data Mapping

The gateway's memory allocation can be verified by navigating to the I/O Data Mapping page. The MGate should automatically map the data on both sides of its internal memory. It is necessary that all Modbus commands are correctly mapped to the PROFIBUS modules and that the data sizes match.

Figure 14. IO Data Mapping


4. S7-400 Configuration: TIA Portal

4.1 Creating a New Project

In TIA Portal, a new project is created and a new device, the S7-400, is added. The exact article number must be selected to avoid any potential errors.


Figure 15.  New Project Creation


4.2 Importing a GSD File

A GSD file is a standardized text file that describes the communication parameters of a PROFIBUS or PROFINET device. For the Moxa MGate 5111, the GSD file includes details such as device identification, supported baud rates, modes (like Freeze and Sync), diagnostic data length, and I/O module configurations. This file is required to integrate and configure the MGate 5111 into a PROFIBUS network using TIA Portal. It can be downloaded from Moxa’s website.


The GSD file is imported by selecting Options and then Manage General Station Description Files (GSD), allowing the MGate 5111 to be added to TIA Portal catalog.


Figure 16. Adding a GSD File


The folder containing the GSD file must be selected, and TIA Portal will install it into the project.

Figure 17. Select GSD File Folder


4.3 Adding the Moxa to the Diagram

After the GSD file is installed, the new device (Moxa) is located in the Hardware Catalog under Other field devices. The device can be added to the program by double-clicking it.


Figure 18. MGate 5111 on Hardware Catalog


The new device can be seen on the Network view.

Figure 19. MGate 5111 on Network View


4.4 Profibus Configuration and Mapping

On the Network View, a new PROFIBUS network is created by dragging one port to another. The Moxa PROFIBUS ID that was set on the rotary switches/browser is configured in the parameters section (See Figure 20).

Figure 20. Mgate 5111 PROFIBUS Address


The PROFIBUS modules must be added as inputs in the project. Importing the GSD file adds the Moxa device to the TIA Portal catalog and provides information about available module types and sizes. However, the actual modules need to be manually added to the appropriate device slots. Figure 21 shows all the inputs that were imported to TIA Portal along with the MGate 5111.

Figure 21. PROFIBUS Module Inputs


The user can double-click or drag each input to add it to a slot. It’s important to verify that the type and size of each module match with the PROFIBUS mapping configured on the MGate 5111. This step is critical, as any mismatch between the inputs and the PROFIBUS modules might prevent communication.

Figure 22. MGate 5111 Slots


To use the data, we need to create new tags in TIA Portal. Select the address where the PROFIBUS module was stored (see Figure 22). Ensure that the correct data type is selected: choose "Real" for 2-word registers and "Word" for 1-word registers.


Figure 23. New Tags Creation on TIA Portal


The user can go online and set the PLC to "Run" mode. If everything is configured correctly, clicking on "Monitor All" should display data in each of the tags. These tags can then be used in the S7-400 control logic.

Figure 24. Going Online on TIA Portal

5. Rheonics Digital Signals

Digital communication protocols like PROFIBUS have significantly improved industrial communication by addressing the limitations of traditional analog signals. While analog communication, such as 4-20 mA current loops, has been a longstanding standard due to its simplicity and low cost for basic measurements, it falls short in several critical areas.

  • Multiple Data Transmission: Unlike analog signals that transmit only one piece of information per channel, digital protocols allow multiple data types to be sent over a single interface simultaneously.
  • Resistance to Electrical Interference: Digital signals are inherently less susceptible to electrical noise, making them ideal for industrial environments with high electromagnetic interference.
  • Scalability and Flexibility: Digital networks enable multiple devices to communicate over a single network cable or wireless connection. This scalability reduces wiring complexity and facilitates system expansion.

The choice between analog and digital communication ultimately depends on the application. However, for precise and dependable viscosity control, the use of digital communication is highly recommended. For detailed information on all available communication options for Rheonics viscosity and density meters, visit Communication: Rheonics Support.

6. References

  1. Rheonics, "SRV Inline Viscometer." [Online]. Available: https://rheonics.com/products/inline-viscometer-srv/
  2. Rheonics, "SRD Inline Density Meter." [Online]. Available: https://rheonics.com/products/inline-density-meter-srd/ 
  3. Rheonics, "Electronics and Communication." [Online]. Available: https://rheonics.com/electronics-and-communication/
  4. Rheonics, "Modbus TCP Input Registers." [Online]. Available: https://support.rheonics.com/en/support/solutions/articles/81000297664-modbus-tcp-input-registers
  5. Moxa, MGate 5111 Series User Manual, Version 1.2, September 2023. [Online]. Available: https://www.moxa.com/products.