Starting up the device - Basic configuration
Leuze electronic
DCR 202i
38
8.3.4 Ethernet host communication
You can configure the connections to an external host system via the Ethernet host communication.
You can use both the UDP protocol as well as the TCP/IP protocol – in either client or in server mode. Both
protocols can be activated simultaneously and used in parallel.
• The connection-free UDP protocol is used primarily to transfer process data to the host (monitor
operation).
• The connection-oriented TCP/IP protocol can also be used to transfer commands from the host to
the device. With this connection, the data is backed up by the TCP/IP protocol itself.
• If you would like to use the TCP/IP protocol, you must also define whether the device is to operate as
a TCP client or as a TCP server.
UDP
The device requires from the user the IP address and the port number of the communication partner. In
the same way, the host system (PC/control) also requires the set IP address of the device and the selected
port number. By assigning these parameters, a socket is formed via which the data can be sent and
received.
Activate the UDP protocol.
Set the following values:
• IP address of the communication partner
• Port number of the communication partner
The corresponding adjustment options can be found in the webConfig tool:
Configuration > Control > Host > Ethernet > UDP
TCP/IP
Activate the TCP/IP protocol.
Set the TCP/IP mode of the device.
• In TCP client mode, the device actively establishes the connection to the superior host system, e.g.,
PC/control as server. The device requires from the user the IP address of the server (host system)
and the port number on which the server (host system) accepts a connection. In this case, the device
determines when and with whom a connection is established.
• In TCP server mode, the superior host system (PC/control) actively establishes the connection and
the connected device waits for the connection to be set up. The TCP/IP stack must be informed by
the user as to the local port of the device (port number) on which connection requests from a client
application (host system) are to be received. If there is a connection request and a connection is
established by the superior host system (PC/control as client), the device – in server mode – accepts
the connection. Data can then be sent and received.
With a device as TCP client, set the following values:
• IP address of the TCP server, normally the IP address of the control or the host computer
• Port number of the TCP server
• Timeout for the wait time for an answer from the server
• Repetition time for renewed communication attempt following a timeout
With a device as TCP server, set the following values:
• Port number for the communication of the device with the TCP clients
The corresponding adjustment options can be found in the webConfig tool:
Configuration > Control > Host > Ethernet > TCP/IP
Each device with Ethernet interface is uniquely identified via the MAC address assigned during
production. The MAC address is also listed on the name plate of the device.
If multiple devices are commissioned in a system, the MAC address of each installed device
must be correctly assigned, e.g., during programming of the control.