Technical Forum

SIMATIC Modbus/TCP

Modbus TCP/IP, redundant connection

Thread Starter: r_guareschi   Started: 9/28/2007 12:33 PM   Replies: 7

« Previous thread Next thread »
Page 1 of 1 (8 items)
  9/28/2007, 12:33 PM
Joined 1/28/2006
Last visit: 11/24/2014
Posts: 10
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 

I use the OPEN MODBUS TCP/IP Library for S7300/409  2XV9450-1MB00. I have a CPU 315-2DP with a single CP343-1 Lean as server. The remote DCS system has two client PCs  for a redundant communication.

My question is: can the single server answer to both the clients? or do I need a second CP?


thanks

Top
  10/1/2007, 6:31 PM
Joined 8/10/2006
Last visit: 11/5/2014
Posts: 297
Rating:
Rated: Excellent [4.07 out of 5 / rated 27 time(s)]. (27) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
I don't know how your remote DCS system is set up.
If each DCS client has a unique IP address, then your CP will see it as requests from two separate clients and answer each.
Top
  10/1/2007, 6:45 PM
Joined 5/19/2006
Last visit: 11/13/2014
Posts: 531
Rating:
Rated: Excellent [4.31 out of 5 / rated 80 time(s)]. (80) 
Users with special expertise supervising conferences
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
UnimogMan wrote:

If each DCS client has a unique IP address, then your CP will see it as requests from two separate clients and answer each.

I am not sure about this;
Since CP act as a server and listen on port 502 it can't server more then one passive connection (see my previous post)

Dec
Top
  10/2/2007, 8:44 AM
Joined 8/10/2006
Last visit: 11/5/2014
Posts: 297
Rating:
Rated: Excellent [4.07 out of 5 / rated 27 time(s)]. (27) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
It troubled me that a Modbus device would only allow a 1:1 connection on the port.  This flies directly in the face of the whole point to ethernet communications.

So I ran a test -- I took a Modbus/TCP server I had been working with (Not a S7-317-2PN/DP -- I'll try that tomorrow morning) and fired up Modbus TCP software from two separate clients.
Both communicated simultaneously.

My experience in both writing and debugging TCP communications is the port is opened and closed.  (I found this the hard way in a set of touchscreens that had severe latency problems in communicating with the controller) 
I haven't "sniffed" this session (both are communicating as I write), but I suspect that is what is happening.  The other possibility would be that the port opening is done in "promiscuous" mode, where it responds to TCP requests from different IP addresses.
The server device I'm using doesn't support Modbus over UDP, but some devices do support it, where opening and closing the port is unnecessary.

Mind you, this doesn't necessarily apply to the S7 communications, I'll follow up tomorrow with that.

Top
  10/2/2007, 9:34 AM
Joined 1/28/2006
Last visit: 11/24/2014
Posts: 10
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
The DCS system (ABB) has two PCs as client connected to the Modbus TCP/IP server at the same time. The PCs have two different IP.
Top
  10/2/2007, 10:40 AM
Joined 5/19/2006
Last visit: 11/13/2014
Posts: 531
Rating:
Rated: Excellent [4.31 out of 5 / rated 80 time(s)]. (80) 
Users with special expertise supervising conferences
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
UnimogMan wrote:

The other possibility would be that the port opening is done in "promiscuous" mode, where it responds to TCP requests from different IP addresses.

How do you setup the CP port in "promiscuous" mode?
No other clients can’t connect with the CP once the first client establish (the only one) passive connection with the CP.
The second client etc that tries to connect with the CP gets rejected unless the first guy closes the connection.
UnimogMan wrote:

Mind you, this doesn't necessarily apply to the S7 communications,...

For S7 communications (on RFC1006) although it’s using port 102 the connections are counted based on unique TSAPs (Actually this is the reason why you can't configure more then one passive connections on TCP because NETPro write TCP_SDB in the same way as for S7_SDB with LocTsap = port#).
The limitation is due to STEP7-NETPro not the CP. I changed TCP_SDB for two connections to have the same LocTsap = port_502 and the CP have accepted 2 connections on the same port astonished.

Dec



=== Edited by Dec @ 02.10.2007 10:46 [GMT ] ===


=== Edited by Dec @ 02.10.2007 10:45 [GMT ] ===


=== Edited by Dec @ 02.10.2007 10:43 [GMT ] ===


Top
  10/3/2007, 4:03 PM
Joined 1/28/2006
Last visit: 11/24/2014
Posts: 10
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
I cannot make tests now. Netpro leaves me to set up two TCP/IP communications on the CP343 on condition to use two various addresses as port. Will be able the two clients to communicate with my card  to the only IP with different ports?
Top
  4/29/2008, 10:06 PM
Joined 4/24/2006
Last visit: 11/12/2014
Posts: 423
Rating:
Rated: Outstanding [3.7 out of 5 / rated 43 time(s)]. (43) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello,
yes, it's possible.
In your configuration it must be at least one differentiating factor: either IP address or port number. If you want to use 1 CP, then you have to give 2 different port numbers in each of both TCP connections.

Tomcat
Top
Page 1 of 1 (8 items)
Actions