0% found this document useful (0 votes)
38 views21 pages

18 - MPI Communication

The document discusses MPI communication methods for communicating between Siemens S7 PLCs and PC/laptops. It describes the CP modules used, MPI communication features, and provides examples of configuring global data communication and S7 basic communication between two S7-300 CPUs using SFCs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views21 pages

18 - MPI Communication

The document discusses MPI communication methods for communicating between Siemens S7 PLCs and PC/laptops. It describes the CP modules used, MPI communication features, and provides examples of configuring global data communication and S7 basic communication between two S7-300 CPUs using SFCs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 21

SIEMENS

MPI COMMUNICATION

SIEMENS
SIMATIC S7 1/18 March 27, 2024
SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Objectives

- Know Communication Methods.


- Configure GD Communication Files.

SIMATIC S7 2/18 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

CP Used For MPI Comm. With PC & Laptop

CP5611
Transmission rate 9.6 kbit/s to 12 Mbit/s

Interface 9-pin Sub-D socket


for connection to PROFIBUS

Module format : PCI card


Space requirements : 1 x PCI slot

CP5511
Transmission rate 9.6 kbit/s to 12 Mbit/s

Interfaces 9-pin Sub D socket


for connection to
PROFIBUS

Module format : PCMCIA slot Type II

SIMATIC S7 3/18 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

MPI Communication Method


S7-Communication Functions
Communication
Services

Global Data S7 Basis S7 Extended


Communication
Communication

Data Volume Up to 22 Byte (S7-300)


Up to 54 Byte (S7-400)
Up to 76Byte Up to 16 Byte (S7-300)
up to 64 Byte (S7-400)

Interfaces MPI MPI MPI


CPs for
PROFIBUS
and Ethernet

SIMATIC S7 4/18 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

MPI Communication
- Data communication: 187.5 kbit/s to 12 Mbit/s

- Up to 32 bus nodes and up to 32 active


connections per CPU Add.= 2

- Communication services:
. PG/OP communication functions
. Global data communication for small data
volumes, without a programming
overhead Add.= 4
. S7 Basic communication for small
Add.= 0
data volumes up to 76 bytes
Add.= 1

Add.= 3

Add.= 5

SIMATIC S7 5/18 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Inserting Another Station - S7 300

SIMATIC S7 6/18 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Edit Hardware For The other Station - S7 300

Two station

SIMATIC S7 7/18 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Edit Hardware For The other Station - S7 300

The address of the CPU for


the other station must have
a different address

SIMATIC S7 8/18 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Configure The Network

Click on this icon to


edit the network
configuration

SIMATIC S7 9/18 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Connectiong CPU To The MPI Network

SIMATIC S7 10/18 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Compiling & Checking The Connection

SIMATIC S7 11/18 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Connect CPU & PCs Using MPI Cables

CPU-MPI
PC address: 0
address: 2

CPU-MPI
PC address: 1
address: 3

SIMATIC S7 12/18 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Start Global Data File

SIMATIC S7 13/18 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Define The CPUs

SIMATIC S7 14/18 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Assigne Sender & Receiver

SIMATIC S7 15/18 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Compile & Check

SIMATIC S7 16/18 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

Download GD File To CPU

SIMATIC S7 17/18 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

S7 Basic Communication
SFC NAME Short Description

SFC 65 X_SEND Send block for sending data to the X_RCV (Client) block

SFC 66 X_RCV Receive block for receiving the data of the X_SEND block

SFC 67 X_GET Read data from the partner PLC

SFC 68 X_PUT Write data to the partner PLC

SFC 69 X_ABORT Abort existing connection

SFC 72 I_GET Read data from the partner CPU

SFC 73 I_PUT Write data to the partner CPU

SFC 74 I_ABORT Abort connection to the partner CPU

SIMATIC S7 18/18 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

S7 Basic Communication Using SFC 65 - 66

SFC65 (X_SEND)
CALL SFC 65
REQ:= M4.0 //Trigger REQ RET_VAL
CONT:= FALSE //Disc. connection CONT BUSY
DEST_ID:= W#16#4 //MPI_addr.
REQ_ID:= DW#16#1 //Identifier
DEST_ID
SD:= P#M20.0 BYTE 10 //Variable
RET_VAL:= MW40 //Error code REQ_ID
BUSY:= M 4.1 //SFC active
SD

SFC66 (X_RSV)
CALL SFC 66 EN_DT RET_VAL
EN_DT:= TRUE //Trigger data trans.
RET_VAL:= MW 50 //Error code REQ_ID
REQ_ID:= MD52 //Job ID
NDA:= M40.0 //Data exist NDA
RD:= P#M20.0 BYTE 10 //Variable
RD

SIMATIC S7 19/18 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

S7 Extended Communication
- Data exchange using MPI, Profibus or Industrial Ethernet

- Configuring the connections via connection table

-The connections are configured during warm restart and exist


permanently (even in STOP mode)

- User data size up to 64 Kbytes

- Communications services also for controlling (Stop, Start) the partner

- SFBs:

- Data can also be read and written by an S7-300 (GET/PUT)

- Different tasks can be handled via one connection

SIMATIC S7 20/18 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS

S7 Extended Communication
SFB/SFC NAME Comm. Type Short Description

SFB 8 USEND two-sided Send block for sending data to the URCV (Client) block

SFB 9 URCV two-sided Receive block for receiving data of the USEND block

Send block for sending large data blocks to the BRCV


SFB 12 BSEND two-sided
block (up to 64 KByte)

Receive block for receiving large data blocks


SFB 13 BRCV two-sided
(up to 64 Kbyte)

SFB 14 GET one-sided Read data from partner PLC

SFB 15 PUT one-sided Write data to partner PLC

SFB 16 PRINT one-sided Send data to remote printer

SFB 19 START one-sided Perform complete restart at the partner

SFB 20 STOP one-sided Put partner in the Stop state

SFB 21 RESUME one-sided Perform restart at the partner

Status scan of the partner


SFB 22 STATUS one-sided
(RUN, STOP, start-up, hold)

SFB 23 USTATUS one-sided Receive the partner‘s status messages

SFC 62 CONTROL --- Scan the internal status of an S7 connection + SFB

SIMATIC S7 21/18 March 27, 2024


SIEMENS LTD EGYPT 2007
All Rights Reserved

You might also like