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

8 DPV1 SFB PNO AK 1131

S7-300 S7-400
A5E00261410-01

8-1

8 DPV1 SFB PNO AK 1131

8.1 DP-
SFB52 "RDREC"

SFB52 FB "RDREC",
"PROFIBUS Guideline PROFIBUS Communication and Proxy Function
Blocks according to IEC 61131-3" (" PROFIBUS
PROFIBUS Proxy FB IEC 61131-3").

SFB52 "RDREC" (read record [ ])


INDEX DP (
), ID.
MLEN
. VALID TRUE
(), RECORD.
LEN
.
ERROR ,
. , STATUS
.


SFB52 "RDREC" , ,
. REQ
= 1.
(status)
BUSY 2 3 STATUS. 2 3
STATUS RET_VAL
SFC (. REQ, RET_VAL BUSY
SFC).
, BUSY = FALSE
().

8-2

S7-300 S7-400
A5E00261410-01

8 DPV1 SFB PNO AK 1131

REQ

INPUT

BOOL

ID

INPUT

DWORD

INDEX

INPUT

INT

MLEN

INPUT

INT

VALID

OUTPUT

BUSY
ERROR
STATUS
LEN
RECORD

OUTPUT
OUTPUT
OUTPUT
OUTPUT
IN_OUT

I, Q, M, D, L,

I, Q, M, D, L,

I, Q, M, D, L,

I, Q, M, D, L,

REQ = 1:

DP-
().
.

BOOL

I, Q, M, D, L

BOOL
BOOL
DWORD
INT
ANY

I, Q, M, D, L
I, Q, M, D, L
I, Q, M, D, L
I, Q, M, D, L
I, Q, M, D, L


.
BUSY = 1: .
ERROR = 1: .
ID ( 2 3)
.

.


. " DP-
SFB54 "RALRM".

S7-300 S7-400
A5E00261410-01

8-3

8 DPV1 SFB PNO AK 1131

8.2 DP-
SFB53 "WRREC"

SFB53 FB "WRREC",
"PROFIBUS Guideline PROFIBUS Communication and Proxy Function
Blocks according to IEC 61131-3" (" PROFIBUS
PROFIBUS Proxy FB IEC 61131-3").

SFB53 "WRREC" (write record [ ])


INDEX DP (),
ID.
.
RECORD
LEN.
TRUE () DONE ,
DP.
ERROR ,
. , STATUS
.


SFB53 "WRREC" , ,
. REQ
= 1.
(status)
BUSY 2 3 STATUS. 2 3
STATUS RET_VAL
SFC (. REQ, RET_VAL BUSY
SFC).
,
RECORD SFB53,
. LEN.
, BUSY = FALSE
().

8-4

S7-300 S7-400
A5E00261410-01

8 DPV1 SFB PNO AK 1131

REQ

INPUT

BOOL

ID

INPUT

DWORD

INDEX

INPUT

INT

LEN

INPUT

INT

DONE
BUSY

OUTPUT
OUTPUT

ERROR
STATUS
RECORD

I, Q, M, D, L,

I, Q, M, D, L,

I, Q, M, D, L,

I, Q, M, D, L,

REQ = 1:

DP-
().
.

BOOL
BOOL

I, Q, M, D, L
I, Q, M, D, L

OUTPUT

BOOL

I, Q, M, D, L

OUTPUT
IN_OUT

DWORD
ANY

I, Q, M, D, L
I, Q, M, D, L

.
BUSY = 1:
.
ERROR = 1:
.
ID ( 2 3)
.


. " DP-
SFB54 "RALRM".

S7-300 S7-400
A5E00261410-01

8-5

8 DPV1 SFB PNO AK 1131

8.3 DP-
SFB54 "RALRM"

SFB54 FB "RALRM",
"PROFIBUS Guideline PROFIBUS Communication and Proxy Function
Blocks according to IEC 61131-3" (" PROFIBUS
PROFIBUS Proxy FB IEC 61131-3").

SFB "RALRM"
( )
DP. .

, .
SFB54 OB ,
CPU -.

SFB 54 "RALRM" OB,


, SFB
"" .
DB SFB 54
"RALRM" OB. , ,
SFB 54 OB ,
DB OB .

SFB 54
SFB 54 "RALRM" (MODE),
.

8-6

S7-300 S7-400
A5E00261410-01

8 DPV1 SFB PNO AK 1131

0
1
2

SFB 54
, ,
ID NEW TRUE ().
, ,
.
, , F_ID,
:

, NEW = FALSE ();


, NEW = TRUE (),

MODE

INPUT

INT

F_ID

INPUT

DWORD

MLEN

INPUT

INT

I, Q, M, D, L,

I, Q, M, D, L,

NEW

OUTPUT

BOOL

I, Q, M, D, L,

I, Q, M, D, L

STATUS

OUTPUT

DWORD

I, Q, M, D, L

ID

OUTPUT

DWORD

I, Q, M, D, L

LEN

OUTPUT

INT

I, Q, M, D, L

TINFO

IN_OUT

ANY

I, Q, M, D, L

AINFO

IN_OUT

ANY

I, Q, M, D, L

.
DP (),
.

.
.
SFB DB.

(), .
ID I/O: 0
, 1 .

.
( )
OB
.
( )


