Modbus TCP/IP implementation in Siemens S7-300 PLC

drmandge1 10,695 views 15 slides Jul 15, 2015
Slide 1
Slide 1 of 15
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15

About This Presentation

Steps for Modbus implementation in Siemens S7-300 PLC System are shown where CPU is configured as Modbus Server.


Slide Content

Modbus Communication for 
Slow Controller INTER‐CONTROLLER COMMUNICATION

Agenda Introduction
Standard Protocols
What is Modbus?
Modbus in Detail
Comparison Modbus and OPC
Implementation of Modbus for Siemens PLC
Security in Modbus
Conclusion

Introduction Slow controller (PLC) and Fast Controller(PXIe) system are the two key controllers of Local control unit for the 
Gyrotron system. 
All auxiliary systems and power supplies are to be controlled by PLCs. Sequence control and soft interlock 
functions are to be implemented in PLCs.
High voltage and Magnet power supplies, Fast 
Local Protection and Data Archiving are performed by Fast 
Controller.  
Hence, Many process variables will be exchanged between slow and fast controller for the operation of Gyrotron. 
So Standard communication protocols will be used for the same.  
In this presentation, various protocols available are mentioned and Compared. Finally Modbus communication is
 
discussed mainly. 

Available Protocols
OLE for Process Control (OPC)
Modbus Communication 
Direct Access
Standard
Non‐Standard
Industrial Communication 
(Modbus)
Direct Access
OPC

What is Modbus? It is simple, reliable and efficient Communication protocol across a variety of controllers. 
Application layer messaging protocol for client/server communication between devices 
connected on different types of buses or networks
Server/Client protocol and offers services specified by function codes. 
(Client) (Server)
MODBUS MODBUS
RS485 RS485 RS232 RS232 TCP/IP TCP/IP

MODBUS TCP
•MODBUS TCP is Client/Server serial communication that uses TCP/IP as a transmission medium
•The client establishes a connection and sends request frames to the server. The server processes 
this request and sends the appropriate answer to the request back to the client.
•The MODBUS protocol defines a simple Protocol Data 
Unit (PDU) independent of the underlying 
communication layers. The mapping of MODBUS protocol on specific buses or network can 
introduce some additional fields on the Application Data Unit (ADU).

MODBUS Data Types

Modbus TCP Implementation in STEP‐7 For Siemens PLC, Modbus can be implemented in 
◦Integrated CPU PN Port
◦Extra Communication Processor PN Port(CP‐343‐1 Lean)
Siemens provides additional function blocks for Modbus TCP via PN CPU. These blocks are to be 
purchased and licensed for one particular CPU only. 
◦FB102, FB103,FB104,FB105, DB2
These blocks are then to be configured as per the user application.  
◦Serveror Client, 
◦Local IP and Port settings
◦Memory area allotment in CPU
◦Data Types of Variables to be exchanged
Siemens PLC, as an Modbus server, defines a stack of memory area where all incoming and outgoing 
data will be stored. 

Program Structure

Modbus Parameter Settings

Test of Communication : PLC Server
oData which is to be
transferred is stored in
DBs.
Similar, Data from
Othercontrolleris
stored here in the
same DBs at particular
address
PLC is set as ModBUS
server at IP address
192.168.23.239 and
Port No. 502
Variable to be 
Communicated
MODBUS Connection 
Settings

Test of Communication : PC Client
oThis is computer
based Modbus
client. But it could
be any other
controller capable
of Modbus
communication.

Comparison
Parameters OPC Server Modbus TCP
Open standard Open Protocol
Extra Software 1. Vendor dependent servers are 
available
1. No special software needed
Use of PC 2. Use of PC is needed to install it. 
PLC talks to OPC server PC and 
then PC talks to FC
1. No PC is Required. PLC directly 
talks to FC
Security 3. Less as OPC server can access 
any memory 
area of PLC e.g. 
input, output, internal registers 
w/o any information to PLC CPU. 
1. Only those data which PLC 
intentionally wants to transfer are 
accessed by remote controllers. 
PLC knows what it is sharing with 
other controller

Continued…
Parameters OPC Server Modbus TCP
Operating Systems Windows based standard‐
Amount of work Quite less More, so suitable for one 
time installation
Flexibility and upgradability Quite Simple Much effort needed. 
Application dependency? Independent of process 
Application 
Dependent of process 
application.
Debugging? What data available, in which 
form, at what place available
More effort needed. 
Cost High, depends on no. of tags, Quite less, no variable 
limitation

Summary MODBUS is open protocol which can be used across variety of networks and between variety of
controllers and/or PC
Even though it is inferior to OPC standard communication, but for small amount of process
variables exchange directly between two controllers, this protocols can be adopted which
eliminates need of OPC computer application.
Time and speed response of Modbus is comparable to that of OPC communication (~100ms)
Additional Modbus Blocks from Siemens need to be purchased and can be used for one
particular CPU only.