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

18 S7

S7

S7-300 S7-400
A5E00261410-01

18-1

18 S7 S7

18.1 S7
(S7 Communication) S7
(S7 Basic Communication)


CPU/FM SIMATIC
S7:

SFB
S7-.
SFB
S7-.
, ,
SIMATIC S7 (S7-300, S7-400)
.
, .

STOP

18-2

SFB

S7-
S7-300 S7-400 SFC

.


,

.

,


.
CPU,
, STOP,
.



.


MPI-.

SFB

S7-
S7-300 FB FC
S7-400 SFB SFC

STOP.


.

MPI-, PROFIBUS
Industrial Ethernet.

S7-300 S7-400
A5E00261410-01

18 S7 S7

SFB

S7-

SFB

S7-

,

,


(. /70/, ./101/). (


).



76 .

.


CPU (.
/70/, ./101/).



(USEND / URCV, GET
..)
(S7-300, S7-400
M7).

SFC S7 Basic
Communication (
S7)
, ..

.



:


.

S7-300 S7-400
A5E00261410-01

S7-300:
S7-400: 4

SFC S7 Basic
Communication (
S7)

,
..
DB


.
S7-300:


.

,

.
S7-400:

:

, ,

;


.

18-3

18 S7 S7

IEC 61131-5 S7-400


IEC 61131-5 :
USEND(SFB 8)/URCV(SFB 9)
BSEND(SFB 12)/BRCV(SFB 13)
PUT(SFB 15)/GET(SFB 14) READ/WRITE
STATUS(SFB 22)/USTATUS(SFB 23)
ALARM(SFB 33)
NOTIFY(SFB 36)
START (SFB 19), STOP (SFB 20) RESUME (SFB 21)
.

IEC 61131-5 S7-300


IEC 61131-5 :
USEND(SFB 8)/URCV(SFB 9)
BSEND(SFB 12)/BRCV(SFB 13)
PUT(SFB 15)/GET(SFB 14) READ/WRITE

18-4

S7-300 S7-400
A5E00261410-01

18 S7 S7

18.2

,
, .
, ,
, .
,
.

,
, , OB
. OB ,
,
:


, ( ).

,
.
CPU.
, ,
,
.

SIMATIC
, ,
BSEND/BRCV, ,
"DONE.
""
,
( ) .
, S7- , , PUT/GET
write/read (/) OP

,
S7-300 S7-400
A5E00261410-01

18-5

18 S7 S7

(),

.
S7-300 C7-300 (: CPU 318-2 DP)
( )
32 (checkpoint)
.
.
,
32 ( 8 , ).
S7-400
(checkpoint) ,
.
.
,
PUT/GET write/read ( / ) .


, ,
Communication with SIMATIC ( SIMATIC).

18-6

S7-300 S7-400
A5E00261410-01

18 S7 S7

18.3 S7

S7 .
SFB/FB SFC/FC .
:
SFB/FB
SFB (operating status)
SFB (operating status)
SFC/FC .

S7-300/400

S7-400 "Standard Library"

S7-300 "SIMATIC_NET_CP"

S7-300 SIMATIC NET CP


S7-300.
.

SFB/FB
SFB/FB
. SFB
, .
SFB/FB , ,
.

S7-400

S7-300

SFB 8
SFB 9

FB 8
FB 9

USEND
URCV

SFB 12
SFB 13

FB 12
FB 13

BSEND/
BRCV


( )

(URCV) (,
).
,
() .
.
, -
(BRCV) .

S7-300 S7-400
A5E00261410-01

18-7

18 S7 S7

()

S7-400

S7-300

SFB 14

FB 14

GET

SFB 15

FB 15

PUT

SFB 16

FB 16

PRINT


-


-

( S7-400)

SFB ( S7-400)
SFB (operating status)
.
SFB
.

S7-400
SFB 19

START


(RESTART) S7/M7-300/400 C7-300 CPU,

STOP.
SFB 20

STOP

STOP S7/M7-300/400 C7-300 CPU,

RUN, HALT .
SFB 21

RESUME

S7-400-CPU,

STOP.

SFB (operating status)


SFB (operating status)
.
SFB "STATUS" ,
SFB "USTATUS"
.

S7-400
SFB 22

STATUS

SFB 23

USTATUS

18-8


