This tutorial demonstrates how to run a PROFINET I/O-Controller on the RevPi Connect and exchange data with the KUNBUS Gateway PROFINET IRT Slave.
Prerequisites #
Hardware #
✓ 1 RevPi Connect+
✓ 1 RevPi Gateway Profinet IRT Slave
For detailed instructions about how to set up your system, see Getting Started.
Software #
✓ CODESYS Development System installed on your PC
✓ Proneta installed on your PC
To ensure a compatible system with suitable software, see Software Compatibility.
Overview #
The application writes:
-
[0,1,2..15]
to the first 16 Bytes of the output slot (kunbus_gw_9). -
[16,17…31]
to the first 16 Bytes of the PROFINET IRT Gateway process image output area.
Step 1: Configuration #
Network Configuration #
-
RevPi Connect:
▷ Configure the eth1
interface for PROFINET in /etc/dhcpcd.conf
with the following settings:
# Example static IP configuration:
interface eth1
static ip_address=192.168.0.11/24
-
Gateway PROFINET IRT Slave:
▷ Configure the KUNBUS Gateway PROFINET IRT Slave station name as kunbus-gw and IP as 192.168.0.15
using Proneta.
For detailed instructions refer to Manual RevPi Gateway PROFINET IRT.

Graphical overview of the PROFINET network:

Step 2: Configuring the PROFINET Network in CODESYS #
-
Scanning for Devices:
▷ Open the PROFINET Controller (PN_Controller) interface.

▷ Execute the Scan for Devices operation to identify the KUNBUS Gateway PROFINET IRT Slave.
-
Adding Device:
▷ Use the Copy All Devices to Project option to add the I/O device to the CODESYS device tree.
▷ Alternatively, manually add the KUNBUS-GW-ProfiNet module in the CODESYS device tree.

The following figure shows the CODESYS device tree overview of the example.

Step 3: Mapping Process Data #
-
Input Process Data:
▷ Map the process data for the input slot (kunbus_gw_1) as follows:
Input Bytes: First 16 Bytes.

-
Output Process Data:
▷ Map the process data for the output slot (kunbus_gw_9) as follows:
Output Bytes: First 16 Bytes.

Step 4: Testing the Configuration #
-
Running the application:
▷ Deploy and execute the application on the RevPi Connect.
-
Verifying data exchange:
▷ Check the input and output process image areas of the KUNBUS Gateway PROFINET IRT Slave using diagnostic tools like CODESYS or Siemens Proneta.
Note
|
|
This setup enables seamless data exchange between the RevPi Connect and the KUNBUS Gateway PROFINET IRT Slave.