0% found this document useful (0 votes)
87 views14 pages

Sitrain - India: Simatic Net

Uploaded by

baikunth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views14 pages

Sitrain - India: Simatic Net

Uploaded by

baikunth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SIMATIC NET

D I A
I N
MPI COMMUNIACATION

-
A I N
IT R
Unrestricted
S © Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

D I A
Communication with MPI

- I N
A I N PG 720

IT R
S
Page 2 © Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

1
Sub networks in SIMATIC

A
P G 7 20

I
OPs PCs, OS PGs

MPI network

D
Profinet
Industrial Ethernet

N
PROFIBUS Point-to-point
Cell level

PROFIBUS DP SIMATIC S5 S7-400 WinAC

- I S7-300
-SINUMERIK, RCM
-TI 505

N
-3rd party PLC

I
Profinet Field level
DP/AS
Interface

A
ET Link
200L ET

R
ASI (Actuator Sensor Interface) 200B/L
ASI level

IT
ASI
ASI power
supply Submodules
Field device with ASI Sensors and

S
ASIC actuators

Page 3 © Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

D I A
S7 Communication Methods

Global Data

- I N
Op. Sys.
of CPU

A I N cyclic or event-driven

with MPI
Op. Sys.
of CPU

IT R
Basic communication Extended communication

S
( non-configured connection ) (configured connection )

Event-driven Event-driven

with SFB with SFB


SFC SFC
MPI, Profibus
MPI or K-Bus
or Industrial
Ethernet

Page 4 © Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

2
Networking with MPI

S7-300™ or S7- 400™ S7-300™ or S7- 400™


CPU 1 CPU 2

D I A
2

PLC link with MPI


- I N
0

A I N 1 OP connection with MPI

R
PG 720

S
Page 5
IT
PG connection with MPI n Default MPI address

© Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

D I A
Connection Options to MPI

Bus connector
- I N
A I N
IT R
To MPI
interface
of
CPU
Connection for
PG/HMI

S To MPI
interface
of
CPU
Switch for terminating
resistor

Page 6 © Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

3
Global Data: Overview

CPU 1
MW 10
CPU 2
MW 20
I A
CPU 3

D
MW 30

- I N
A I N Global Data

IT R
S
Page 7 © Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

D I A
GD Circles

CPU1 CPU2

- I N
CPU3 CPU4 CPU5

GD circle
1

I N
S GD 1.1

A
R GD 1.2
R GD 1.1
S GD 1.2

IT R 2

3
R GD 2.1 S GD 2.1

S GD 3.1
R GD 2.1

R GD 3.1
R GD 2.1 R GD 2.1

S
R GD 3.2 S GD 3.2

4 R GD 4.1 S GD 4.1 R GD 4.1

5
S GD 5.1 R GD 5.1 R GD 5.1

6 R GD 6.1 S GD 6.1 R GD 6.1

S=Sender; R=Receiver; GD x.y=GD Packet y in global data circle x


Page 8 © Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

4
Global Data: Configuring the Hardware

A
Create stations

Set MPI address

D I
N
"Accessible Nodes"

I
Network CPUs

N -
A I
IT R
S
Page 9 © Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

D I A
Editing the GD Table

Open GD Table

- I N Select CPUs

A I N
IT R
S Define Global Data

Replication factor

Page 10 © Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

5
Compiling the GD Table

Compile GD Table

D I A
Define scan rates and

- I N
status information

A I N
IT R
S
Page 11 © Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

D I A
Downloading GD Configuration Data

Download GD configuration data

- I N
A I N
IT R
S
Page 12 © Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

6
Preparing for Communication

Training area 1 Station 1

A
SIEMENS

PG 740

D I
N
CPU-MPI

PG-MPI address: 3

Training area 2
address: 4

- I
SIEMENS

A I N
Station 2

R
PG 740

IT
CPU-MPI
address: 6

S
Page 13
PG-MPI address: 5

© Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

D I A
Monitoring the Addresses of Several Stations

- I N
Addresses of Station 1

A I N
IT R
S Addresses of Station 2

Page 14 © Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

7
Global Data Communication

D I A
Station 1

- I N Station 2

0 8 1 5

I N
IW 4 (IW 2)

A
0 8 1 5
QW 12 (QW 6)

IT R 4 7 1 1
QW 12 (QW 6)
4 7 1 1
IW 4 (IW 2)

S
Page 15 © Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

D I A
Configuring with NETPRO

Insert hardware stations

- I N
A I N Define global data

IT R
S
Page 16 © Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

8
SFC Communication: Overview

κData exchange using the MPI subnet or within a station

κNo connection configuration necessary in comparison to


SFB communication

D I A
N
κThe connection to the partner is dynamically configured

I
and disconnected

κUser data up to 76 bytes

N
κCan be used on all S7-300/400 CPUs
-
A I
κVariables can also be read and written in the S7-200 via
PROFIBUS-DP (X_GET, X_PUT)

IT R
κThe communication partners can also be found in
another S7 Project

S
Page 17 © Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

D I A
SFC Communication: Block Overview

SFC NAME
- I N
Short Description
SFC 65

SFC 66

A I N
X_SEND

X_RCV
Send block for sending data to the X_RCV (Client) block

Receive block for receiving the data of the X_SEND block

IT R
SFC 67

SFC 68
X_GET

X_PUT
Read data from the partner PLC

Write data to the partner PLC

S SFC 69

SFC 72

SFC 73

SFC 74
X_ABORT

I_GET

I_PUT

I_ABORT
Abort existing connection

Read data from the partner CPU

Write data to the partner CPU

Abort connection to the partner CPU

Page 18 © Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

9
SFC Communication: X_GET (SFC 67) Block

LAD/FBD Representation
STL Representation
With an example for the parameter assignment
REQ

