Skip to main content

Configuring the PROFINET Controller

Tip

We recommend that you configure a static IP address in the operating system for the used Ethernet adapter.

Windows

The following configuration steps are necessary for standard-compliant behavior in Windows:

  1. When using CODESYS Control Win:

    Install the Npcap software (for example included in the Wireshark setup).

    Important

    This note is valid only for CODESYS versions through SP18.

    Install the WinPCap software.

    By default, Npcap is also installed with the Wireshark installation. You need to disable this option in the Wireshark setup because Npcap must not be installed on the system.

    When using CODESYS Control RTE:

    WinPCap or Npcap is nor required. Install the supplied, specially adapted Ethernet drivers in the Windows Device Manager. The respective runtime components need to be enabled in the runtime configuration.

  2. Restart the system if you have added a new Ethernet adapter to the system. Otherwise the adapter Ethernet adapter may not be found. In this case, the driver displays the ErrorFindEthernet error on the Status tab.

  3. In the Windows Control Panel, set a fixed IP address for the Ethernet adapter to be used.

    Caution: You must not use an IP address from the address range for automatic assignment (169.254.x.y). Instead, use the IP address from a local subnet (for example,192.168.0.x / 255.255.255.0).

Linux

The following configuration steps are necessary for standard-compliant behavior in Linux:

  1. Add the following two settings to your CODESYSControl.cfg file:

    [SysEthernet]
    Linux.PACKET_QDISC_BYPASS=1
    Linux.ProtocolFilter=3

    This setting Linux.PACKET_QDISC_BYPASS=1 allows the queue disciplines (QDISC) of Linux to be bypassed, which is necessary for a better real-time Profinet. Note: If your system does not support bypassing QDISC, then set this option to 0.

    The additional setting Linux.ProtocolFilter=3 disables the protocol filter for EtherCAT. When the filter is enabled, the PROFINET Controller does not receive a PROFINET RT protocol.

  2. Configure a fixed IP address.

    Configuration in /etc/interfaces:

    auto eth0
    iface eth0 inet static
    address 192.168.0.1
    netmask 255.255.255.0

    Configuration of a static IP address in dhcpcd sudo nano /etc/dhcpcd.conf:

    interface eth0
    static ip_address=192.168.0.1
  3. If the "VLAN" Linux package is not installed on the Linux system by default, then install the package.

    sudo apt-get install vlan  # VLAN-Paket installieren
    sudo modprobe 8021q        # 8021q Kernelmodul laden

    The module can be loaded automatically by means of the command sudo su -c 'echo "8021q" >> /etc/modules' in order for you not to load it manually each time the system is restarted.