Setting up: Device Ethernet and TCP/IP notes
Table of contents |
---|
• Explanation of TCP/IP v4 |
Explanation TCP/IP v4
TransmissionControlProtocol/InternetProtocol (TCP/IP) is the name given to a bundle of procedures from the 1970s, which defines a packet-mediated forwarding of data. This mediation procedure is used in contemporary everyday communication, in particular on the Ethernet physics (e.g. Fast Ethernet, Gbit) and the hardware-orientated MAC addressing normally used there. The basic principles of this set are
- packets of user data of 64 to 1486 bytes (special forms are not uncommon) are sent from a transmitter to one (unicast) or more (multicast, broadcast) receivers.
- In IPv4 the source and destination addresses each consist of 4 bytes separated by a point, e.g. "192.168.1.1" or "123.001.002.001".
Note: IPv6 extends the address space by a further 2 bytes and will replace IPv4 in the mid-term. - There does not have to be a direct physical connection (cable) between transmitter and receiver; instead, intelligent packet mediators analyze the source and destination addresses and forward the packets (key words: routing and switching). This results in delays and possible loss of data.
- The IP is a bi-directional reconfirmed communication, because the receiver acknowledges the receipt of data to the transmitter. This causes a further communication load and increased transport time. Lost data can thus be repeated automatically.
- UDP (User Datagram Protocol) can also be used instead of IP. It works without reconfirmation, lost data must then be requested again at a higher communication level. In return, less time is required for data communication.
The Windows operating system manages TCP/IP communication with its Ethernet adapters in the so-called NDIS network mediation layer. The adapter settings can be accessed via the Windows Control Panel->Network Settings or the Windows CE CXconfig tool from Beckhoff.
These circumstances make TCP/IP-supported communication unsuitable for an application with higher real-time requirements, but very suitable for flexible (variable) connections via many hubs (intermediate stations) with an arbitrarily high data traffic.
Application CU2508
Two methods are available if TCP/IP frames are to be transmitted via the CU2508 (with no real-time requirement):
- one port of the CU2508 is defined as a dedicated TCP/IP port.
Hence, it works for the operating system as an "extension" of the port to which the CU2508 is connected, with the MAC and IP data of the Gbit port used according to the operating system data.
Under TwinCAT with its integrated CU2508 driver, this port is then connected to the Windows NDIS mediation layer in the Windows operating system. Real-time traffic is then no longer possible via this port; the CU2508 works as a transparent frame transporter. - the CU2508 is generally set to EoE operation (Ethernet over EtherCAT), “via EoE”.
Then the integrated virtual EoE switch is activated in the CU2508 system and the connection is established to the EtherCAT systems connected to the CU2508. In the case of EoE, Ethernet frames are transported within acyclic EtherCAT telegrams by mailbox procedures, fragmented if necessary in the case of overlength. The EL6601 or EL6614 can be used as an EtherCAT/Ethernet interface.
The MAC and IP data of the Gbit port used according to operating system data are used for addressing.
This procedure is usable only for connected EtherCAT circuits.
The setting is made in the Ports tab for the CU2508 and does not change the mode of operation of the CU2508, but only the handling of TCP/IP Frames in the CU2508 driver.
It is not possible to operate the CU2508 as an independent switch with forwarding rules according to MAC rules (switch) or IP rules (router).
Settings for the dedicated TCP/IP port
The specified CU2508 port (100Mbit/FastEthernet) is then connected directly to the Windows network mediation layer; real-time operation of this port is no longer possible. Free TCP/IP network traffic is then no longer possible on the other CU2508 ports.
Notes
- The IP and MAC address of the used Gbit port are used for TCP/IP communication. Address area/subnet mask must therefore correspond to the addressed devices.
In the example in fig. Declaration of a CU2508 downlink port as a TCP/IP port, the address area is under the IP mask 255.255.0.0; therefore, all devices must have an IP address from the area 192.168.x.x. - These settings are changed via the Windows Control Panel -> Network Settings for the adapter. The CXconfig tool must be used under Windows CE.
- The CU2508 works transparently; all procedures for the address assignment (DHCP, BootP,…) can be used.
- The throughput depends on the extent of utilization of the downlink port and the Windows network mediation layer.
EoE settings
The virtual EoE switch of the CU2508 driver is tied into the CU2508 Ethernet adapter and accessible in the Switch tab of the RT Ethernet adapter. The VirtualEthernetSwitch is activated automatically if devices that use Ethernet-over-EtherCAT are used in the lower-level EtherCAT systems - the numbers of max. frames and ports are adapted accordingly.
Notes
- The IP address of the used Gbit adapter and the subnet mask is used for communication. The EoE devices (printer, scanner, remote PC etc.) must therefore have their address within this area.
- The throughput depends among other things on the EtherCAT cycle time, the number EoE devices and the extent of utilization of the individual connections. Attention must be paid to the notes regarding this in the documentation for the EoE devices.
- The EoE system can be connected to the NDIS layer via the switch "Connect to TCP/IP Stack" (fig. Flow of data when using the CU2508 as an EoE switch, A).
- IP routing is a function inherent to the operating system for the mediation of IP telegrams even between networks that do not lie in the same subnet. Thus, for example, between the devices 192.168.1.1 and 172.168.1.1, which each lie in the mask 255.255.0.0.
This function is activated with "IP Enable Router" (fig. Flow of data when using the CU2508 as an EoE switch, B). It is also available under Windows CE (CXconfig tools).
The switch settings for the EoE mediation are accessible in the System Manager, see fig. EoE switch settings. The limit values are adapted automatically to the types and numbers of the devices during the creation of the configuration.
Name | Explanation |
---|---|
Max. Ports | Number of ports of the virtual switch. Each EoE device (e.g. EL6601, AX5000) in the lower-level EtherCAT systems occupies one port. |
Max Frames | Max. number of temporarily stored Ethernet frames. Can be increased if there are noticeable throughput bottlenecks. |
Max MAC Ids | MAC addresses of the connected devices stored in the internal Switch-Look-Up table. Must be larger than the maximum number of Ethernet devices ever connected to all systems. |
Connect to TCP/IP Stack | Connects the EoE switch to the internal Windows NDIS network layer |
IP Enable Router | This function is provided by the Windows operating system and is accessible via the registry or, in the case of embedded CX systems under Windows CE/WEC, via the CX-config tool. If activated, the NDIS network layer also mediates IP packets whose IP addresses do not correspond to the subnet mask . |