Which Rheonics products are related to this Article? This Article is based on the use of the SME (Smart Module Electronics) from SRV, SRD, DVP and DVM. Hence it can be used for any of Rheonics sensors.
What is this Article helpful for? This article helps to guide the user on how to correctly receive data from the SME into the DataFEED OPC Software via Modbus TCP Protocol.
This software solution enables communication between OPC devices and the cloud. It provides access to the most commonly used PLCs in the industry. The software collects data from a variety of sources, such as OPC UA servers, PLCs, classic servers or SQL databases. As soon as the data is collected, users can decide where it should be sent. For example, to another SQL database or exchange OPC UA with OPC Classic, etc.
This software uses the terms Data Source and Data Destination to identify who defines and uses data items. This doesn’t define the communication direction, which is bidirectional.
- DataFEED software installed
- Rheonics Sensor Electronics (SMET) with Ethernet and Modbus TCP enabled
- Ethernet on SMET should be set to
a Static IP through RCP
- IP address of the Rheonics SMET - this can be read out from the SMET using RCP software
Figure 1: Communication diagram for Rheonics sensor-PLC and PC.
Configuration steps to receive SMET data through DataFEED OPC Server Modbus
1. Open DataFEED software, the software window should look like this:
Figure 2: Data Source selection tree.
2. On the left side, you will find a navigator with possible data sources, select “Modbus”.
Figure 3: Modbus communication parameters for SMET device.
Data sources from external devices will appear in the Controllers and Devices section. A unique name is assigned to each communication method in the Name Column. Listed in the second and third columns are the Type (Modbus) and Address (IPv4, hostname, or IPv6). The Parameters column displays connection attributes.
3. If there aren’t any previous configurations, it will be blank like the following image. To create a new data source, press “Add a new data source” (Ctrl+A).
Figure 4: Create a data source configuration.
4. When click-in on the “Add a new data source” button, the Controller/Device Connection Wizard will appear. The connection name can be assigned in this page. Set the connection as “Active” with the flag up, and deactivate the simulation option, click next.
Figure 5: Connection settings.
5. In the next window the SMET IP Address must be entered. This IP address can be viewed or configured using the RCP software. The address format and advanced options can be left as shown. Then click the Next button.
Figure 6: Communication settings.
6. The next window shows the PLC Protocol Settings. Rheonics' factory default slave address for the sensor is 255 and must be set accordingly. The start address is 0. Check the boxes for Use Word Swap and Use Item Unit ID. The first one enables 32-bit double words, and the second allows the slave address to be specified via item syntax (seen later).
Figure 7: Modbus protocol settings.
7. In the next wizard window, left settings as default. Check the availability of the device by clicking the check icon on the right.
Figure 8: Extended settings.
8. Upon successful connection, a pop-out window will appear. Click Ok to continue.
Figure 9: Connection test.
9. The Address Space Definition window displays the connection's data items in a tree view. Create items by pressing the “Add a new Item” button (Ctrl+A).
Figure 10: Items tree for the data source.
There are three categories for variable type when a new item is added: root, node, and tag. Root (in the example: Rheonics_1) has the connection name and can't be modified.
10. Choose Node as the Type, then rename it if necessary and click Ok.
Figure 11: Create a new Node item.
11. Then, create a Tag type Item and name it. The Tag Syntax needs to be specified. For this example, set the Syntax to ERR40. Click Ok, note that the Data Type is updated after clicking ok.
Figure 12: Create a new Tag item.
The Modbus Item syntax has the following order:
Figure 13: Modbus item syntax (dataFEED User Manual).
- <Area> defines where the data is received from with an Abbreviation. These are the following:
I, E, DI or DE
A, O, Q, DA, DO or DQ
ER or IR
Register Holding Register
Table 1: Area definition for data syntax.
- <Data type> defines the variable type with the following syntax.
Table 2: Data Type definition for data syntax.
Start address specifies the starting address at which the read or write will start. For Rheonics SMET the measurement values start at address 40.
Bit number must be specified when the data type is bool.
In this case, the syntax ERR40 means: Parameters come from an Input Register, are Real (Float) type and start from address 40.
12. The hierarchy tree should look like the figure below. With this, we have created one tag that points to address 40 from the Input Register, which is Viscosity Median. Some of the Registers, Parameters and its address can be found in Rheonics Support Page.
Figure 14: Project Tree View with Tag.
13. Restart the application and save changes.
Figure 15: Restart and save the configuration.
Importing Configuration Files
Instead of creating tags one by one, it is possible to import the configuration of the tag with an external Text File (.txt), including their name and syntax. Follow the next steps to do that.
1. In the Address Space Definition, click Import (Ctrl+I).
Figure 16: Import tags configuration.
2. Select the Text file to import. The “Import directly to root node” box can be selected.
Figure 17: Import configuration file.
The Text file can have the following content, find the file attached below.
3. Click Finish to finalize the import.
Figure 18: Import results.
4. The imported data should be shown as in the following figure. Finish the configuration.
Figure 19: Final data hierarchy.
5. Restart the application and save changes.
Figure 20: Restart and save the configuration.
Configuration File Example: