News:

  • February 05, 2023, 08:03:54 PM

Login with username, password and session length

Author Topic: DL06/ECOM100 - multiple PLC RX/WX pairs using Peer-to-Peer Modbus  (Read 545 times)

johnr

  • Full Member
  • ***
  • Posts: 39
I manage a network of PLCs that use RX/WX communications.  These PLCs have run without errors on an isolated network for many years, in a basic configuration:
 - no Ibox instructions used, just RX/WX
 - default ECOM protocols only (no Modbus) - the Module IDs in the RX/WX instructions are matched to Module IDs set in Netedit
 - master/slave polled operation - the RX/WX instructions only reside in the master

The item of note here is that there are multiple master/slave RX/WX clusters on this one TCP subnet.  The Module IDs for every ECOM adapter have always been assigned with non-zero values that are unique across the subnet, and this has kept the comms from getting mixed up.

So now we're migrating to the company managed network, and I'm converting the RX/WX traffic to Modbus using the Peer-to-Peer function in Netedit.  All module ID's were initially set to 0, considering that on this new network, all PLC-PLC connections and all DirectSoft PC-PLC connections should now be by IP address only.  At least so I've thought.  Everything works great, until...

I added the second RX/WX pair to the network.  In which case all communications of all types stopped working completely.  So I tried setting the Module IDs of the two PLC RX/WX masters to unique non-zero values in Netedit.  Not the slaves, just the masters.  The slaves, and a bunch of other PLCs not involved in RX/WX comms are connected on this VLAN subnet, and they all have Module IDs of 0.  No other changes, I just had to have Module IDs for the two masters.  Everything is running fine now.

So my question is, what is the best recommended practice here?  Are unique module IDs still needed in this case for the masters, even though I'm running Modbus for the RX//WX comms?  Or is there a configuration option that I missed?   Thanks

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 660
  • Hmmm...
    • Host Engineering, Inc.
Re: DL06/ECOM100 - multiple PLC RX/WX pairs using Peer-to-Peer Modbus
« Reply #1 on: February 15, 2022, 03:52:55 PM »
So my question is, what is the best recommended practice here?  Are unique module IDs still needed in this case for the masters, even though I'm running Modbus for the RX//WX comms?  Or is there a configuration option that I missed?   Thanks
First, I'm not sure why you switched to using Modbus TCP. You could still, for example, use just peer-to-peer comms between the ECOM100s. That would use UDP instead of TCP, which is, generally speaking, faster, since it doesn't have to maintain a TCP connection.

Previously, when your slaves utilized Module IDs, the master ECOM100 would use Ethernet II broadcast with embedded HAP (Host Application Protocol) to ask who has a particular Module ID. The ECOM100 slave that had that Module ID would respond and in that response would be its MAC address. The master ECOM100 would utilize that slave's MAC address and use a regular Ethernet II telegram with embedded HAP to communicate. The limitation here is most network administrators didn't appreciate the broadcast telegrams on the local network. Also, the ECOM100s couldn't communicate across bridges, routers, and some managed switches because the broadcast is blocked by default.

To get rid of broadcasting requires that the Module ID parameter (contained in the 1st LD instruction of the LD, LD, LDA, RX/WX ladder logic) which can only be a number from 0-90, be converted to an IP address. So, the first thing you must make sure of is that all your ECOM100s now have unique IP addresses and that they are on the same subnet, or if not, they all have access to a Gateway on the network. Secondly, you have to configure a peer-to-peer table in the master ECOM100s to convert the Module ID parameter in the LD instruction to an IP address. This peer-to-peer table can utilize UDP or Modbus TCP; your choice. Using UDP makes it easy because then there is no crazy Modbus Function Code and address mapping conversion needed.

Thus, when the LD, LD, LDA, RX/WX is executed in ladder logic to the proper slot number where the ECOM100 master resides, the ECOM100 receives this Module ID and checks to see if it has a peer-to-peer table entry for that Module ID. If it does, then it simply creates either a UDP telegram (with embedded HAP), or a Modbus TCP telegram. There is no need for a broadcast to discover the slave's Module ID. In this way, the slave's Module ID doesn't come into play at all. So it is OK for them all to be zero. Also, the Module ID of the master doesn't come into play at all either, because the response coming back from the slave is either going to be a UDP acknowledge telegram, or a Modbus TCP acknowledge telegram. The Module ID is not used.

