News:

  • March 23, 2023, 06:58:25 AM

Login with username, password and session length

Author Topic: Ecom 100 modbus  (Read 3818 times)

MKL

  • Full Member
  • ***
  • Posts: 42
Ecom 100 modbus
« on: May 14, 2007, 03:40:43 PM »
in one of the firmware releases i read the following:

The Hx-ECOM100s now support 4 concurrent sessions when operating as a Modbus TCP/IP client (earlier versions only supported one active TCP/IP session).

what does this mean? i can only access with 4 other plc at the same time this plc?


Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 662
  • Hmmm...
    • Host Engineering, Inc.
Re: Ecom 100 modbus
« Reply #1 on: May 14, 2007, 05:24:00 PM »
MKL, that statement does not mean it can only talk to 4 other slaves. It means that it can have only 4 TCP connections open simultaneously. If a 5th one is opened, then the ECOM100 would have to close one of the others.

To help you better understand a long answer with an example will help: Let's say the ECOM100 is going to read inputs from 2 slaves. What normally happens is he opens up a connection to the 1st slave:

ECOM100 --> SYN --> SLAVE1 (ECOM100 says "Let's connect / synchronize")
ECOM100 <-- SYN/ACK <-- SLAVE1 (Slave1 says "OK")
ECOM100 --> ACK --> SLAVE1 (ECOM100 says "Done")

Now they are connected using a TCP connection. Now the ECOM100 can do a Modbus TCP request.

ECOM100 --> Modbus request --> SLAVE1 (ECOM100 sends Modbus function code)
ECOM100 <-- ACK <-- SLAVE (Slave1 acknowledges that he heard the request)
ECOM100 <-- Modbus response <-- SLAVE1 (Slave1 sends data as requested)
ECOM100 --> ACK --> SLAVE1 (ECOM100 acknowledges that he got the data)

At this point, if the ECOM100 needed to talk to the 2nd slave, the older firmware would just close the connection to the 1st slave, like this:

ECOM100 --> FIN/ACK --> SLAVE1 (ECOM100 says, "Let's close connection")
ECOM100 <-- FIN/ACK <-- SLAVE1 (Slave1 says, "OK to close connection")
ECOM100 --> ACK --> SLAVE1 (ECOM100 says, "Done").

Now the ECOM100 would open up a connection to the 2nd slave using the exact same procedure above. This is the way the older firmware worked.

This is a common way to exchange data via Modbus TCP. The problem arose when we were working with Festo valves as slaves to the ECOM100. If the ECOM100 closed down the connection (FIN/ACK) to the 1st Festo slave so he could talk to another Modbus slave, then the Festo valve slave would assume that he had lost his master and would then shut off his outputs! All other slaves we tested with the ECOM100 did not react this way. The other vendors of Modbus TCP slaves didn't mind the closing of the connection and things continued as outlined above.

Thus, to make the ECOM100 work with slaves like the Festo, we had to make a change to the firmware so that it could have as many as 4 connections open simultaneously. What this means is that if you are using the ECOM100 with a Festo valve slave (or any other slave that happens to want to shut its outputs off if the TCP connection is terminated) then you could only have 4 such slaves connected to the same ECOM100 before you experienced outputs shutting off!

So the way the ECOM100 behaves now is that it will open up a connection to talk to 1st slave, then another simultaneously to talk to a 2nd, then a 3rd and then a 4th; all without closing any connections. However, if a 5th one is desired, then the ECOM100 will simply close the connection to the 1st slave. Like I said, we've never seen this adversly affect any other Modbus TCP slave besides the Festo valve.

Thus, the ECOM100 could conceivably talk to as many Modbus TCP slaves as you want (hundreds!) as long as they are not Festo valves.  :)

Does that make sense?
There are two types of people in the world; those that can extrapolate from incomplete data sets.

MKL

  • Full Member
  • ***
  • Posts: 42
Re: Ecom 100 modbus
« Reply #2 on: May 15, 2007, 04:56:22 AM »
yes, it cleared up a lot of things :)

i was worried it was limited to 4 slaves.

thanx for the clear explanation