Вы находитесь на странице: 1из 42

6.

PROFIBUS-DP

, DP-
SIMATIC S7, , ,
.
HW-Config
,
.
SIMATIC S7 c DP.

DP-Slave,
/ , SIMATIC S7
SFC14 DRRD_DAT SFC15 DPWR_DAT.

DP-Master S7-300,
I-Slave, SFC7 DP_PRAL.

S7-DP-Slave

.

SFC11 DPSYC_FR
DP-Slave.


DP-Slave SIMATIC S7.
4,
HW-Config.
STL (AWL),
STL.

6.1
6.1, S7-CPU

, .
DP-Save
3 , 4 Total length,
/
.

6 PROFIBUS-DP (42 )

CPU

I/O-

DP-Master

n+1

n+1

n+1

n+1

n+1

n+1

n+2

n+2

n+2

n+3

n+3

n+3

DP-Slave

. 6.1 / STEP7

CPU
PII
A Ix.y
S Qx.y
L PIBx
T PQBy

DP-Master

Q-
I-
Q-

DP-Slave

Slave 1

Slave 2

I-

L PIWx
T PQWy

Q-

L PIDx
T PQDy

Q-

I-

I-

Slave 1

n+1

Slave 2

PIQ
PII Process Image Input

PIQ Process Image Quit

. 6.2 / DP-Slave.
6.2, DP-/
(
) DP-Mastera c DP-Slave.
,
DP-Slave
(), , , ,
, .

6 PROFIBUS-DP (42 )

,
, .

6.2
DPRD_DAT SFC15 DPWR_DAT

SFC14

DP-Slave, ,
. ,
DP-Slave , ,
, / .
/ ,
, ,
(. 2.2.2
). /

/ 64 , ,
(128 ). DPSlave SFC14 DRRD_DAT SFC15 DPWR_DAT.
6.3 SFC14 DRRD_DAT SFC15
DPWR_DAT.
CPU

I/O-

DP-Master

DP-Slave

3- SFC14/15

LADDR
RECORD

n+1

n+1

n+2

n+2

n+1

n+1

n+2

n+2

n+1

n+3

n+3

n+2

n+4

n+4

n+3

n+5

n+5


CPU
n
n+1
n+2

, 4- SFC14/15

LADDR
RECORD

n

CPU

n+4
n+5

. 6.3 / SFC14 SFC15

6 PROFIBUS-DP (42 )

SFC LADDR
.
SFC
16- , HW-Config.
SFC RECORD - -
CPU. ,
( ) RET_VAL
5.3.
SFC14 SFC15.
-, 4.2.5 S7-300/CPU315-2DP I-Slave
S7-DP-Master (S7-400)
S7-300, I-Slave.
ET200M ET200B, DP- S7-300 S7-400
PROFIBUS. ,
RUN ( RUN-P).
/ 10
Total length (. 4.2.5, .4.18). ,
/ DP-Slave (I-Slave)
DP-Master SFC14 SFC15.
6.2.1 I-Slave (S7-300 c CPU315-2DP)
, S7-DP-Master, I-Slavea
/ , 3 ,
, , 4 , SFC14
SFC15. , 6.4,
, DP-Master SFC15, I-Slave
SFC14. DP-Master
.
DP-Master

DP-Slave


CPU

SFC15

SFC14

Q-

I-


CPU

SFC14

SFC15

I-

Q-


CPU


CPU

. 6.4 / I-Slave -
SFC14 SFC15
CPU SIMATIC S7-300 ,
/ , , ,
SFC -
, CPU315-2DP , ,
IB100 109 QB100 109.

6 PROFIBUS-DP (42 )


, , .

, :
, 6.5, SIMATIC-Manager
S7-PROFIBUS-DP, SIMATIC 300(1),

Blocks.

1 HW-Config
SDB ( ).

. 6.5 SIMATIC Manager


Blocks
1 LAD/FBD/STL-
STL.
CALL SFC14

Enter.
SFC14
DPRD_DAT

/
.

/ , 6.6.
SFC15 /
. SFC14 SFC15
(\SIEMENS\STEP7\S7libs\STDLIB30).

6 PROFIBUS-DP (42 )

. 6.6 STL OB1 -


CPU315-2DP

Master,
, 6.6,
(IB100)
(QB100). DP-Master
I-Slave, ISlave, DP-Master.
1. 1 System
Data, SFC14 SFC15.
CPU STOP I-Slave,
DP-Master ,
.
CPU DP-Master RUN STOP 82
( ) I-Slave. CPU I-Slave
82.
, DP-Master I-Slave 86 (
). CPU
, 86.
CPU.
CPU315-2DP
RUN. CPU315-2DP DP :
- c SF DP ;

6 PROFIBUS-DP (42 )

c BUSF .

6.2.2 DP-Mastera (S7-400 c


CPU416-2DP)
DP-Master -
Blocks,
SIMATIC 400(1). 1 , 6.7, SFC14
SFC15.
- DP-Master CPU
- , CPU 82 86.
/ I-Slave
DB10 DB20. DB
.

DB10 DB20.
ARRAY[1..10] OF
BYTE.
82, 86, DB10, DB20 CPU.
CPU RUN-P. SF DP
BUSF . .

CALL SFC 14
LADDR :=W#16#3E8
// (1000 dec)
RET_VAL:=MW200
// MW200
RECORD :=P#DB10.DBX 0.0 BYTE 10 //
//
CALL SFC 15
LADDR :=W#16#3E8
// (1000 dec)
RECORD := P#DB20.DBX 0.0 BYTE 10 //
RET_VAL:=MW202
// MW202

.6.7 STL- DP-Master STEP 7 c OB1


SFC14 SFC15
6.2.3 DP-Master DP-Slave
/ ,
SIMATIC Manager MPI- PG/PC CPU416-2DP
online- . Monitor/Modify Variables.
DB10.DBB0 DB20.DBB0 (DB10.DBB0 1-
I-Slave; DB20.DBB0 DBB0 1- ISlave).

6.3

S7-300 I-Slave:

, DP-Slave,
DP-Slave, , DP 6 PROFIBUS-DP (42 )

Slave / . , ,
,
,
.
, S7, , ISlave PROFIBUS-DP, .
, DPMaster (S7-400).
6.3.1 S7-300,
I-Slave
6.10, SFC7 DP_PRAL
PU315-2DP, I-Slave,
DP-Master ( CPU S7-400 S7-315-2DP)
.

SFC7 IOID LADDR.
,
I-Slave 1000.
I-Slave
DP-Master, SFC7 .
DP-Master SFC7
AL_INFO I-Slave (
ABCD)
( ) .
DPMaster 40
OB40_POINT_ADDR.
OB1

OB40

DP-Master

DP-Slave
OB1
SFC7


S7-
SFC7

. 6.10 S7-300 (CPU315-2DP),


I-Slave
1 SIMATIC 300 ,
6.11 CPU,
STOP.

6 PROFIBUS-DP (42 )

6.3.2 S7-400 DP-Master


, I-Slave PROFIBUS,
CPU DP-Mastera
40.
40 (. 5.1.2)
, , ,
.
40, I-Slave, ,
.
BUSY SFC7 1 0.
L
T

W#16#ABCD
MW 104

//

CALL "DP_PRAL"
REQ :=M100.0
IOID :=B#16#55
// (55=)
LADDR :=W#16#3EF // (1000d)
AL_INFO:=MD104
//
RET_VAL:=MW102
BUSY :=M100.1
A M 100.1
BEC
= M 100.0
L
+
T

MW 106
1
MW 106

// (), SFC7
//
//

. 6.11 DP-Slave (S7-300)



DP-Mastere
Blocks SIMATIC 400(1) 40 STL-,
6.12.
L
T

#OB40_MDL_ADDR
MW 10

//

#OB40_POINT_ADDR

//
// I-Slave

MD

12

. 6.12 DP-Master S7-400

40 CPU.
, 6.12,
, , MW10
MD12.
STEP7 Monitor/Modify Variables
.
6 PROFIBUS-DP (42 )

40 CPU416-2DP, CPU S7-300


RUN. (
RUN).
6.3.3 DP-Master
DP-Master
MPI- PG/PC PU 416-2DP SIMATIC Manager online -.
Blocks,
SIMATIC 400(1).
40 online-.
DP-Master
Debug->Monitor.

.6.13 40 -

6.4

()


SIMATIC S7,
.
, S7.
,

, , HWConfig SDB. S7-
6 PROFIBUS-DP (42 )

10

SIMATIC S7 SFC (.
5.5).
/
SFC55 WR_PARM SFC56 WR_DPARM.
6.14, S7- SFC55 (c
) , SFC56
HW-Config SDB .

.
CPU/OB1

DP-Master

DP-Slave

SDB
(
HW-Config)

SFC56
SFC56

DB

SFC55
SFC55

. 6.14 SFC55/SFC56 S7-



4.2.5 ET200M:
+/-10V SFC55 +/-2,5V.
SFC56
, HWConfig. , ,

.
6.4.1 (DS1)
SIMATIC S7-300
SIMATIC S7300 SM331 AI2x12Bit ,
12 14 . 6.1
SIMATIC S7-300. 0 (DS0)
SFC , ,
SFC55.

6 PROFIBUS-DP (42 )

11

. 6.1
SIMATIC S7-300

SFC55

: c
,






0
0
1
1
1
1
1
1
1

6.15 DS1
SIMATIC S7-300.
, ,
, ,
, ,
. DS1 14
.
7

1
0
1
2

(. . 6.2)

3
7

2
3
4
5

9
10
11
12
13

0
1
2
3


6
7
8


(. . 6.3)



,
0, 0

,
1, 2

,
0, 0

,
1, 2

. 6.15 DS1
S7-300

6 PROFIBUS-DP (42 )

12

6.2
.
. 6.2
S7-300

400 Hz
2,5 ms
2#00
60 Hz
16,7 ms
2#01
50 Hz
20,0 ms
2#10
10 Hz
100,0 ms
2#11
6.3
S7-300.
. 6.3
S7-300

2#0001
80 mV
2#0010
250 mV
2#0011
500 mV
2#0100
1V
2#0101
2,5 V

2#0001
2#0110
5V
o 1 5 V
2#0111
2#1001
10 V
2#1010
25 V
2#1011
50 V
- HW-Config
ET200M:
:
on
:
(U)
:
+/-10 V
: 20 ms
6.4.2 :
SFC55 WR_PARM
SFC55
4.2.5 ET200M. , , S7-DPMaster (S7-400) DP-Slave ET200M. -
HW-Config
ET200B S7-300. DP- S7-400 ET200M
PROFIBUS- . ,
DP-Master RUN (

6 PROFIBUS-DP (42 )

13

RUN-P). , , ET200M PROFIBUS 5.


Blocks,
SIMATIC 400(1), DB30, 6.4.
.
. 6.4
+/- 2,5 V

0.0
STRUCT
+0.0

AlarmEnable

BYTE

B#16#00

+1.0

IntTime

BYTE

B#16#02

+2.0

M_Kgr_0

BYTE

B#16#15

+3.0
+4.0
+5.0
+6.0
+7.0
+8.0
+9.0
+10.0
+11.0
+12.0
+13.0
=14.0

M_Kgr_1
M_Kgr_2
M_Kgr_3
Ogr_Kgr_0H
Ogr_Kgr_0L
Ugr_Kgr_0H
Ugr_Kgr_0L
Ogr_Kgr_1H
Ogr_Kgr_1L
Ugr_Kgr_1H
Ugr_Kgr_0L

BYTE
BYTE
BYTE
BYTE
BYTE
BYTE
BYTE
BYTE
BYTE
BYTE
BYTE
END_STRUCT

/
20 ms
0 (
+/- 2,5 V)
1 ( )
2 ( )
3 ( )
,




6.16 SFC55 WR_PARM OB1


.
CALL "WR_PARM"
REQ :=M30.0
//
IOID :=B#16#54
// . .
LADDR :=W#16#200
// (512 dec)
RECNUM :=B#16#1
// (DS1)
RECORD :=P#DB30.DBX 0.0 BYTE 14 // DS1 DB30
RET_VAL:=MW32
BUSY :=M30.1
A
R

M
M

30.1
30.0

//
//

. 6.16 SFC55

1 MPI-.

6 PROFIBUS-DP (42 )

14

CPU416-2DP RUN
DP- (SF DP BUSF).
ET200M.
, DPMaster ET200M.
6.4.3
SFC55 WR_PARM
STEP7 Monitor/Modify Variables (. 6.2.3)

ET200M +/-10 V +/-2,5 V
SFC55 SFC.
MB30
(M30.0 = REQ M30.1 = BUSY) MW32 (RET_VAL). MB30
B#16#01. . 30
B#16#00, RET_VAL W#16#7000.
MB30, SFC55.
,
.
:
DP-Master-.
Master ,
SDB DS1.
6.4.4
SFC56 WR_DPARM

HW-Config , DS1
, SFC56 WR_DPARM. SFC
CPU
SDB DS1.
6.17 SFC56 WR_DPARM
STL 1 SIMATIC 400(1).
LAD/FBD/STL.
CALL "WR_DPARM"
REQ
:= M40.0
IOID
:= B#16#54
LADDR := W#16#200
RECNUM := B#16#1
RET_VAL := MW42
BUSY
:= M40.1
A
R

M
M

40.1
40.0

//
// . .
// (512 dec)
// (DS1)

//

6 PROFIBUS-DP (42 )

. 6.17 SFC56 WR_DPARM 1

15

SIMATIC Manager CPU,


MPI- PG/PC .
CPU416-2DP
RUN , DP (SF DP BUSF)
. ET200M
. ,
DP-Master ET200M.
6.4.5
SFC56 WR_DPARM
C STEP7 Monitor/Modify Variables

ET200M.
MB40 (M40.0 = REQ
M40.1 = BUSY) MW42 (RET_VAL). 40 B#16#01.
. 40
B#16#00, MW42 (RET_VAL) B#16#7000.
40. SFC56.
,
.

6.5 () DP- SYNC/FREEZE


SYNC ( ) FREEZE
(
)

Slave. DP-Master

( Broadcast) SYNC / FREEZE.
DP-Slave SYNC FREEZE-. Master 8 . DP-Slave
.
SYNC
Slave. SYNC
DP-Slave DP-Master ,
Data_Exchange.
()
DP-Slave. 6.18
.
UNSYNC SYNC
DP-Slave. DP-Slave
, DP-Master
.

6 PROFIBUS-DP (42 )

16

DP-Master

DP-Slave
SYNC-

SYNC

SYNC

DP-Slave

SYNC

. 6.18 SYNC
FREEZE
DP-Slave. DP-Slave
FREEZE, ,
DP-Master . DP-Slave
FREEZE. 6.19
FREEZE.
UNFREEZE FREEZE
DP-Slave ,
DP-Master. DP-Slave
DP-Master.

6 PROFIBUS-DP (42 )

17

DP-Master

DP-Slave
FREEZE

FREEZE

FREEZE

FREEZE

. 6.19 FREEZE
6.5.1 SYNC/FREEZE c DP-Master IM467
C
.
, SIMATIC Manager
File->New. SYNCFR
. Insert->Station->SIMATIC400-Station
S7-400.
(Rack)
UR2. 1- PS407 10A.
CPU , SYNC
FREEZE. , , CPU 416-1
6ES7416-1XJ02-0AB0 3.
DP-Mastera (IM467)
SIMATIC 400 IM-400.
IM 467 6ES7467-5GJ01-0AB0
4 ( 6.20).

6 PROFIBUS-DP (42 )

18

. 6.20 IM467 Hardware catalog



Properties-PROFIBUS interface IM 467, Parameters. New
.
PROFIBUS 1,5
DP. IM 467 2.
OK. IM 467 4
DP-Master- IM 467 ( 6.21).
Slavea ET200B,
SYNC FREEZE.
PROFIBUS-DP
ET200B B-16DI.
DP-Master- IM 467. Properties-PROFIBUS
Interface B-16DI. PROFIBUS 3
OK.
PROFIBUS-DP->ET200B Master IM 467 B-16DO. PropertiesPROFIBUS Interface B-16DO PROFIBUS- 4
.

.

DP-Master-

IM

467

6 PROFIBUS-DP (42 )

19

.6.21 IM467
SYNC-/FREEZE.

DP-Master- PROFIBUS(1). Properties-DP master
system, Group assignment.
DP-Slave, SYNC-/FREEZE ( 6.22).
DP-Slave, DPMaster- ( PROFIBUS). 1 8
8 , DP-Slave.
Group assignment Properties,
. Properties .
Comment,
(/ ). Properties ,
. ,
6.23. 1 FREEZE-,
2 SYNC-. .
Properties-DP master system, Group
assignment. ( ) B-16DI.
DP-Slave 1.
B-16DO 2 ( 6.24).
OK.

6 PROFIBUS-DP (42 )

20