.
AINFO
MLEN
.

TINFO AINFO,
, SFB 54, .

S7-300 S7-400
A5E00261410-01

8-7

8 DPV1 SFB PNO AK 1131

TINFO

0 19

OB, SFC 54.

20 27

TINFO
20

21

22

BYTE

BYTE

BYTE

ID DP- ( :
0255)

( : 031)

DP- ( : 0127)

03 Slave
()

47 Profile
23

BYTE

:
:

0000:
0001:
0010:
0011:
0100:
0000:
0001:

0
03 Interrupt 0000:
info
(-
)

0001:

8-8

DP
DPS7
DPS7 V1
DPV1

DP

Transparent
()
(

)

(
DPV1

S7-300 S7-400
A5E00261410-01

8 DPV1 SFB PNO AK 1131


()

TINFO

0010:

47 Structure
version
(
)

24

BYTE

0011:

C
(,

CPU)

0000:

0001:

DP-
0=0
0=1

DP
DP-

17
25

BYTE

DP-
0

EXT_DIAG_Bit
0,
.
17
26, 27

WORD

ID- PROFIBUS

AINFO

03
4223

:
:
:
:
ARRAY[0] ARRAY[220]
:

ARRAY[0] ARRAY[59]

S7-300 S7-400
A5E00261410-01

8-9

8 DPV1 SFB PNO AK 1131

Header Information

BYTE

BYTE

1224

463

ID
1:

2:

3:

4:

5:

6:

()

32126

BYTE

BYTE

,
:

0
1

2:

37:

0:
1: ,

2: ,

3: ,

Add_Ack ()

TINFO AINFO
TINFO AINFO OB,
SFB54. .
TINFO AINFO.

8-10

S7-300 S7-400
A5E00261410-01

8 DPV1 SFB PNO AK 1131

55

56

57

TINFO

TINFO

INFO

INFO


DP-

70

82


DP


DP

83


86
/

S7-300 S7-400
A5E00261410-01

8-11

8 DPV1 SFB PNO AK 1131


STATUS .
4- ARRAY[14] OF BYTE ,
:

STATUS[1]

Function_Num

STATUS[2]

Error_Decode

B#16#00,
ID DPV1-PDU:
B#16#80 OR.
DPV1, B#16#C0.
ID

STATUS[3]

Error_Code_1

ID

STATUS[4]

Error_Code_2

ID

STATUS[2] :
Error_Decode
(B#16#)

007F

CPU

80

DPV1

818F

CPU

B#16#8 n-
SFB

FE, FF

DP Profile

Profile-


IEC 61158-6

STATUS[3] :
Error_Decode
(B#16#)

Error_Code_1
(B#16#)
DVP1

00

00

70

00
01
02

8-12

S7-300 S7-400
A5E00261410-01

8 DPV1 SFB PNO AK 1131

( )
Error_Decode
(B#16#)
80

Error_Code_1
(B#16#)
DVP1
,
90

,
92

,
93


ANY
DP-, ID
F_ID

96

CPU

"
" H ,
CPU STOP.
OB. SFB 54
,
,

.

SFC 6 "RD_SINFO". ,
SFC 13
"DPNRM_DG"

DP-
OB 4x, 55, 56, 57, 82 83
( OB).

A0

A1

A2

A3

A4
A5
A7

A8

A9

AA AF

DP ,

DP DDLM
,


DP
( )
DP

DP

DP

.

DP- .

S7-300 S7-400
A5E00261410-01

8-13

8 DPV1 SFB PNO AK 1131

( )
Error_Decode
(B#16#)

Error_Code_1
(B#16#)
DVP1
B0

B1

B2

B3

B4

B5

B6

B7

B8

B9

BA BF

C0

C1

C2

C3

C4

C5

8-14

,
=>256

RECORD ; SFB54:
AINFO

DP


DP
""
DP

DP
()

DP

DP

DP

.

DP- .
, ,
.


.
.

CPU.

.
.
.
.

.
DP
.

S7-300 S7-400
A5E00261410-01

8 DPV1 SFB PNO AK 1131

( )
Error_Decode
(B#16#)

Error_Code_1
(B#16#)
DVP1
C6
C7

C8 CF

Dx
81

00 FF

-
()
-
( )
DP-.
DP

.

DP- .
DP.

DP-.

( SFB54: MODE).

00

82

00 FF

:

( SFB54: TINFO)

88
01

ID.

23

24

ID.

32
3A
89

00 FF

DB/DI
.
DB/DI NULL ID
DB/DI DB/DI
.

( SFB54: AINFO)

01

ID.

23

24

ID.

32
3A

DB/DI
.
DB/DI NULL ID
DB/DI DB/DI
.

S7-300 S7-400
A5E00261410-01

8-15

8 DPV1 SFB PNO AK 1131

( )
Error_Decode
(B#16#)

Error_Code_1
(B#16#)
DVP1

8A

00 FF

10

8F

00 FF

15

FE, FF

00 FF

Profile-

DPV1- DP- CPU SFB


STATUS[4]. DPV1-
0 SFB52:
STATUS[4] RECORD, MLEN
RECORD.
STATUS[4] = MLEN,
MLEN, MLEN RECORD.

8-16

S7-300 S7-400
A5E00261410-01