I said all that to say this: It makes no sense that giving the master ECOM100s non-zero Module IDs should matter unless there is something else going on on the network that would use these Module IDs (HMIs? DirectSOFT links?).
There are two types of people in the world; those that can extrapolate from incomplete data sets.

johnr

  • Full Member
  • ***
  • Posts: 39
Re: DL06/ECOM100 - multiple PLC RX/WX pairs using Peer-to-Peer Modbus
« Reply #2 on: February 15, 2022, 05:31:59 PM »
Greg,  thanks so much for your detailed reply.  You've already confirmed a couple things, and given me some good info so I know what to try next.  I am going to respond to your comments in a couple of separate replies since there's a lot of weeds to muck through here.


You asked a very good question in the 1st paragraph (i.e. "why do this"), and then you wrote out my exact answer in the last two sentences of the 2nd paragraph:

The original network is simple (completely isolated, with un-managed switches, no routing involved) and is intended for PLC-PLC, HMI-PLC, and occasional DS traffic only.  The new network is a virtual LAN (VLAN), managed by the IT department, intended for plant-level SCADA and secure developer remote access.  It was my semi-educated guess that ECOM UDP traffic wouldn't play well in the new VLAN environment for the reasons you mentioned (if it worked at all), hence the plan to switch to Modbus TCP to minimize the issues there.

I should note that everywhere else in this network, we are using dual ethernet adapters in each Do-More, DL and C-More, so that we can keep low-level traffic away from the VLAN completely.  I would much rather do the same thing here, but the PLCs in question are DL06s and I don't have a free slot for dual ECOM-100s.  So I want to see if I can manage this particular PLC-PLC traffic on the VLAN instead of taking further steps, like migrating these controllers to BRX.  The PLC-PLC traffic is very low bandwidth by design, so speed isn't a problem.

johnr

  • Full Member
  • ***
  • Posts: 39
Re: DL06/ECOM100 - multiple PLC RX/WX pairs using Peer-to-Peer Modbus
« Reply #3 on: February 15, 2022, 06:05:03 PM »
With regard to what else might have been going on -

I did have at least one instance of DirectSoft running, connected to one of the RX/WX masters, when I initially connected the second pair of RX/WX PLCs on the network.   I verified that all of my DS communication configs use IP address, not Module Name, ID or MAC address, but just the same...  The next time I re-test and set the master PLC module IDs back to 0,  I'll make sure that DS is not a factor.

We also have Kepware OPC connected to the VLAN, to a couple other DL06 PLCs, for one of the first SCADA projects.  It uses the Kepware Automation Direct ECOM driver, (not Modbus), but there are no Module IDs involved in the Kepware configuration, only IP address and port.  I'll take these connections on-and-off line during our next testing as well.  If this proves to be a problem, we can convert those channels over to Modbus - we were wanting to use the ECOM driver to avoid translation issues, but we can still change course at this point.

I didn't encounter any Modbus translation issues when I initially created peer-peer table entries to use Modbus TCP.  It seemed rather simple - match module IDs in the RX and WX instructions to entries in the peer-to-peer config list for that PLC's ECOM adapter, enter the corresponding IP addresses, and everything worked exactly as before.   It seems as if the necessary Modbus translations are being handled somewhere in the CPU or ECOM firmware, no?

Thanks again, I'll let you know what I find out after the next round of tests.

johnr

  • Full Member
  • ***
  • Posts: 39
Re: DL06/ECOM100 - multiple PLC RX/WX pairs using Peer-to-Peer Modbus
« Reply #4 on: February 17, 2022, 10:40:33 AM »
Update on communications testing:

I set the module IDs of the  two PLC RX/WX masters on the VLAN back to zero.  No communications disruptions occurred at all, and both master-slave pairs have now run for almost a full day without any issues.

When I switched the IDs, there were no Directsoft sessions running.  After switching, I opened a couple on-line instances of DS, I set them to all status on to bombard the PLCs with data requests, and that didn't cause any problems anywhere, either.

At this point, I guess the main takeaways for me when switching from ECOM/UDP to Modbus/TCP protocols on peer-peer connections:
 - Make sure that all immediately affected PLC-PLC communications has been idled during the switch
 - Make sure any other PC-PLC traffic (such as DS sessions) are not running
 - Perform a power down reboot of the master(s), if possible, before resuming the PLC-PLC communication.

I have a couple more of these PLC-PLC communications pairs left to move to the VLAN, hopefully they will go much smoother.

Thanks again for your explanations - They confirmed that I wasn't missing anything critical, but that I just needed to proceed with a bit more caution and care!