Profinet Device

Linux

 

The following configuration steps are necessary in Linux for a stan­dard-compliant behavior (example here for Debian/Raspi) :

  1. In the CODESYS project, clear the Adjust Operating System Settings option on the Ethernet adapter device.

  2. Switch off the protocol filter and permit the setting of the IP address in the configuration file (*.cfg) of the CODESYS runtime:

    [SysEthernet]
    QDISC_BYPASS=1
    Linux.ProtocolFilter=3

    [SysSocket]
    Adapter.0.Name="eth0"
    Adapter.0.EnableSetIpAndMask=1

  3. Configure the operating system so that the Ethernet adapter starts without the IP address in promiscuous mode. Promiscuous mode is no long necessary in Runtime V3.5 SP13 and later.

    Configuration via /etc/interfaces

    auto eth0
    iface eth0 inet manual
    pre-up ifconfig $IFACE promisc up
    post-down ifconfig $IFACE promisc down

    If necessary, deactivate the "Zero Conf" services, such as the avahi daemon: update-rc.d -f avahi-daemon remove

    Configuration via dhcpcd sudo nano /etc/dhcpcd.conf

    Example of a static IP configuration:
    interface eth0
    static ip_address=0.0.0.0

  4. If the "VLAN" Linux package is not installed on the Linux system by default, then install the package.

    sudo apt-get install vlan  # Install VLAN package
    sudo modprobe 8021q        # Load 8021q kernel module

    The module can be loaded automatically via the command sudo su -c 'echo "8021q" >> /etc/modules' so that it does not have to be loaded manually each time the system is restarted.

Windows

 

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

  1. Install the WinPCap software (for example included in the Wire­shark setup).

    This is required only when using CODESYS Control Win V3. When using CODESYS Control RTE V3, WinPCap is not necessary.

  2. Restart the system if you have added a new Ethernet adapter to the system. Otherwise the adapter may not be found. In this case, the driver shows the "ErrorFindEthernet" error in 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).

  4. Setting the IP address in the config file of the CODESYS runtime is permitted.

    [SysSocket]
    Adapter.0.Name="Profinet Adapter"
    Adapter.0.EnableSetIpAndMask=1
    Adapter.0.ipaddress=
    Adapter.0.subnetmask=

  5. Start CODESYS Control Win V3.

    At the initial start, some settings for the adapter specified in step 3 are applied in the Windows Registry. These are effective after the system has restarted.

  6. After restarting the system, check again in the Windows Control Panel whether an address from the address range was used for automatic assignment for the adapter. If this is the case, then use an address from the local subnet.

  7. Restart CODESYS Control Win V3.

  8. In the CODESYS project, clear the Adjust Operating System Settings option on the Ethernet adapter device.

VxWorks

 

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

  1. In the CODESYS project, clear the Adjust Operating System Settings option on the Ethernet adapter device.

  2. Permit the setting of the IP address in the configuration file (*.cfg) of the CODESYS runtime. No IP address should be set initially for this adapter.

    [SysSocket]
    Adapter.0.Name="eth0"
    Adapter.0.EnableSetIpAndMask=1
    Adapter.0.ipaddress=
    Adapter.0.subnetmask=

  3. Configure the operating system so that the Ethernet adapter starts without the IP address in "promiscuous mode". To do this, you have to add these entries to the startup script (for the desired adapter):

    ifconfig ("gei0 promisc")
    ipAttach 1,"gei0"

Windows CE

 

The PROFINET IO device can be operated here only with a preset, fixed IP address.

  1. In the CODESYS project, clear the Adjust Operating System Settings option on the Ethernet adapter device.

  2. Do not permit the setting of the IP address in the configuration file (*.cfg) of the CODESYS runtime.

  3. Select the Use Project Parameters option in the General tab.

See also