. 6.22 HW Config

.6.23 HW Config

6 PROFIBUS-DP (42 )

21

.6.24 ET 200B
STATION->Save and Compile.
STOP CPU S7-400.
PROFIBUS IM 467 ET200B
CPU 416-1 RUN-P. CPU RUN.
. HW-Config.
6.5.2 SYNC-/
FREEZE
SYNC-/FREEZE
SFC11. SFC11 1
().
SIMATIC
Manager CPU 416-1. , S7-Programm(1).
S7-Programm(1) Blocks,
OB1 ( 6.25).

6 PROFIBUS-DP (42 )

22

.6.25 SIMATIC Manager


1. Properties OB1.
OK LAD/FBD/STL 1
STL-.
SFC11 Standard Library View->Catalog.
. Library->Standard Library->System
Function Blocks. SFC11 DPSYC_FR ( 6.26).
SFC11 1 STL- ,
6.27.
1 CPU 416-1.
Monitor/Modify Variables.

6 PROFIBUS-DP (42 )

23

.6.26 LAD/STL/FBD-
A M 10.0
FP M 10.4
= M 10.2

// SFC11
// ???
// ( 1 OB1)

GO1: CALL "DPSYC_FR"


REQ :=M10.2
//
LADDR :=W#16#200 // IM467 (512dez)
GROUP :=B#16#1
// 1
MODE :=B#16#8
// FREEZE
RET_VAL:=MW12
//RET_VAL MW12
BUSY :=M10.3
// BUSY M10.3
A M 10.3
JC GO1

//SFC11 ?? ,
// GO1

A M
FP M
= M

// SFC11
// ???
// ( 1 OB1)

10.1
10.5
10.6

GO2: CALL "DPSYC_FR"


REQ :=M10.6
//
LADDR :=W#16#200 // IM467 (512dez)
GROUP :=B#16#2
// 2
MODE :=B#16#20
// SYNC
RET_VAL:=MW14
//RET_VAL MW14
BUSY :=M10.7
// BUSY M10.7
A M 10.7
JC GO2

//SFC11 ?? ,
// GO2

. 6.27 1 SFC11 DPSYC_FR


6 PROFIBUS-DP (42 )

24

Monitor/Modify Variables
, 6.28.

. 6.28 SFC11 DPSYC FR


DP Slave
. 10.0 10.1 1
SYNC FREEZE.
ET200B/16DI FREEZE, ET200B/16D
SYNC. ET200B/16DI
CPU . Monitor/Modify Variables
. ,
QB0, ET200B/16D.
10.0 10.1 0 1,
SYNC FREEZE c .
ET200B/16D
ET200B/16DI .
, SFC11 (BUSY=1) DP-Slave,
SFC11,
. SFC11
( BUSY) Part Process Image.

6.6

DP-Slave DP-Slave DP-Master ( 2).
, DP-Slave DP-Master
- (Response-) one-to-one,
one-to-many ( 6.29).

6 PROFIBUS-DP (42 )

25

DP-Master 1

Request

Request
Response Request

Response

Response

DP-Slave

DP-Slave
Response

DP-Slave

. 6.29 Response- DP-Slave


HW-Config
DP- (Master/Slave),
.
S7-300 CPU315-2DP, DP-Master
DP-Slave, Slave Slave
Slave Master.
,
SIMATIC Manager File->New.
Querverkehr OK.
Insert->Station->SIMATIC 300-Station S7-300,
DP-Master.
I-Slave 5, I-Slave 6 DP-Master/Inputs (. 6.30).

. 6.30 Querverk SIMATIC 300

6 PROFIBUS-DP (42 )

26


I-Slave 5 S7-300-DP-Slave-. SIMATIC Manager
Hardware. Hardware SIMATIC 300.
Hardware Catalog SIMATIC 300 Rack-300.
1 PS 307-2A. CPU
, .
CPU 315-2DP 6ES7315-2AF03-0AB0
2.
CPU
Properties-PROFIBUS interface DP-Master, Parameters.
PROFIBUS- 5 .
Properties-PROFIBUS, General
OK. Parameters
OK. PROFIBUS-
1,5 DP. DP-Master- CPU
315-2DP Properties DP Master.
Operation Mode DP- CPU DP-Slave.
Configuration.
I-Slave. Mode I/Q-,

