Modbus Master to Master

S

Thread Starter

Santi

I have the next doubt about modbus:

If a intelligent device (PLC) is only configurable like a modbus master, can I query this from a (for example) PC application (SCADA)?
Thanks in advanced
 
R

Russ Bartels

Maybe, Some MB Master devices will reply to standard 'slave' requests from another master on the same bus, just remember that they need different node addresses.

You should check with the PLC manufacturer.
 
Like most protocols, Modbus is a client/server (or master/slave) protocol. The client (master) sends a query, and the server (slave) responds to it. It's just like the way your web browser (client) communicates with Control.com (server).

If the SCADA can be a server and the PLC is a client, then the PLC can talk to it. If the SCADA and the PLC both insist on being clients (masters), then the solution is to put a "proxy server" in between them. The proxy acts as server to both parties. The PLC would write to the proxy, and the SCADA would read from it (and visa versa).

If you are dealing with Modbus/TCP on Ethernet (as opposed to an RS-485 Modbus), then any station can be both a client and a server simultaneously *provided* its software was written to support this. This is not typical for PLCs (they are usually one or the other). For the SCADA you would have to look into what its drivers are capable of.
 
I
No, you can't. Not directly anyway.

The fundamental problem is that a Modbus master does not respond to unsolicited requests. There is no such thing as this in the Modbus protocol.

The only way a Modbus master can get information is by asking for it.

Conversely, a slave deals only with unsolicited requests. It cannot send a message unbidden.

The second problem is that Modbus is fundamentally a master-slave protocol. There is no peer-to-peer in Modbus.
 
F

Fred Loveless

I have never seen it done yet, but that does not mean it cannot be if the devices support it. If you need to get data from the Master device into a scada and from the scada back to Master then use an OPC or DDE Server that can be configured to be a Mdobus Slave on the network. Then the Master PLC can Read and Write to the slave device, and your scada is updated from the slave server and can write down to it so that the value can be polled by the master.

Check out the following links. Both of these KEPware KEPServerEX drivers can be configured as modbus slaves.

http://www.kepware.com/Spec_Sheets/Modbus_Ethernet.asp
http://www.kepware.com/Spec_Sheets/Modbus_Unsolicited.asp

Fred Loveless
Applications Manager
Kepware Technoliges
http://www.kepware.com
 
M
I know of one case where a Modbus port can be both slave and master, but not at the same time of course. In Modicon Quantum, Momentum, TSX Compact and some Micro 984 models, the XMIT 984 loadable and the Concept IEC XMIT function take control of a Modbus port to act as a master device. When XMIT is not active, the port reverts to its configured slave setting.

We used this on a radio telemetry project to make one site a data repeater for another site that was blocked from the master radio by a hill. There are extra flags programmed so that the repeater site waits as a Modbus slave until it receives permission from the master site, after which it becomes a Modbus master and the master site acts as a Modbus slave. Once finished, the repeater returns permission to the master site and the cycle continues.

I haven't had any experience with the newer Schneider PLCs and software, so I don't know if this technique has become obsolete.

Mike
 
R

Robert Willis

The XXMIT Function block would allow the Modbus Port (Port 1) to be used as either a Master or a Slave. Once the XXMIT "Master" message is completed then the port would revert back to the slave configuration. The arbitration between Master and Slave would need to be worked out the developer so that both the local and remote can communicate.

You also might want to look at the NR&D products that have a Modbus Gate Mode setting for serial ports. This allow the serial port to automatically transition between a Master or Slave configuration depending on the message source.

 
G

Gustavo A. Valero P.

Hi everyone,

Going back to initial question written by Santi, the answer is YES but it depends on SCADA's driver.

Some drivers support something called "Unsolicited Read" and with this feature you can get what you want.

E.g., most FactoryLink's drivers support "Unsolicited Read" feature including its Modbus TCP/IP driver.

This driver opens 3 threads/connections to the NOE module of PLC (was developed to work with Quantum PLCs originally). One thread/connection is required for each of the following operations: Reads; Writes; and Unsolicited Reads. These threads must be available even if these operations are not configured in the application.

At its beginning, if a PLC that claims to support Modbus TCP/IP protocol is not able to support these 3 threads/connections, the driver was not going to work with the PLC but after some modifications and improvements, this issue was eliminated.

Unfortunately, the driver only works and waits for Unsolicited Reads based on Holding Registers (HREG)... nothing is perfect!.

Your plan B could be to use an I/O Gateway device able to work as Master/Slave Modbus at the same time and exchange data between the masters using the Gateway's internal/virtual memory as a "bridge". I have used this solution before with this equipment perfectly: http://www.sixnet.com/product/ethertrak-io-gateway-168.cfm

Best regards.

Saludos desde Venezuela.

Gustavo A. Valero P.
 
Many thanks to everybody, specially to Gustavo (he gives me a little hope), your explains let me more clear how modbus works

Thanks again!

 
This thread is very fortuitous for me as I have been puzzling over a similar problem.

I have two transmitters that normally would both be slaves multi-dropped to a master controller.

However, I have an application where I need these two transmitters to share information with each other, perform similar calculations and then output the results.

So to share information one or other or both would have to be able to solicit data from the other and both respond to an external data call from the master controller.

Effectively this means three masters....or am I wrong?

It would be neat and tidy if the true master were to poll data from both slaves and then send data collected from one slave to the other slave but I also have the possibility that in some applications there will be just the two transmitters and the "master" controller would only accept 4-20mA data so the two slaves will have to do it all themselves.

I just need a heads up on feasibility for now, thanks.
 
A
Hi,

If a system (plc) can only be a Modbus master, still does it comply to Modbus specification?
 
In reply to Ajith Kumar: A device could be a client (master) or server (slave). In some cases it is possible to be both at the same time. It is up to the device designer to decide as to what features and functions make sense for that application and then to implement those features. Modbus specifies what the message format looks like. It doesn't (with a few exceptions) specify how your device works. As long as the messages which go out on the wire conform to the format in the Modbus specifications, it's still Modbus.

You will find the same is true for many (if not most) other protocols. There are a lot of features in many protocols that are intended for certain narrow applications, and which have no value in other applications. The designers then just implement sub-sets of the full protocol. With proprietary protocols however they very rarely tell you what is really going on under the lid, so it may not be as obvious as to what the limitations are.
 
Similar question plz, If I have field devices that are configured as Modbus slaves and I have a PLC that runs as a master for them. Can the same PLC be a modbus slave for a higher level BMS/SCADA station? Is it vendor dependent. I'm using a Moeller PLC and I can configure the Serial module as master or slave.

Thanks
 
Top