Starting up the device – Basic configuration
Leuze electronic GmbH + Co. KG
DCR 258i
62
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 opera-
tion).
• 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 re-
ceived.
Ä
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 de-
vice 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