How many individual Modbus TCP devices and my A-B PLC talk to?

Hi,

I’m new to these devices, but it looks like your HMS-EN2MB-R product will do exactly what I need it to do… namely, to acquire data from a Gas Chromatograph that speaks Modbus TCP and import that data into my Allen-Bradley 5069-L320ER PLC. The problem is that I have three (3) gas chromatographs that I need to talk to and they are all on the same LAN.

How many different devices can be set up in a single HMS-EN2MB-R to talk to my master PLC?
I don’t think there will be too much data (probably around several hundred bytes from each device).

Can I use a single linking device to talk to all three chromatographs?

Thanks!

Hi Mitchell,

You can connect up to 64 Modbus TCP servers (slaves) to the HMS-EN2MB-R.

Keep in mind that this device needs to be configured using the Add-On Profile in Studio 5000.

We also have a “generic” Ethernet/IP version of this device which is configured using an internal web interface. (See AB9006).

Thanks for the quick answer!

To take this a step further, imagine I have 8 different systems that all talk Modbus TCP and I want to acquire data from each of them with my Allen-Bradley EtherNet/IP PLC. To make matters worse, they are all being supplied by different vendors and each are forced to use their own subnets.

Example: One system has been set up as 192.168.10.xxx, one is on 10.100.45.xxx, one is on 10.10.1.xxx, one is on 169.254.1.xxx, and so on. Now, apparently, I could set up those 8 systems in the Linking Device but how would you connect to eight different subnets with the two ports on the Linking Device?

Can a single external switch handle multiple subnets? In other words, could I just plug the Modbus TCP port of the Linking Device into a 16 port switch and all these different systems/devices will talk to the linking device without a problem?

The really big question: If that is the case, could I then just use a single 16 port switch and tie both the EtherNet/IP port and Modbus TCP port of the linking device right into the same switch? Would that work?

Thanks!

Hi Mitchell,

You would need to use a router or managed (layer 3) switch.

Modbus TCP follows the same rules as TCP/IP, so all devices need to be on the same subnet in order to communicate. So a device with IP address 192.168.10.x/24 (Subnet mask 255.255.255.0) cannot communicate with a device with IP address 10.100.45.x/24. If this subnet is private and not connected to other subnets, I suppose you could use a very large mask, like 255.0.0.0, for example, and then any device that start with 10.x.x.x could communicate with any other 10.x.x.x device.

Yes, you can use a simple (unmanaged) 16-port switch to connect all of your devices and the Ewon, but they need to be on the same subnet in order to communicate.

If for some reason you couldn’t change any of the IP addresses on your Modbus TCP devices, and you had 8 different subnets, you’d need to use routing to connect the devices. You could set up a managed switch to do NAT translation, for example, but getting into that is way beyond the scope of support for our device. In short, our device works just like any other TCP/IP device.

Yes, the Ethernet/IP side and the Modbus TCP side of the device can be on the same network. This device is essentially 2 different devices that share a common memory area to exchange data, so they can both be on the same network.

Kyle

I might not be asking this in the correct way.

Referencing page 18 of the EN2MB user manual:
hms-scm-1202-181.pdf (anybus.com)

I see that the Linking Device gets an address on the master subnet where the Allen-Bradley’s PLC resides (10.10.12.142 in the example). However, I don’t see any entry for the TCP/IP address on the Modbus TCP side (page 21). In the example, they leave the address as 0.0.0.0. This gives the impression that the MODBUS TCP devices are purely accessed via their MAC IDs.

So, despite the fact that the MODBUS TCP devices are addressed on 8 different subnets, would the linking device allow the AB PLC to connect to them and read data from them despite that? …or would a normal unmanaged switch somehow forbid that?

It does look like they skip over the Modbus TCP Client configuration in that example. The IP address shown as 0.0.0.0 is for a Modbus TCP Server, but that needs to be changed to an actual IP address.

They do go over the Client config on page 43:

image

If you needed to go through a router to reach a server on a different subnet, you would have to also enter the ‘Router IP address’ (a.k.a. default gateway).

To answer your question, Modbus TCP has to use TCP/IP and devices can’t be polled using their MAC addresses. The servers need to be on the same subnet as the client, or the traffic needs to be routed if a server is on a different subnet. For more information about Modbus TCP, check out:

and:

So, to clarify the answer to my original question…

The HMS Linking Device can talk to up to 64 individual TCP/IP addresses, but those addresses must reside in the same sub-net. If you want to talk to devices in other subnets, then a router (or other NAT device) must be used to translate a local address to the device in question. The HMS linking Device does not have any NAT or Routing capability.

Correct?

Correct. The Linking Device is not a router.

1 Like