6/10/2008 2:08 PM | |
Joined: 1/17/2007 Last visit: 8/21/2024 Posts: 1545 Rating:
|
I am having a problem whereby I am trying to open a TCP connection to CP443-1 with S7 as server and PC as client. However, the client always fails to connect saying that the connection was closed by the server. I have tried several PC client applications and they all fail with the same problem. With theS7 as a client (with active connection establishment checked) and the PC as a server (running a server application), the connection is fine and communications are possible. As a test, I used another PC as the server (running the same server application as above) and my PC still using the client application that the S7 refuses the connection from. The connection opened fine and communications were possible. So I did some probing with a network analysis tool. According to the TCP specification the following is the sequence for establishing a TCP connection:- Client ------------ SYN ----------> Server Client <------ SYN, ACK ------- Server Client ------------ ACK ----------> Server (Connection now open) This sequence is seen for the PC to PC and PC to S7 case. However, for the PC to S7 case, the Server (S7)immediately after receiving the ACK from the client send 1 or 2 SYN, RST responses, which indicate that it is closing the connection, which rather unsurprisingly causes the client to fail. Please see attached screen captures from network analyser: NetPro1 & NetPro2 show the configuration of the connection. PC to PC shows the the PC to PC sucessful connection open (plus, additionally, a modbus TCP request/response and TCP connection close). PC to S7 shows the PC to S7 connection disconnect problem. I have tried experimenting with the "active connection establishment" check box. Presumably when the S7 is the client, this must be checked as it is the client that initiates the connection. For server, presumably, this box must be unchecked as the PC is the client and will attempt the connection setup. I would not make any sense to have this checked for a server as that would mean that both ends would try to establish the connection, which must fail. I tried this and, indeed, both ends tried to establish the connection with both failing as expected. So the check box should be unchecked. So what is the problem here? Why does the CP443-1 immediately terminate the connection once it has been opened? Attachmentpics.zip (363 Downloads) |
Programming today is the race between software engineers building bigger and better idiot proof programs, and the universe producing bigger and better idiots. |
|
Follow us on