

Now, let's take a look at the block's inputs. It is important to note that if you are trying to build a program that communicates with multiple Modbus servers simultaneously, each instance of MB_CLIENT must have its own instance data block. In this case, I created an instance data block, named "MB_CLIENT_DB" for the block call. It is located under the Communication category in the Instructions window, as shown below.Īfter dragging in the MB_CLIENT instruction to OB1 in a blank project, this is what it looks like. So we need to use the MB_CLIENT instruction, provided by Siemens. In this case, since we are trying to access data from a Server, our PLC will be acting as the Client. I find it hard to keep track of these terms, so it's always helpful to have them defined.

The Slave, or Server, is responsible for responding to commands from a Master/Client. The Master, or Client, is responsible for sending commands, such as reading or writing data. Master and Client can be used interchangeably here, as can Slave and Server. The roles played by the two devices exchanging data can be classified as Master-Slave or Client-Server. Terminologyįirst, a clarification on the terminology I'm using. If you are trying to make data available from your PLC to a Modbus TCP Client, then take a look at this blog, or to a Modbus RTU Client, this one. Do you need to access data from a Modbus TCP Server on your S7-1500 PLC? If so, then do not fret, I will walk through setting up your PLC as a Modbus TCP Client to do just that.
