Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: davidbgtx on May 26, 2020, 01:20:05 PM

Title: Concurrent Modbus
Post by: davidbgtx on May 26, 2020, 01:20:05 PM
My Do_More is "talking" to 10 other CPU's via modbus, so do I need to set Modbus concurrent sessions to 10?
Title: Re: Concurrent Modbus
Post by: franji1 on May 26, 2020, 01:27:08 PM
Who is the Master?  That setting is only for when the PLC is the slave (so you have 10 masters?).

This does not mean read vs. write, but who initiates the transaction - whoever that is, that is the Master (or Client).  Whoever responds to the Master's read/write requests is the Slave (or Server).
Title: Re: Concurrent Modbus
Post by: davidbgtx on May 26, 2020, 01:35:06 PM
the Do-More I am asking about the concurrent setting is initating the transactions, the 10 are a mixed bag of WINPLC and Do_More that things get written to or read from
Title: Re: Concurrent Modbus
Post by: franji1 on May 26, 2020, 01:39:05 PM
Yeah, that setting is for when Do-more is the Modbus/TCP Slave.  In your situation, the Do-more is the Master (it can do both at the same time!).

So is this over Serial or Ethernet, i.e. Modbus/RTU or Modbus/TCP?
Title: Re: Concurrent Modbus
Post by: davidbgtx on May 26, 2020, 01:40:16 PM
Ethernet Modbus/TCP
Title: Re: Concurrent Modbus
Post by: davidbgtx on May 26, 2020, 01:45:11 PM
Not having any issues, was fixing to create another MWX to another WINPLC and saw that setting and wanted to be sure what it meant. Thanks
Title: Re: Concurrent Modbus
Post by: franji1 on May 26, 2020, 01:47:23 PM
Ethernet Modbus/TCP

Good.  It's easy to maintain all 10 TCP connections concurrently via the Modbus/TCP Client Device - you need 10 of them, one for each slave.  Then in each slave's specific set of MRX/MWX instructions choose one specific Modbus/TCP Client for THAT specific slave.

Slave #1 - Doing 1 MRX and 1 MWX, use Modbus/TCP ClientA in those 2 instructions
Slave #2 - Doing 2 MRX's and 1 MWX, use Modbus/TCP Client ClientB in those 3 instructions
Slave #3 - Doing 1 MRX, use Modbus/TCP Client ClientC in that one MRX
...
Slave #10 - Doing 1 MRX and 1 MWX, use Modbus/TC: ClientJ in those 2 instructions

Each Client has its own state machine, able to maintain the TCP connection state.

It's like having 10 telephones to 10 different people.  You can maintain 10 connections with 10 phones.  If you only had 1 phone, but 10 different people, you would have to call person#1, read/write, hang up.  Call person #2, read/write, hang up.  Call person #2, read/write, hang up.  Etc. Etc. Etc.

With 10 different Modbus/TCP Client devices, it's like having 10 telephones, so each phone connects to a specific slave the first time, but then maintains its connection because you never change the slave for THAT specific client.
Title: Re: Concurrent Modbus
Post by: davidbgtx on May 26, 2020, 01:57:02 PM
That's how I've been doing it, using the 100ms bit to trigger so as to not load the network too much since nothing has to be "quick" in this. Love Do-More. Thanks