Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Chapter 1
Chapter 1
MPI communication
1.1 Introduction to MPI
It can be divided into two parts: MPI parameter configuration of PC side and PLC side.
1.Parameter configuration of PLC side
During hardware configuration, the user can click the "Properties" button (see in Figure 1-
5) to configure properties of MPI, including address and baud rate. The detailed operation refers
to Figure 1-5.
(1) PC Adapter One end is connected to RS232 port or universal serial bus (USB) port of
PC, while the other is connected to MPI interface of CPU. It has no network diagnostic
function, and its maximum baud rate is 1.5Mbit/s, with a lower price.
(2) CP55 11 PCMCIA TYPE II card, used for programming and communication of
notebook computer. It has network diagnosis function, and its maximum baud rate is 12Mbit/s,
with a comparatively higher price.
(3) CP55 12 PCMCIA TYPE II Cardbus (32 bit) card, used for programming and
communication of notebook computer. It has network diagnosis function, and its
maximum baud rate is 12Mbit/s, with a comparatively higher price.
(4) CP56 11 PCI card, used for programming and communication of the desk computer. It
has network diagnosis function, and the maximum baud rate is 12Mbit/s, with a proper price.
(5) The CP56 13 PCI card (replace the original CP5412card), used for programming and
communication of the desk computer. It has network diagnosis function, and the maximum baud
rate is 12Mbit/s. It has processor, which can maintain stability of communication with a large
amount of data. Usually it is used in PROFIBUS network, and it has MPI function, with a
comparatively higher price.
After figuring out functions mentioned above, it is easy to select the proper communication
card. In the code of CP communication card, ‘5’represents PCMCIA interface, ‘6’represents
PCI bus, ‘3’represents that it has processor.
In addition to local connection, the telephone network can also be used for remote
programming. The detailed network structure refers to Figure 1-7.
2) The other end of TS Adapter connects to MPI interface of PLC, which enables CPU
supply power for TS Adapter.
Click the "Start"→"SIMATIC"→"STEP 7"→"TeleService", enter menu configuration.
On the left side of menu, create a new Folder, such as "test", then insert "Plant" and add
remote telephone number. As Figure 1-9 show, on the left side of menu, insert "test", then on
the right side, create "MY plant". In this case, it configures remote telephone number as 010
64721888.
There are three methods to implement communication between PLC-PLC via MPI: global
data package communication, non-configured connection communication, and configuration
connection communication.
1.Introduction
As for data exchange between PLCs, only sending data area and receiving data area should
be concerned. Global data package communication mode means that in the process of
configuration of PLC hardware, it configures the sending data area and receiving data area
among communicating PLC stations, and need not any program processing. This mode can only
be applied to communication among S7-300/400 PLC stations. The detailed methods and steps
of global data package communication mode are given as follows.
2.Network configuration figuring
The network configuration of global data package communication mode is shown in Figure
1-14.
Figure 1-21 Examining Global Data Scan Rate and Status Word
1) SR: Scan rate. In Figure 1-21, SR1.1 is 225, which means transmission update time is
225×CPU cycle time. The range of SR is 1~255. Communication interruption usually happens
when scan time is configured too fast. The user can prolong scan time properly according to
demand.
2) GDS: Status word (double word) of each data package. Please refer to Table 2-1.
Table 2-1 Programming Error-Processing Program According to Status Word
Status Word Respective program for error handling
3) GST: the result of "OR" all the GDSs. First the user can diagnose the reliability of
wiring by using communication cards such as CP5511/5611 etc. In the case above, S7-300 MPI
address is 2, and S7-400 MPI address is 4. NO.2 and NO.4 station address can be read by
connecting CP communication card to MPI network (having necessary PROFIBUS bus
connector with a programmable interface). The detailed method is as follows: click "control
panel"→"Set PG/PC Interface"→"Diagnostics"→"Read", and read all the site addresses in the
network, as shown in Figure 1-22.
REQ_ID User-defined ID of a data package. Identifiers of both data packages in the example
are “1“ and “2“.
SD Defining the data sending area in form of an index pointer. The first data package in
the example has 76 continuous bytes starting with DB1. DBB0. Maximum size of the
sending area is 76 Bytes.
SD Local data area (data source). Data from this area are sent if
M1.1 is 1.
RD Local receiving area for data. Received data are stored in the
local area if M1.3 is 1.
The parameter instruction in the program refers to Table 2-4.
The maximum capacity of data area is 76 bytes. Call SFC67 and SFC68 in one CPU at the
same time will occupy one dynamic link source. When M1.5 is ‘1’, communication is
interrupted and the link is released. In the same way, S7-300 can also be used as the customer,
S7-400 the server.
Sample program refers to the CD, with the project name MPI_SFC_PG300.
(2) Communication between S7-300/400 and S7-200
1) Introduction
For S7-200 cannot call SFC communication function block, so it can only be used as
server. And S7-300/400 can serves as customer.
2) Network configuration graph as shown in Figure 1-28.
When M1.1 is ‘1’, S7-300 send input data IB0 to QB0 of S7-200; when M1.4 is ‘1’, S7-
300 reads input data IB0 of S7-200 and puts into local output data QB0.
Sample program refers to the CD, with the project name MPI_SFC_200_PPI.
If V data area of S7-200 is read and written, then when defining V data area of S7-200 in
S7-300, DB1 must replace V. For instance, if the latter 16 bytes of VB100 in S7-200 are read
and put into the latter 16 bytes of MB20 in S7-300, system function SFC67 (X_GET) must be
called, and in VAR_ADDR configures S7-200 data area as P # DB1.DBX100.0 BYTE 16,
while in parameter RD, configures S7-300 data area as P # MB20.0 BYTE 16.
Moreover, it also can communicate with the MPI of S7-300/400 via PROFIBUS- DP
module EM277 of S7-200. On S7-200 side, configure the EM277 station address by using
dialing-code switch (configuration becomes effective only when given an electric shock to
restart). When calling SFC67/68 on S7-300/400 side, station address parameter has to be
configured as MPI address of EM277.
1. Introduction
In MPI network, this mode is only applied in the communication between S7-300/400 and
S7-400/400. When communicating between S7-300/400, S7-300 only can be used as server, and
S7-400 used as customer to read and write to S7-300; when communicating between S7-
400/400, S7-400 can be used as both customer and server. Communication by calling system
function block in MPI network, the maximum of data package length is 160 bytes. Take this
connection as example to introduce configuration connection communication mode is below.
2. Network configuration graph as shown in Figure 1-30.
REQ: Rising edge Trigger, and each rising edge triggers once.
Read the data of S7-300 by calling SFB14. The program is as follows.
Sample program refers to the CD, with the project name MPI_SFB_PG.
Compared with the communication of calling the system function block SFC, calling
system function block SFB has greater sending and receiving data quantity in each package, but
need to establish connection table in hardware configuration, and also will occupy
communication resource of S7-300. Under the premise of meeting communication requirement,
the user is suggested to use the non-configured connection communication mode.
MPI communication between S7-300/400 and HMI products needs neither STEP 7
software configuration, nor writing any program, and only need to configure related
communication parameters in HMI configuration software.
When TP/OP is communicating with PLC via MPI protocol, the user need to configure
communication parameters by using ProTool configuration software. For example, if the user
wants to connect TP270-10 with S7 PLC, then double-click "Controllers" in the ProTool
interface, and a dialog box as shown in Figure 1-34 will appear.
Similar to connecting TP/ OP, when communication between S7 PLC and monitoring
software WinCC via MPI protocol, the user also only need to configure station address, slot
number and net card of S7 CPU.
1. Installing and configuring MPI communication card in PC
First, insert CP5611 into PC, and start the computer, then double-click "Set PG/PC
Interface" icon in the control panel of PC, as shown in Figure 1-36.
Remote communication, which means using public telephone network to access the data of
PLC, can be implemented by using TeleService software and hardware adapter. Like the remote
program access steps in STEP 7, first dial through PLC stations via TeleService, then configure
interface parameters in "Set PG/PC Interface" of PC control panel, as shown in Figure 1-41.