(M7-300/400
C7-400-CPU .
S7-400-CPU
,
(" ").

S7-300 S7-400
A5E00261410-01

18 S7 S7

SFC/FC
S7-400

S7-300

SFC 62 CONTROL
FC 62 C_CNTRL

,
SFB/FB.

ID.

:
SFC 87 C_DIAG
( S7-400).

Sample Program (-)


- S7-400, SFB S7 STEP 7.
: step7\examples\com_sfb.
- : "..\STEP7\Examples\ZDT01_10".

SFB/FB S7-
SFB/FB S7-
CPU,
( ).
:

S7-300

FB 8

USEND

: 4583 , : 368

FB 9

URCV

: 4880 , : 370

FB 12

BSEND

: 5284 , : 372

FB 13

BRCV

: 5258 , : 374

FB 14

GET

: 4888 , : 336

FB 15

PUT

: 4736 , : 384

FC 62

C_CNTRL

: 546

S7-300 S7-400
A5E00261410-01

18-9

18 S7 S7


S7-300 SIMATIC_NET
.

S7-400
SFB 8/
SFB 9
SFB 12/
SFB 13

BRCV

SFB 14

GET

SFB 15

PUT

SFB 16

PRINT

SFB 19

START

SFB 20

STOP

48+ PI_NAME.

SFB 21

RESUME

52+ PI_NAME
ARG.

SFB 22

STATUS

50

SFB 23

USTATUS

50

18-10

USEND/
URCV
BSEND/

68+
SD_1,,SD_4 / RD_1,,RD4
54
88+
RD_1,,RD4
108+
SD_1,,SD_4
78+ , FORMAT,+
SD_1,,SD_4
52+ PI_NAME
ARG.

S7-300 S7-400
A5E00261410-01

18 S7 S7

18.4 S7
(S7 Basic Communication)
SFC S7
(S7 Basic Communication)
S7
. SFC
.
SFC 2 :
SFC S7 CPU
,
S7- (
"I" ["internal" = ]).
SFC S7 CPU
,
MPI- (
"X" ["external" = ]).
SFC
S7 .
SFC S7 CPU S7300 S7-400. C CPU CPU
S7-200 .

S7-300/400
S7-400 "Standard Library"
S7-300 "SIMATIC_NET_CP"
S7-300 SIMATIC NET CP
S7-300.
.

S7-300 S7-400
A5E00261410-01

18-11

18 S7 S7

SFC (external)

SFC 65/
SFC 66

X_SEND/
X_RCV

SFC 67

X_GET

SFC 68

X_PUT

SFC 69

X_ABORT

. ,
, -
(X_RCV) .

SFC.

.
()
SFC.

.
.

.

SFC (internal)

SFC 72

I_GET

SFC 73

I_PUT

SFC 74

I_ABORT


SFC.

.
()
SFC.

.
.

.

Sample Programs (-)


- S7,
SFB S7- STEP 7.
- : "STEP7\Examples\com_SFC1"
"STEP7\Examples\com_SFC2".


SFC S7-
CPU S7-300 S7-400.
SFC 76
( SD RD).

18-12

S7-300 S7-400
A5E00261410-01

18 S7 S7


SFC S7-
, .
, CONT,
. ,
:
,
( ), ,
(
CPU, . /70/, /101/).

( CPU
), RET_VAL.

. ,
. ,

CPU .
SFB
S7- SFC
S7-.

. ,
, .

,
, SFC,
W#16#80C0 RET_VAL,
.



SFC
S7-
SFC , ,
SFC ,
. ,
SFC.
,
, SFC .

S7-300 S7-400
A5E00261410-01

18-13

18 S7 S7

SFC 65

X_SEND

DEST_ID, REQ_ID

SFC 67

X_GET

DEST_ID, VAR_ADDR

SFC 68

X_PUT

DEST_ID, VAR_ADDR

SFC 69

X_ABORT

DEST_ID

SFC 72

I_GET

IOID, LADDR, VAR_ADDR

SFC 73

I_PUT

IOID, LADDR, VAR_ADDR

SFC 74

I_ABORT

IOID, LADDR


SFC S7 OB .
SFC
,
RET_VAL.
SFC.

CPU


CPU,
.
,
STEP 7,

.

STOP
CPU, (, ,
) STOP , ,
, CPU, .

18-14

S7-300 S7-400
A5E00261410-01

18 S7 S7


,
SFC S7-,
STOP. , ,
FCS, FBS, OB,
SFC S7-.

.
,
,
.

S7-300 S7-400
A5E00261410-01

18-15

18 S7 S7

18-16

S7-300 S7-400
A5E00261410-01