D I A
SFC67 (X_GET)
RET_VAL
CALL SFC 67
REQ:= I 0.4
CONT:= FALSE
//Trigger
//Disc. connection

- I NCONT
DEST_ID
VAR_ADDR
BUSY
RD

N
DEST_ID:= W#16#3 //MPI_Address

RET_VAL:= MW100

A I
VAR_ADDR:= P#M20.0 BYTE 10 //Remote var.
//Error code

IT R
BUSY:= M 4.1
RD:= P#M0.0 BYTE 10
//SFC active
//Local variable

S
Page 19 © Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

D I A
SFC Communication: X_PUT (SFC 68) Block

- I N
LAD/FBD Representation

A I N
STL Representation
With an example for the parameter assignment
REQ
SFC68 (X_PUT)
RET_VAL

R
CALL SFC 68
CONT BUSY

IT
REQ:= I 0.5 //Trigger
CONT:= FALSE //Disc. connection DEST_ID

S DEST_ID:= W#16#3

SD:= P#M0.0 BYTE 10


RET_VAL:= MW100
//MPI_Address
VAR_ADDR:= P#M20.0 BYTE 10 //Remote var.
//Local variable
//Error code
VAR_ADDR
SD

BUSY:= M 4.1 //SFC active

Page 20 © Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

10
SFC Communication: X_SEND (SFC 65) Block

A
STL Representation LAD/FBD Representation

With an example for the parameter assignment


CALL SFC 65 REQ

D I
SFC65 (X_SEND)
RET_VAL
REQ:= M4.0
CONT:= FALSE
DEST_ID:= W#16#4
//Trigger
//Disc. connection
//MPI_addr.
- I N
CONT

DEST_ID
REQ_ID
BUSY

REQ_ID:= DW#16#1

I N //Identifier
SD:= P#M20.0 BYTE 10 //Variable
RET_VAL:= MW40

A //Error code
SD

IT R
BUSY:= M 4.1 //SFC active

S
Page 21 © Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

D I A
SFC Communication: X_RCV (SFC 66) Block

STL Representation
- I N
LAD/FBD Representation

A I N
With an example for the parameter assignment SFC66 (X_RSV)
EN_DT RET_VAL

IT R
CALL SFC 66
EN_DT:= TRUE
RET_VAL:= MW 50
//Trigger data trans.
//Error code
REQ_ID

NDA

S REQ_ID:= MD52
NDA:= M40.0
//Job ID
//Data exist
RD:= P#M20.0 BYTE 10 //Variable
RD

Page 22 © Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

11
SFB Communication: Overview

κData exchange using MPI, K-Bus, Profibus or Industrial

A
Ethernet

κConfiguring the connections via connection table

κThe connections are configured during complete restart

D I
and exist permanently (even in STOP mode)

κUser data size up to 64 KBytes

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

A I N
κSFBs exist for all S7-400-CPUs

IT R
κData can also be read and written from an S7-300
(GET/PUT)

κDifferent tasks can be handled via one connection

S
Page 23 © Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

D I A
One-sided Communication Services using S7 Connections

Logical
S7 connection

- I N S7-300/400

N
(one-sided or two-sided)

I
S7-400 CPU

R
CPU
1

A MPI=3
MPI=2

IT
Local ID MPI=2

Physical

S
MPI=2 connection, e.g. MPI

1
CPU‘s
SFB:
- GET oper.
- PUT system
- STOP
- START
- STATUS

Page 24 © Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

12
Two-sided Communication Services using S7 Connections

Logical
S7-400

A
S7 connection
(two-sided)

I
CPU
S7-400 1

CPU

Local ID
2

MPI=2

I N
MPI=3

D MPI=2

MPI=2

N -Physical
connection, e.g. MPI

A
SFB:
I 1
SFBs

R - USEND - URCV
- USEND

IT
- URCV
- BSEND - BRCV
- BRCV - BSEND

S
Page 25 © Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

D I A
SFB Communication: BSEND (SFB 12) Block

STL Representation
- I N LAD Representation

CALL BSEND, I_BSEND

A I N
With an example for the parameter assignment
//With Instance DB EN
DB 12 (Instance DB)
SFB 12 (BSEND)
ENO

R
REQ DONE
REQ:= I 0.4 //Start R

IT
ERROR
R:= I 0.5 //Reset BSEND ID STATUS
R_ID

S
ID:=W#16#3 //S7 Connection
SD_1
R_ID:=DW#16#B2 //Block pair
LEN
DONE:= #DONE_F //Successful end
ERROR:= #ERROR_F //End with error
STATUS:= #STATUS_W //Additional info
SD_1:=P#DB1.DBX0.0 BYTE 40000 //Send data
LEN:= #DB_LEN //Length of data

Page 26 © Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

13
SFB Communication: BRCV (SFB 13) Block

A
DB 13 (Instance DB)

STL Representation
With an example for the parameter assignment

D I
LAD Representation

CALL BRCV, I_BRCV


EN_R:= I 0.4
ID:=W#16#3
// With Instance DB
//Start
//S7 Connection

- I N EN
EN_R
ID
SFB 13 (BRCV)
ENO
NDR

N
ERROR

I
R_ID:=DW#16#B2 //Block pair R_ID STATUS
NDR:= #NDR_F //Receive new data
RD_1

ERROR:= #ERROR_F

R A
STATUS:= #STATUS_W
//End with error
//Additional info
LEN

S
Page 27
IT
RD_1:=P#DB2.DBX0.0 BYTE 40000 //Rec. mail box
LEN:= #DB_LEN //Rec. mail box length

© Siemens INDIA (I-CS-VS-TRG). All Rights Reserved.

D I A
- I N
A I N
IT R
S

14

You might also like