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

12 SFC

S7-300 S7-400
A5E00261410-01

12-1

12 SFC

12.1

SFC39 SFC42
SFC :
SFC39
"DIS_IRT" CPU.
SFC41
"DIS_AIRT" OB.
SFC40
"EN_IRT" SFC42 "EN_AIRT".

.
OB.

SFC41 SFC42

SFC 41 DIS_AIRT
SFC 42 EN_AIRT :
CPU.
,
FC,

FC.


.
OB.

OB

OB10 OB17

OB20 OB23

OB30 OB38

OB40 OB47

DPV1

OB55 OB57

OB60

OB80 OB87 (. )

OB121, OB122
(
SFC36
SFC38)

12-2

OB70, OB72

S7-300 S7-400
A5E00261410-01

12 SFC


,
OB .

OB

(, )

OB80

(, )

OB81

(,
)
- /

OB82

CPU (, )

OB84

OB85

OB83

OB86

OB87

S7-300 S7-400
A5E00261410-01

12-3

12 SFC

12.2
SFC39 "DIS_IRT"

SFC 39 DIS_IRT (disable interrupt [ ])


.
, CPU
:
,
,
.

. "DIS_IRT"
SFC40 "EN_IRT" (. 0)
.

,
MODE [].

, SFC39 "DIS_IRT"
!

MODE

INPUT

BYTE

OB_NR

INPUT

INT

RET_VAL

OUTPUT

INT

12-4

I, Q, M, D, L,

I, Q, M, D, L,

I, Q, M, D, L

,
(.
MODE).

,
,
.

S7-300 S7-400
A5E00261410-01

12 SFC

MODE
MODE
00

.
( ). OB_NR 0.
.
.
() OB
, CPU.
:

01


(watchdog), OB_NR 30 ( OB30
CPU).

,
OB_NR 40.
.
.
:
- :
10
- :
20
- :
30
- :
40
- DPV1:
50
- :
60
- :
70
- :
80
.
.
.

.
W#16#5380.
,
, .
W#16#5380.
, ,
.
W#16#5380.
-

01

02

80

81

82


(W#16#...)

0000

8090

OB_NR .

8091

MODE .

8xyy

, .
RET_VAL

S7-300 S7-400
A5E00261410-01

12-5

12 SFC

12.3
SFC40 "EN_IRT"

SFC 40 EN_IRT(enable interrupt [ ])


,
SFC39 "DIS_IRT". ,
CPU
:
OB OB .
, OB
OB .

MODE

INPUT

BYTE

OB_NR

INPUT

INT

RET_VAL

OUTPUT

INT

I, Q, M, D, L,

I, Q, M, D, L,

I, Q, M, D, L

,

.

,
,
.

MODE
MODE

.
:
- :
10
- :
20
- :
30
- :
40
- DPV1:
50
- :
60
- :
70
- :
80
.
.


(W#16#...)

12-6

0000

8090

OB_NR .

8091

MODE .

8xyy

, .
RET_VAL
S7-300 S7-400
A5E00261410-01

12 SFC

12.4
SFC41
"DIS_AIRT"

SFC 41 DIS_AIRT (disable alarm interrupts [


]) OB OB
, , OB.
SFC 41 OB . SFC 41
.
,
SFC42 "EN_AIRT"
.
,
SFC41, ,
SFC42 "EN_AIRT" .

RET_VAL

OUTPUT

INT

I, Q, M, D, L

(=
SFC 41)


SFC 41,
RET_VAL.

n
"n" , , ,
SFC41 ( ,
n = 0; . "
SFC42 "EN_AIRT").

S7-300 S7-400
A5E00261410-01

12-7

12 SFC

12.5

SFC42 "EN_AIRT"

SFC 42 EN_AIRT (enable alarm interupts [


]) SFC 41
,
DIS_AIRT. SFC41
SFC42.

, ,
SFC41, SFC42.

RET_VAL

OUTPUT

INT

I, Q, M, D, L


SFC 42
.



RET_VAL.
RET_VAL,
0.
SFC. ,
SFC42,
RET_VAL.


n

W#16#8080

12-8

"n" SFC41,
SFC42 (
"n" = 0).
,
.

S7-300 S7-400
A5E00261410-01