Application for the serial Com-Server:
Connect Siemens Logo!® and Display Logo!® TD over the network
The cable length of just a few meters allowed for connecting a Logo!® controller to a Display Logo!® TD often makes interesting applications impossible. With the help of two Com-Servers you can get around this problem and tunnel the serial connection through the Intra-/Internet - with virtually no spatial limitations. The following application example takes you step by step through the necessary settings and adjustments using two Highspeed Industry Com-Servers, Art. No. 58631.
Step 1: IP assignment using easy start!
With just a few clicks in the WuTility inventorying and management tool, both Com-Servers are integrated into the respective network with IP address, subnet mask and gateway.
Step 2: Hardware connection and settings
In physical terms, communication takes place over an RS485 2-wire connection with echo suppression. The corresponding setting of the interface module in the Com-Server is as follows:
Switches 6 and 7 control the integrated resistor network for the termination. In addition to the line termination for the data bus, this ensures a defined level during the high-ohmic phases of the bus.
Since the pin assignments of the Siemens components and the Com-Servers are different, special adapters need to be created between both Logo!® and Com-Server, as well as on the opposite end between display and Com-Server. All the relevant information is contained in the Com-Server manual and the Logo documentation.
Step 3: Configuring the Com-Server
The transmission parameters are factory preconfigured in the Logo!® and in the display as follows and must be set correspondingly on both Com-Servers via telnet or Web Management:
Setup Port 0 -> UART Setup -> ...
... Data Bits=8
To ensure that datagrams for the serial protocol are sent discretely within a data packet in the network, the Network-Delay option in the Com-Server should be configured for 20-30ms.
Setup Port 0 -> TCP/IP Mode -> System Options -> ...
... Network Delay=2 (= 2 Ticks a 10ms)
TCP Client mode
The data transparency of the Com-Servers means detailed knowledge of the serial protocol between Logo!® and display is not required. When choosing the Com-Server mode the only important thing is that the display represent the initiating side of the connection, which means it makes sense to operate the Com-Server used here as a TCP client. In this mode, when there is incoming serial data the Com-Server automatically connects to the TCP server port of the partner Com-Server on the Logo stored at setup.
In addition to the network-side basic parameters IP address, subnet mask and gateway, as well as the mentioned serial settings, the following configurations must be made for TCP client mode:
Setup Port 0 -> TCP/IP Mode -> TCP Client -> ...
...Server Port=Local port of the TCP server (factory default = 8000 = port A)
... Server IP/URL=IP address or URL of the Com-Server on the Logo
These settings for TCP client mode are made ONLY on the display-side Com-Server!
If the destination Com-Server (=TCP server) on the Logo!® in the Internet is located behind a DSL terminal with dynamic IP address, instead of the IP address a DynDNS-hosted URL for example must be used. In this case a DNS server must be set on the client Com-Server on the display side. The following settings may need to be made in the router responsible for the network on the Logo!® side:
- Using NAT, the TCP port used here for the incoming connection must be rerouted to the IP address of the Com-Server on the Logo!®.
- If a dynamic IP address is used on the WAN side, the router must have a client for a dynamic DNS service such as DynDNS and be correspondingly configured.
Reconnect after connection dropouts and interruptions
To prevent hanging TCP connection, such as after forced interruption of the DSL connection or an infrastructure failure, the keep-alive function should be activated on both Com-Servers with a cycle of approx. 10s:
Setup SYSTEM -> Setup TCP/IP ...
... Keep Alive=10
Siemens and Logo! are registered trademarks of Siemens AG.