MS (Master-Slave) DX (Direct Data Exchange).
6.31 .
HW-Config Slave.

. 6.31 I-Slave 5
6 PROFIBUS-DP (42 )

27

SIMATIC Manager I-Slave 6.


PROFIBUS- 6 Slave
PROFIBUS- PROFIBUS(1).
Configuration 6.32.
I-Slave 6.

.6.32 I-Slave 6

S7-300 DP-Master. PROFIBUS- 2
Master PROFIBUS- PROFIBUS(1).
DP-Master, DP-Master.
DP-Slave-
I Slave 5 I Slave 6 PROFIBUS DP Master.
Hardware Catalog, PROFIBUS DP, Configured Stations
CPU 31x-2DP Drag&Drop DP-Master-.
DP-Slave properties ( 6.33)
Connection I-Slave 5 Connect c
DP-Master-.
Configuration /,
6.34 I-Slave 5 ( PROFIBUS-DP
Partner). DP-Slave properties OK.

6 PROFIBUS-DP (42 )

28

. 6.33 I-Slave 5 PROFIBUS

. 6.34 I/O- I-Slave 5


6 PROFIBUS-DP (42 )

29

I-Slave 6 DP-Master-
I/Q-, 6.35.

. 6.35 I/O- I-Slave 6


I-Slave 5
I-Slave 6 . Hardware Config
DP-Master Configuration I-Slave 5. DP-Slave properties
Mode DX
, 6.36,
I-Slave 6. .
I-Slave 6 I-Slave 5 .
Configuration I-Slave 6
, 6.37.

6 PROFIBUS-DP (42 )

30

. 6.36 I-Slave 5 c I-Slave 6

. 6.37 I-Slave 6 c I-Slave 5


6 PROFIBUS-DP (42 )

31

, , SlaveSlave. Slave
Master. (
1), 2, Slave.
S7-300 DP-Master/Inputs.
SIMATIC Manager DP-Master-. CPU
CPU S7-300: CPU315-2DP.
3 PROFIBUS.
DP-Master- DP-Master
properties Configuration.
6.38 ( DX) I-Slave 5 I-Slave 6
.

. 6.38 DP-Master/Inputs
DP-Master
DP-Slave. ,
S7-300-.
I/Q- STEP7-
Monitor/Modify Variables (. 6.2.3).

6 PROFIBUS-DP (42 )

32

6.7

CP 342-5

, CP 342-5
. ,
CPU ,
.
CP 342-5 PROFIBUS Master, Slave
Slave. .
6.7.1 P 342-5 DP-Master
SIMATIC Manager c CP342-5 als DP-Master.
DP-Master- CP 342-5 ET200M c
(. 6.39).

. 6.39 HW-Config PLC CP342-5 - Master

6 PROFIBUS-DP (42 )

33

. 6.39

.
. 1 Standard
Library->Communication Blocks FC1 DP_SEND FC2 DP_RECV,
6.40.
CALL "DP_SEND"
CPLADDR:=W#16#100 // P 342-5 HW-Config (256 dez)
SEND :=P#M 0.0 BYTE 3 //
DONE :=M60.0
ERROR :=M60.1
STATUS :=MW55
CALL "DP_RECV"
CPLADDR :=W#16#100 // P 342-5 HW-Config (256 dez)
RECV :=P#M 5.0 BYTE 3//
NDR :=M30.0
ERROR :=M30.1
STATUS :=MW40
DPSTATUS:=MB50

. 6.40 Slave
CP342-5
6 PROFIBUS-DP (42 )

34

DP_SEND PIQ ,
, , SEND
, , , 240 (
6.41).
PIQ CP
,

239

.6.41 CPU CP 342-5


c DP_SEND
DP_RECV PII CP 342-5
, PII,
.
CPU.
. Monitor/Modify Variables 6-
: MB0, MB1, MB2, MB5, MB6, MB7. MB0, MB1,
MB2 DP-Slave.
DP-Slave MB5, MB6, MB7.
6.7.2 P 342-5 DP-Slave
, 6.42. DP-Slave
S7-300 c P 342-5. CP 342-5
DP-Slave. DP-Slave.
HW-Config, PROFIBUS DP, Configured Station
CP 342-5, DP-Master. CP 342-5
, 6.42.
CPU
. .
OB1 CPU DP-Slave
6.43.
.
Monitor/Modify Variables: 10 Slave
20 Master, , 30 Slave 11 Master.

