What products are involved?
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 these Rheonics sensors.
What is the purpose of this article?
To give guidance on the integration of SME with a controller based on Codesys using a Profinet communication protocol.

1. General concepts

1.1 PROFINET overview

PROFINET is one of the most commonly used industrial communication protocols, it enables data exchange between controllers and devices based on international standards. To link all the components in its network, PROFINET requires standard Ethernet as the communication medium. It can operate on higher transmission speeds than other protocols and requires names and IP addresses for all devices.

1.2. CODESYS overview

CODESYS (Controller Development System) is a manufacturer-independent software for industrial automation technology. It follows the IEC-61131-3 standard to program intelligent devices and controllers. It is compatible with multiple device types and controllers. You can see which companies offer CODESYS-compatible devices here.

1.3. Prerequisite:

  • CODESYS software installed.
  • Rheonics Sensor Electronics (SME) with Ethernet and PROFINET enabled.
  • Rheonics GSD files
  • IP address of the Rheonics SME - this can be read out from the SME using RCP software.
  • CODESYS-compatible controller.

1.4. SME PROFINET connection

The Smart Module Electronics from Rheonics is PROFINET prepared if ordered. For that, the Ethernet RJ45 port is used. It can be connected directly to the client’s PC or through a router, switch or hub.

Figure 1: PROFINET Communication Diagram.

2. Configuration steps 

i. Select the controller device

With a Project created on Codesys, follow the next steps to set the controller and establish a Profinet Network.

1. Double-click on the Device (previously selected when creating the Project).

2. Click on "Communication Settings".

3. Select the Gateway by default.

4. Click on “Scan Network” after selecting the gateway, this will open a pop-out window.

5, 6. With the scan process, the controller connected to the network should be shown. Select it and click OK.

Figure 2: Set the controller.

    With the device added, settings would look like this:

Figure 3: Network with controller added.

    To update values received without the need to call parameters in the program, enable the following option.

Figure 4: Update variables option.

ii. Configure Ethernet Interface and Profinet Controller on CODESYS

1. Right-click on Device.

2. Select "Add Device".

3, 4. In the next window look for Fieldbuses, Ethernet Adapter and click on Ethernet. Finally, click on “Add device”.

Figure 5: Add the Ethernet adapter.

5. With Ethernet in our project tree now, double-click on it.
6. On General settings click on “Browse…”.
7,8. Verify the adapter “eth0” has the IP address from the controller (e.g. PLC), then click ok. This corresponds to the ethernet interface.

Figure 6: IP Address from the controller.

9. Right-click on Ethernet.

10. Select “Add Device”.

11, 12. On the next window, look for Profinet IO, Profinet IO Master, select PN-Controller and click “Add Device”.

Figure 5: Add the Profinet adapter.


With the PN_Controller added to the project tree, verify that device addresses on "Default Slave IP Parameter" and the previously shown ethernet interface of the PLC (steps 7,8) are in the same subnet.

Figure 7: IP Addresses for slaves.

3. Install GDS files on Codesys

Download the GSD files from Rheonics Support Page and install them in the CODESYS Device Repository with the next steps:

1. Go to "Device Repository" in the Tools Menu.

2. Select the "Edit Locations" option.

3, 4. Click on "Add" and indicate the path to the GSD files on the PC, write a name for the file, and click OK.

Figure 8: Add GSD files.

5,6. Right-click on “PN_Controller” and select “Scan for Devices”. 

7. Wait some seconds until the software detects all connected devices (SME). If you have one or multiple devices connected, you can click “Copy All Devices to Project” or individually select the ones you want to add and click “Copy to Project”.

Figure 9: Scan for devices.

Upon successful addition of the devices, they will appear in the Project’s tree. Verify each device has a unique IP address, station name and MAC address on the network. IP and MAC addresses on each device should be the same as the ones shown on the RCP software.

The station name is set by Rheonics for each sensor and can’t be changed. It has a standard format of: “Sensor Type-Sensor Serial Number”, for example: “SRV-B07-0102”, where SRV is the sensor type and B07-0102 is the sensor SN.

You can now download and run the project. With the program running, the read values should appear in the PNIO Module I/O Mapping Section of the added devices. Device Parameters show the 23 Parameters with their 5 measurements (see the list here).

Figure 10: Values shown while running the project.



Check for common problems with PROFINET and probable solutions at Profinet Troubleshooting 

Related articles

Diagnostics and Parameter Readings with Profinet 

Connecting the Profinet output 


[1]: https://www.codesys.com/the-system/codesys-inside.html 

[2]: http://rheonics.com/