Document toolboxDocument toolbox

Commissioning RevPi Gate PROFINET IRT - Device with CODESYS

In this example, we run a PROFINET IO-Controller on RevPi Connect and exchange data with KUNBUS RevPi Gate PROFINET IRT - Device. A PROFINET IO-Controller runs on RevPi Connect and exchanges data with PROFINET IRT Gateway.

The example is targeted for CODESYS Control for Raspberry Pi MC SL, e.g., article no.100274 (Connect+ 4 GB plus CODESYS Multi Core).

The application writes to the first 16 Bytes of the output Slot (kunbus_gw_9) the values [0,1,2…15]

Output 16 Byte Description: Output 16 byte
Module ID: 0x00000050
Usable in Slot: 1 – 8
Total Number of Input Bytes: 0
Total Number of Output Bytes: 16
Number of Submodules: 1

The application writes to the first 16 Bytes of the PROFINET IRT Gateway Process Image output area the values [16,17…31].

 Requirements

  • RevPi Connect

  • PROFINET Network Analyzer PRONETA Basic:

  • KUNBUS PROFINET IRT Gateway (PR100074) | https://www.kunbus.com/profinet-irt-gateway-module

  • CODESYS V3.5 SP17 Patch 3 or older

  • A CODESYS project with the name “PROFINET IO-Controller and PROFINET IRT Gateway” has been prepared and can be found as an example in the “Revolution Pi Library for CODESYS” driver folder. The driver is to download as shown above.

  • Network Switch

  • PiBridge Left

  Test setup

 

 

  • You must work in one subnet for the entire project. For this example, the subnet 192.168.1.X and the net mask 255.255.255.0 were used.

The eth1 interface of the RevPi Connect is configured for PROFINET in /etc/dhcpcd.conf with the following IP setting:

sudo nano /etc/dhcpcd.conf

enter the following declaration:

#Example static IP configuration interface eth1 static ip_address = 192.168.111/24
  • Configure the KUNBUS PROFINET IRT Gateway (IO-Device) Station name as “kunbus-gw” and IP as 192.168.0.15 using Proneta. Steps are mentioned below:

    • open Proneta- Siemens

    • click on Online

    • right click on kunbus-gw

    • click on set network parameter

    • select IP address and enter the IP address of your device, suitable for your network. For this example, we use 192.168.1.15

For detailed procedure, please refer to the User Manual Gateway Component for PROFINET.

  Configuration and Running the Application in CODESYS

  • Open CODESYS and open the project “PROFINET IO-Controller and PROFINET IRT Gateway”. The Project is completely prepared for you. You only need to make some Configuration and run the application.

  • Login to the controller RevPi → you can see that the connection is successful by the green indicator lights

  • Configure your “slave IP-Parameter” in PN_controller by entering a suitable IP address range for your setup

  • Select the suitable network interface for Ethernet

  • go to “login” in the online menu and launch the application in the “debug” menu. If the application is successfully commissioned, all lights are green, which means that there are no errors in your configuration. PRONETA will show automatically how your network is configuration, if not scan your network again in PRONETA.

 Verwandte Artikel