6 PROFIBUS-DP (42 )

35

. 6.42 CP342-5 DP-Slave

Master
L IB0 //
//
T MB20
L MB30
T QB0 //
//
//

Slave
CALL "DP_SEND"
CPLADDR:=W#16#100 // P 342-5 HW-Config (256 dez)
SEND :=P#M 10.0 BYTE 1 //
DONE :=M60.0
ERROR :=M60.1
STATUS :=MW55
CALL "DP_RECV"
CPLADDR :=W#16#100 // P 342-5 HW-Config (256 dez)
RECV :=P#M 11.0 BYTE 1//
NDR :=M30.0
ERROR :=M30.1
STATUS :=MW40
DPSTATUS:=MB50

. 6.43
CP342-5 DP-Slave.

6 PROFIBUS-DP (42 )

36

6.7.3 P 342-5 DP-Slave


3.2 DP-
DP-.
DP-Slave : ,
Slave, , Slave,
DP-Slave ,
, FDL- S7-
. . DP-
CP 342-5, , FDL- S7-.
, 6.42, Slave CP342-5
DP- CP342-5, -.
Slave CP342-5 The module is an
active node on the PROFIBUS subnet, 6.44. (
).

. 6.44 P342-5: DP-Slave


Slave CP342-5 : 8DI
8DO.
1 Master Slave DP_SEND
DP_RECV, 6.45.
6 PROFIBUS-DP (42 )

37

Master
L
T

7
MB10

CALL "DP_SEND"
CPLADDR:=W#16#100 // P 342-5 HW-Config (256 dez)
SEND :=P#M 10.0 BYTE 1 //
DONE :=M60.0
ERROR :=M60.1
STATUS :=MW55
CALL "DP_RECV"
CPLADDR :=W#16#100 // P 342-5 HW-Config (256 dez)
RECV :=P#M 21.0 BYTE 1//
NDR :=M30.0
ERROR :=M30.1
STATUS :=MW40
DPSTATUS:=MB50

Slave
CALL "DP_SEND"
CPLADDR:=W#16#100 // P 342-5 HW-Config (256 dez)
SEND :=P#M 11.0 BYTE 1 //
DONE :=M60.0
ERROR :=M60.1
STATUS :=MW55
L
8
T
MB20
CALL "DP_RECV"
CPLADDR :=W#16#100 // P 342-5 HW-Config (256 dez)
RECV :=P#M 20.0 BYTE 1//
NDR :=M30.0
ERROR :=M30.1
STATUS :=MW40
DPSTATUS:=MB50

. 6.45 Master Slavea


DP-
,
. Master 7 ( 10), Slave 11; Slave
8 ( 20), ster 21.
FDL-.
STEP7.
NetPro. 6.46.
,
CPU c.

6 PROFIBUS-DP (42 )

38

. 6.46 FDL-c:

FDL Connection.
Display Properties Dialog . ,
6.47.
FDL-,
ID LADDR. , ,
FDL-, ,
.
Route, (
6.48).

6 PROFIBUS-DP (42 )

39

. 6.47 FDL-c:

. 6.48 FDL-:
6 PROFIBUS-DP (42 )

40

OK. NetPro ,
6.49.

. 6.49 FDL-:
.
CPU , ,
6.47. CPU.
.
NetPro.
1.
SIMATIC_NET_CP. AG_SEND
AG_RCV. 1,
6.50.
1, DP-Master
L 5
T MB 70
CALL "AG_SEND"
ACT :=TRUE
ID :=1
LADDR :=W#16#100
SEND :=P#M 70.0 BYTE 1
LEN :=1
DONE :=M50.0
ERROR :=M50.1
STATUS:=MW52

1, DP-Slave
CALL "AG_RECV"
ID :=1
LADDR :=W#16#100
RECV :=P#M 70.0 BYTE 1
NDR :=M50.0
ERROR :=M50.1
STATUS:=MW52
LEN :=MW54

. 6.50 FDL-:
6 PROFIBUS-DP (42 )

41

1 CPU.
Monitor/Modify
Variables. , Master 5
70 70 Slave. Slave 70.
1. FDL- Master.
2. DP-Master DP-Master
DP-Slave S7-.

6 PROFIBUS-DP (42 )

42

Оценить