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

CFC

CFC

o CFC

CFC SIMATIC S7 / M7

10

11

12

13

14

SIMATIC


03/99
C79000-G7000-C733-01
02


,
, .
:

!
!
!

, ,
.

, ,
.

,
.

,
.


.
, ,
,
.

,
,
,
Siemens.
,
, ,
.


SIMATIC, SIMATIC HMI SIMATIC NET SIEMENS
AG.
, ,
; ,
.
Copyright Siemens AG 1998
,
.
. ,
,
, .
Siemens AG

:
/ 4848, D- 90327
Siemens



.
,
. ,
,
.
.
Siemens AG 1998
.

C79000-G7076-C562

CFC, 2,
CFC.
:

CFC

CFC

CFC,
PLC.
( CFC, 2)
CFC
.
-.
,
.
,
.
. CFC, 2.
, ,
, .
CFC
, ,

(PLC).



, .


CFC 4.0

CFC DIN EN 61131-3 (IEC 1131-3)


PLC.

CFC, 1
C79000G7000C73301


CFC, 1 :

1 CFC:
, Step 7.

2
.
, CFC .

3,
CFC, CFC ,
CFC.

4
CPU, CFC.

5 .

CPU,
CFC, 2.

, CFC, 2,
,
.

CFC, 2
1 2 .


, , CFC, 2
10. 6-9 ,
1 .


, ,
, : /250/.
CFC, 2
.


,
, , README ,
Siemens.
,
,
. ,
.
Siemens
Simatic S7.
, .

ii

CFC, 1
C79000G7000C73301

CFC, 2: S7 / M7,
CFC SIMATIC S7 / M7.
:

CFC SIMATIC S7 / M7


CFC,
CFC, 1.


: CFC, 2: S7 / M7, 10.
,
CFC, 1 CFC, 2 S7/M7. ,
10, CFC, 1.



, .


CFC 4.0

CFC, 2: S7/M7
C79000G7000C71502


,
, S7
7. ,
.

SIMATIC S7

SIMATIC
Process Control System 7

Systembeschreibung

/261/
PCS 7 Projektierungsleitfaden
PCS 7

Getting
Started

ES

Handbuch

Handbcher zu
WinCC-Software
und -Hardware

Chargenprozesse
automatisieren

/262/

BATCH
flexible

/256/

WinCC

Handbuch

/257/
Handbcher der
Projektierungswerkze
uge

Basissoftware
fr S7 und M7
STEP7
Benutzerh
andbuch

/231/

CFC
Handbuch

Band 1

CFC
Handbuch

Bibliothek
Basisbausteine

SFC
Handbuch

Band 2:
S7 / M7

/254/

Referenzhandbcher
der Bausteinbibliotheken

/258/
/259/
/260/

/255/

/249/
SCL

Handbcher zu
S7-400 Hardware

FUP
Programm
ierhandbu
ch
/234/
Systemsoftware fr
S7-300/400
Programmentwurf
Symbol

KOP
AWL

Referenzh
andbuch

/250/
/236/

Handbcher der Sprachpakete

Handbuch

/235/

/233/
/232/

/300/
/301/
/302/
/303/
/304/

Systemsoftware fr
S7-300/400
System- und
Standardfunktionen

/100/
/101/
/102/

Bedeutung
Die Dokumentation fhrt in die Methodik ein.
Nachschlagewerke und daher nur selektiv zu nutzen.
Die Dokumentation wird durch eine Online-Hilfe ergnzt.

/xxx/

Literaturnummer des Literaturverzeichnisses


Die angegebene Reihenfolge
ist ein Vorschlag fr den Erstanwender einer S7

ii

CFC, 2: S7/M7
C79000G7000C71502


PCS 7


SIMATIC PCS 7 ,
.

PCS 7 Process Control System


(PCS)

.


SIMATIC PCS 7 " " "
/"
.

STEP
7

STEP7
STEP7. ,
STEP7 STEP5,
, S7
300/400

CFC

CFC, "CFC, 1" "CFC,


2: S/M7",
.

SFC

SFC
.



S7-CPU. ,
S7-300/400 .

.


AWL, KOP, FUP, SCL

STL, LAD, FBD SL


, .
S7-300/400 ,
,
.

CPU S7 ,
.
.
,
S7, (
) .

" ", " PROFIBUS",


" "
.

BATCH BATCH flexible


flexible
,
.
WinCC

WinCC
,
"", .

iii
CFC, 2: S7/M7
C79000G7000C71502

SIMATIC M7

Systemsoftware
Programm fM7-300/400
ierhandbu Programmentwur
f
ch
/280/
Handb cher zu
M7-300/400
H d

Handbuch

Basissoftware
Benutzerh fr S7 und M7
andbuch STEP7
/231/

Technolog.
Funktionen
grafisch
erschalten

CFC
CFC
Handbuch Handbuch

Band

Band2:
S7 / M7

/254/

C/C++
fr M7
/290/

/249/

Debugger
fr C
/291/

Referenzh
andbuch
/281/
Systemsoftware
f r
M7-300/400
System- und
Standardfunktione

Handb cher der


S
h k

Symb
ol

/xxx/

iv

Bedeutun
Die Dokumentation fhrt in die
M
th dik i
Nachschlagewerke
und daher nur selektiv zu
Diet Dokumentation wird durch eine Online-Hilfe
t
Literaturnummer des
Lit
t
i h i
Die angegebene Reihenfolge
ist ein Vorschlag fr den Erstanwender einer
M7

CFC, 2: S7/M7
C79000G7000C71502



M7-CPU. ,
M7-300/400 .

.

STEP
7

STEP7
STEP7. ,
STEP7 STEP5,
M7 300/400

, ,



M7300/400

M7,
M7-300/400.

""
7

.
Borland C/C++.
Borland C
.
CFC, "CFC, 1" "CFC,
2: S/M7",
.

CFC

CFC

/.

Organon XDB386
Borland C/C++.

, 7
.

v
CFC, 2: S7/M7
C79000G7000C71502


CFC, 2: S7 / M7 1
:

10 CFC S7 M7,
CFC STEP7
,
1.

11 .
.

12 ,
, CFC.
CPU.

13 .
14 .
( ,
, ),
CFC.

CFC: CFC
STEP7, .


. , CFC
.

CFC,
.


CPU CFC
.

vi

CFC, 2: S7/M7
C79000G7000C71502



, /243/.
,
.


- ,
,
"Readme",
SIEMENS.
- ,
,
.
, .
SIEMENS
SIMATIC S7.
,
.

vii
CFC, 2: S7/M7
C79000G7000C71502

CFC

i
1-1

1.1

12

1.2

CFC STEP 7

14

1.3

15

1.4

16

1.5

18

2-1

2.1

22

2.2

25

2.2.1

, ,

25

2.2.2

27

2.2.3

210

2.2.4

213

2.3

215

2.4

217

2.4.1

217

2.4.2

218

2.4.3

220

2.4.4

222

2.4.5

223

2.4.6

View()

224

3-1

3.1

32

3.2

CFC

33

3.2.1
3.3
4
4.1



CFC

33
34
4-1
43

4.1.1

44

4.1.2

45

4.1.3

46

4.2

47

4.2.1

47

4.2.2

48

4.2.3

49

4.2.4

49

4.3

410

4.3.1

410

4.3.2

411

4.3.3

413

4.3.4

413

4.3.5

414

4.4
4.4.1
4.5

(I/O)
I/O

415
415
418

4.5.1

418

4.5.2

419

4.5.3

419

4.5.4

420

4.6

422

4.6.1

422

4.6.2

424

4.6.3

424

4.6.4

425

4.6.5

427

4.7
4.7.1
4.8
5
5.1
5.1.1
5.2

428
428
430
5-1
52
53

54

5.2.1

55

5.2.2

56

5.2.3

56

5.3

57


10
10.1

CFC SIMATIC S7 / M7
CFC Step7

I
10-1
103

10.1.1

104

10.1.2

CFC

105

10.1.3

PRO-C/C++ CFC

107

10.2

108

10.2.1

S7

108

10.2.2

S7

108

10.2.3

M7

109

10.2.4

M7

1010

10.2.5

M7

1011

10.2.6

(S7 M7)

1011

10.3
10.3.1
10.4

1012

1012

1013

10.4.1

1013

10.4.2

SFC

1017

10.5

1018

10.5.1

1018

10.5.2

1019

10.5.3

M7

1020

10.6

(S7)

1026

10.7

PLC OS

1027

10.8

1028

10.8.1

S7 PLC

1028

10.8.2

M7 PLC

1031

10.8.3

M7

1032

10.8.4

PLC

1033

10.9
11

1035
11-1

11.1

112

11.2

113

11.3

CFC

115

11.4

118

11.5

11.5

11.6

PLC

1111

11.7

1113

11.8

1114

12
12.1

12-1
123

12.1.1

PLC(M7)

123

12.1.2

CPU

124

12.1.3

124

12.1.4

CPU

124

12.1.5

CPU

125

12.1.6

125

12.1.7

(M7)

125

12.1.8

1213

12.2

1215

12.3

(M7)

1217

12.3.1

1218

12.3.2

1220

12.3.3

1223

12.3.4

1225

12.3.5

1225

12.4

(M7)

1226

12.4.1

PLC

1228

12.4.2

, ,

1229

12.4.3

1231

12.4.4

CPU

1234

12.4.5

1234

13
13.1


S7

13-1
132

13.1.1

133

13.1.2

CFC

135

13.1.3

13.2

M7

1312
1315

13.2.1

1316

13.2.2

1318

13.2.3

1326

13.2.4

1332

14
14.1

14-1
142

14.1.1

144

14.1.2

I/O CFC

145

14.1.3

146

14.1.4

SFC

147

14.1.5

148

14.1.6

S7

149

-1

-1

-1

-1
-1

CFC


CFC, ,
STEP 7.

CFC, 1
C79000G7000C73301

1.1

12

1.2

CFC STEP 7

14

1.3

15

1.4

16

1.5

18

1-1

1.1

CFC?
CFC ( )
STEP7.
CPU ()
.
.

.

CFC
.


CFC STEP 7,
. STEP 7 ,
, CFC.


,
, STEP 7 (, ,
), CFC .
SIMATIC .


CFC .
,
, , .
,
,

.
(runtime ) ,
.

.
.
,
,

CFC.

PLC
CFC
PLC ( ) ,
SIMATIC S7, SIMATIC M7, SIMADYN D. , CFC
PLC,
. CFC,
2.

CFC, 1
C79000G7000C73301

1-2


CFC
, .
CFC, 2 .

CFC . ,
CFC ,
.

CFC 4.0 ,
CFC 3.x.
. (
), ,
. ,
: CFC 3.x
, CFC 4.0.

CFC, 1
C79000G7000C73301

1-3

1.2

CFC STEP 7

SIMATIC
SIMATIC
PLC .
,
(CPU, CFC ) ,
CFC .


PLC ,
,
CFC , I/O
CFC.

CFC SIMATIC
SIMATIC
:

SIMATIC ,
,
.

CFC
New () Save as
( ).

CFC, 1
C79000G7000C73301

1-4

1.3

, ,


CFC, CFC. :

( )


CFC ,
CFC.
,
.



, AND(+), OR(*) ..
CFC,
.

CFC,
CFC .
: . CFC, 2.


,
CPU.
, .
, :

CFC ,
CFC .
,
, .

CFC, 1
C79000G7000C73301

1-5

1.4


PLC.
:
1. .
2. CFC ( )
3. .
4. .
5. run-time .
6. CFC.
7. CFC .
8. CFC .


STEP 7 . /231/,
5.
SIMATIC ,
( ). CFC
SIMATIC (. /231/),
CFC , . 4.1.1 .

()
CFC .
,
. . CFC,
2 /249/.



PLC. . CFC,
2.


,
.
.
. . 4.2.2.

CFC, 1
C79000G7000C73301

1-6



, .
- .
. 4.2.

Run-Time
RunTime ,
PLC.
PLC,
, , ,
.
, runtime
. .
.
. 4.6

CFC
CPU .
PLC ,
, , . . CFC,
2.

CFC
, CFC ,
PLC. . CFC, 2.

CFC
PLC,
. PLC.
PLC.
. CFC, 2.

CFC, 1
C79000G7000C73301

1-7

1.5

PLC
, ,
, PLC .
. CFC, 2.

CFC, 1
C79000G7000C73301

1-8


.
, CFC .
4.

2.1
2.2

.
22
25

2.2.1

, ,

25

2.2.2

27

2.2.3

210

2.2.4

213

2.3

215

2.4

217

2.4.1

217

2.4.2

218

2.4.3

220

2.4.4

222

2.4.5

223

2.4.6

View()

224


Windows 95/NT.

CFC, 1
C79000G7000C73301

2-1

2.1


CFC Windows 95/NT.
Windows ,
, Window.
CFC .

CFC:

(
Windows 95/NT).
CFC. .
. ,
( ,
, .. ) .
. /231/, 3.2

, .
.
, .
, Delete () ,
( ) .


. ,
. ,
,
( ).
. .
, . ,
, .

2-2
CFC, 1
C79000G7000C73301

I/O/

I/O

/ I/O

PLC

PLC

. 2-1


CFC.
.

.

, ,
.
:
() (
) :

:
,
.

:
: CPU , .
() :

Ovw ( )
, ,
.
View()
.

2-3
CFC, 1
C79000G7000C73301



,
. ,
;
.
:

I/O (/)


.
.
.
Ok
() Cancel/Abort ()

. /231/, 3.3.

2-4
CFC, 1
C79000G7000C73301

2.2



() ()
. ,
CFC.
:

2.2.1

, .
.
.
.

, .

CFC.
CPU .
SIMATIC , CFC .

,
.
, .
.

.
.
.

.
View ()
, , ,
,
.

, . ,
,
,
.
.
,
.

.
,
, .

.

2-5
CFC, 1
C79000G7000C73301

.
2.2 (6 ) .

2.2 CFC


2.3 CFC
:

sollw1

stellgr

stoer1

2.3 CFC

2-6
CFC, 1
C79000G7000C73301

2.2.2


.
.
, ,
.

run-time

( )

TE_RE
PI
Temp.reg
10
0

+1000000002
-1000000002
+1000000002
+1000000002
+1000000002
10 1
8
1

W_ W
W X
W KP

OB
002
Y _W
DY W
STOE BI

Run-time

20
0

W TN
W TV
BO H/A
BO EN

2.4 ( )



,
.
, . 2.5

2-7
CFC, 1
C79000G7000C73301

10
6

TE_E

AN

30
0

OB
002

Run time

2.5 ( )



: (. . 2.4, 2.5)

( )

( )


.
,
, .
, ,
.


. (
View
()
. 2.1

FB/FC
( PLC),
;
:

, ,

( )

2-8
CFC, 1
C79000G7000C73301


,
.
, ,
. ,
() .


,
CFC, 2.

2-9
CFC, 1
C79000G7000C73301

2.2.3

,
.
,
CPU. ,
run-time ,
.


:
,
. ,
.
( ).

,
.

PLC
. .
. 2.6 .

, ,
.
. ,
, ,
.
,
, .
,
.
, ,
.
.
, CFC
, .
. 2.6 .

2-10
CFC, 1
C79000G7000C73301

TE_RE
PI
Temp.reg
1
2

OB
002
Y _W
DY W
STOE BI

W_ W
W X
W KP

1
0
1
0 2.
0

5
1

W TN
W TV

7
1
0
2

BO H/A
BO EN

:
1

(-)

(-)

2.6 .

SFC (CFC PCS7).


SFC I/O .
I/O ,
( ), . .
2.7.

Timer
TIMER_
Pulsing function 1
1


0
0
2

BO EN
R SAMPLE T
R TIME0

I MODE
BO RESET

BO IO

OB
32
ENO BO
QERR BO

PTIME R
Q0 BO

2.7 SFC

2-11
CFC, 1
C79000G7000C73301

.
,
. , ,

.

.
CFC ,
, SFC,
. , ,
.
.

2-12
CFC, 1
C79000G7000C73301

2.2.4

,
, .
, ,
.



.
.

1. .
2. .
3. .
4. .

1.

CFC_S2.1

2.

""
2

3.

1
(OB1)

4.

2 ( )

. 2.8

1. :
1.:
, *)
2.:
I/O /
( )
2. :
1.:

. **)
2.:
. **)
3. :
1.:
.
2.:
Enable(),
4. .
1.:
(No position)
2.:
/

2-13
CFC, 1
C79000G7000C73301

*) ,
,

**)

PLC




.
.


. CFC, 2

2-14
CFC, 1
C79000G7000C73301

2.3


, CFC,
, .


.
PLC (.
CFC, 2).
,
:

:
,
:
CFC , .



, .
, , .
,
, ,
.
( ),
, .
,
( ).

,
.


Close () Search ().
.

,
SIMATIC .

2-15
CFC, 1
C79000G7000C73301



View:Catalog (:) (Ctrl+K)
,
Block Insert F2. ,
.

.
, ,
, , ,
.



, .

2-16
CFC, 1
C79000G7000C73301

2.4


CFC.

, ,
PLC.
.

2.4.1


:
-

SIMATIC :
CFC
. CFC
.


:
-

Chart:Exit (:),
.

, CFC ,
. ,
.

,
.
. .
(. /231/)

2-17
CFC, 1
C79000G7000C73301

2.4.2

CFC , ,
, ..
, ,

, (
).
,
.


, ,
. 2.2
.
. 2.2


Object properties
( )


Properties I/O
( I/O)


Properties I/O
( I/O)

( )

(
)

Ctrl

2-18
CFC, 1
C79000G7000C73301



(, , ):
-

,
, CTRL

, (
).
.

- ,
CTRL .

, ,
.
-

( )
.

:
-

,
, , .

, , ,
. ,

.

2-19
CFC, 1
C79000G7000C73301

2.4.3


Windows ,
,
, .

. 2.3
.
. 2.3

Ctrl + N

Ctrl + O
Ctrl + F4
Ctrl + Alt + K
Ctrl + B
Ctrl + P
Alt + F4

Ctrl + X

Ctrl + C
Ctrl + V
Del
Ctrl + A
Ctrl + F
Ctrl + E
Ctrl + Shift + E
Alt + Return
Ctrl + R
Ctrl + F11
Shift + F11


()
:
:


F2

F3

Ctrl + L
Ctrl + D
Ctrl + I

(Chart)

(Edit)

(Insert)
PLC

2-20
CFC, 1
C79000G7000C73301

. 2.3

Ctrl + T

(Debug)

Ctrl + F7
Ctrl + M

Ctrl + Shift + M

F4

Ctrl + H
:
Ctrl + Shift + H
:
Ctrl + F8

Ctrl + F9

Ctrl + Alt + Down
Ctrl + U

Ctrl + Shift + U
Ctrl + Num+
Ctrl + NumCtrl + Shift + N
Ctrl + K
F5


./.

Ctrl + Alt + R

(Options)

Ctrl + Alt + T

(Windows)

Shift + F2
Shift + F3
Shift + F5
Ctrl + F6

:
:
:

F1

(Help)

ESC

Return
TAB
Ctrl + ()

Ctrl + ()

(View)

2-21
CFC, 1
C79000G7000C73301

Ctrl +
()
Ctrl + ()

2.4.4



. , Edit: Go
to (: ),
,
.

Go to ( )
Edit () ,
:

Sheet ()
6
. ,
.

Jump back ( )
, ,
, .

Next overflow page ( )



. ,
.

Previous overflow page ( )



. ,
.

Original sheet ( )

.

2-22
CFC, 1
C79000G7000C73301



, .

.
,
, , .


,
.
.

2.4.5


CFC : (create
mode), (test mode),
.


(
).
, , ,
..


, CFC ,
PLC
.
/
PLC.
PLC.
. CFC, 2.

:
-

Debug: Test mode (: )

Ctrl + T

Toggle ()

2-23
CFC, 1
C79000G7000C73301

2.4.6

View ()


View () ,
:


(
/ )

/
, , I/O,

/ , ,





Overview (
) Detail ( ) (
)
.

/
Zoom (),
.
25% .
:




(100%)



25% ( 50% 200%).
. OK,

.

Settings (),

( PLC):

: / FB/ FC /
:

/ / -

I/O

/ / -

2-24
CFC, 1
C79000G7000C73301

2-25
CFC, 1
C79000G7000C73301

/
/


( PLC)


, ,
Colors. ,
, (. 2.9). ,
,
Current color. Change,
,
.

. 2.9 " "

2-26
CFC, 1
C79000G7000C73301

,
CFC, .
.

Windows95/NT.

3.1

32

3.2


CFC

33

3.2.1
3.3

33
34


CFC
:

:
-

80486 ( )

RAM 16

, ( Microsoft

Windows95/NT)
: 1024x768 ( )
100 (
, ,
)
Windows95/NT

Step 7
(
PLC)

CFC Step7
CFC, 2

CFC, 1
C79000G7000C73301

3-1

3.1


, CFC
,
( ). CFC ,
/ , ,
.

Step7 /231/, 2.1 2.2

Readme.txt ,
2.2 /231/.
.


(, -
),
.
.
(. .: 14 ). ,
, .
. ,
, Siemens.

3-2

CFC, 1
C79000G7000C73301

3.2

CFC


CFC
.
.

CFC
, CFC
,
:

( CFC
Windows95/NT, )

.
, ,
.
,
, .

Step7
Step7
Step7 /231/

3.2.1


Windows95/NT Step7
.


, PLC , CFC
. ,
, (
PLC).
, ,

CFC CFC, 2.


Borland C. (
Continue> ()),
CFC M7 PLC.

3-3
CFC, 1
C79000G7000C73301

3.3

CFC
CFC ,
.
CFC Start ()
Windows 95 :
SIMATIC STEP 7 CFC
,
, SIMATIC (
,
).

SIMATIC
, Windows 95,
SIMATIC ( Step 7)
, SIMATIC .
(File:Open>Project)
(:>) CFC e
(Insert: xx Software>CFC).(: xx >CFC)
, ,
CFC. (. 4.4.1)
, SIMATIC .

3-4

CFC, 1
C79000G7000C73301

CFC


CFC.
,
,
.

4.1

43

4.1.1

44

4.1.2

45

4.1.3

46

4.2

47

4.2.1

47

4.2.2

48

4.2.3

49

4.2.4

49

4.3

410

4.3.1

410

4.3.2

411

4.3.3

413

4.3.4

413

4.3.5

414

4.4
4.4.1
4.5

CFC, 1
C79000G7000C73301

(I/O)
I/O

415
415
418

4.5.1

418

4.5.2

419

4.5.3

419

4-1


4.5.4
4.6

420

422

4.6.1

422

4.6.2

424

4.6.3

424

4.6.4

425

4.6.5

427

4.7
4.7.1
4.8

428

428

430


CFC
:

SIMATIC
PLC ( S7 SIMATIC S7),
.

. . 4.1.1.

CFC

Windows:

:
:
:
(,
Windows
ALT-TAB).

4 -2

CFC, 1
C79000G7000C73301

4.1

/

CFC.


, .

/
CPU
.

!
, CFC,
, "Save"
(). , :
.

( ) .
. ,
(. /231/)



CFC.

CFC
() .

4 -3
CFC, 1
C79000G7000C73301

4.1.1

/ .


, SIMATIC .

( "Insert" ("")).
, .
CFC. :
"Chart: New" (": ").
,
"Object name" (" "). "OK"
. .

CPU.
(..
).

( )
24 .


, SIMATIC .
,
CFC.
, .
"Chart" ("")
, .
, ,
, .
,
"Chart: Open" (": "),
,
(
"OK").

4 -4

CFC, 1
C79000G7000C73301

4.1.2

"Properties CFC" (" CFC")


, ,
.
"Chart: Properties"
(": "), CFC,
"Edit: Object properties" (": "),
SIMATIC .


. ,
CPU.

CFC :
24 .
, ,
.


.
- SIMATIC


, .


. ,
,
. ,
.


, ,
CFC.

4 -5
CFC, 1
C79000G7000C73301

4.1.3


CFC
CPU . ,
, .
SIMATIC
. . /231/.
:


, ( ).

,
, - .

CPU
CPU
:


CPU
, /
, .
CFC.


.

.
, CPU
. ,
.


,
.
.

PLC
CFC PLC.
PLC .


,
SIMATIC . . /231/.

4 -6

CFC, 1
C79000G7000C73301

4.2

CFC
CFC
PLC (, (BOP; )
S7/M7).
.
, .

4.2.1

CFC
CFC
.
.
PLC.
.

4 -7
CFC, 1
C79000G7000C73301

4.2.2


,
.
. ,
.
,
.

.
.

, .

:
,
.
,
, :
-

PLC,


, ,
.

4.6.


CFC ,
, .

, .
,
"Object Properties"
(" ") .

4 -8

CFC, 1
C79000G7000C73301

4.2.3


,
.
.



, "Text"
(""). .
"CTRL" + "RETURN",
"RETURN" "OK" , ,
.


,
, "SHIFT"
. .
,
.

4.2.4


, , (.
1.3) .
"Non-placed blocks" (" ")
. CFC
.

.

4 -9
CFC, 1
C79000G7000C73301

4.3


, .
,
. 4.4 I/O.

4.3.1

"Object properties" (" ")




/


Object Properties (" ")
,

:
, :
-

:
(
) 16 .
(
24 ).

:
14
.
.

:
.
4.6.1.

/:
/.
4.4.1

4 -10

CFC, 1
C79000G7000C73301

4.3.2

,
.
. ,
.

,
SIMATIC
.
. . 4.1.3.




.
.


- .
CPU.
:
1. :
-
.
2. :
, ,
Edit: Cut (": ").
.
- Edit: Paste
(": ").
.
.


:
.
,
.

4 -11
CFC, 1
C79000G7000C73301

( )
, ,
.
, .
(. 2)
, Cut ("")
Copy ("").
,
CTRL .

CPU
CPU .
, . .
4.1.3.

.
.
.
;
.


, .

, .

4 -12

CFC, 1
C79000G7000C73301

4.3.3


"DEL" "Edit: Delete" (": ")


, ,
, .
- ,
. ,
.
.

,
.

,
.

4.3.4

I/O


( NAND, OR, )
( " ").

"Edit: Number of I/Os" (": /")
.
,
. ,
( ).

4 -13
CFC, 1
C79000G7000C73301

4.3.5

, , , ,
( "Edit: Alignment Left/ Right/
Upper/ Lower") (": ///").
(
).
/// .

,
,
. ,
, .

4 -14

CFC, 1
C79000G7000C73301

4.4

,
.
4.5.

4.4.1

I/O


/:

"I/O" "Object properties" ("


")

"Properties - I/O" (" /")

/

:

"Edit: Object properties" (":


").
"Block object properties"
(" ").

"I/O".
.
4-1.


.
. 4-1

"I/O".

Name ("")


( .)

I/O ("/")

IN (), OUT
(), INOUT ()

Type ("")

(BOOL, REAL, ....)

Value ("")

( )

Comment
("")

80

Not dysplayed

,

.

(" ")

4 -15
CFC, 1
C79000G7000C73301

. 4-1

"I/O", .

Debug
("")
Identifier
("")
Unit
("
")
Text 0
(" 0")
Text 1
(" 1")
IEA-Parameter
(" ")
IEA-Signal
(" ")


.
16 .

BOOL.
(
, /, ..), 16 .

BOOL.
0, 16 .
BOOL.
1, 16 .
BOOL.
-
, - .
-
, - .

/

I/O:

"Edit: Object properties" .


"Properties - I/O".

. ,
:
-

( ).

4-2.

4 -16

CFC, 1
C79000G7000C73301

. 4-2

"Properties - I/O"

Block
("")
I/O
("/")
Value
("")
Text 0
(" 0")
Text 1
(" 1")
Comment
("")
Identifier
("")
Unit
("
")
Not Displayed
(" ")
Watch
("")
Parameter
(" ")
Signal
(" ")
SFC access
(

SFC)
(" SFC")

. ,
CONT_C.Controller ( )
,
. : OUT(REAL) PV (
)
.

. "".
0 16 .
BOOL.
1 16 .
BOOL.
80 ,
11
16 .

BOOL.
(
, /, ..), 16 .

BOOL.
,

.

.
-
, - .
-
, - .
(,
SFC).
SFC ( -
" SFC ").

SFC ,
.

4 -17
CFC, 1
C79000G7000C73301

4.5

:
, ,
, , .

4.5.1


.
.

:
, ,
.
.

:
. SHIFT,
.

:
, ,
.
, . ,
, -
.
:
,
.

4 -18

CFC, 1
C79000G7000C73301

4.5.2

,
CFC. PLC .
CFC.

"Insert: Connection to
Operand" (": ") ( "F3",
). "Insert
connection to operand" (" ").


"OK". ,
.
CFC
.

4.5.3

.
,
.
.

,
"Insert: Connection to group" (":
"). "Insert connection to
group" (" ").
CPU .

, ,
.
.

"OK".
.
.
,
, "DEL".
"1".

4 -19
CFC, 1
C79000G7000C73301

4.5.4

,
. :


,
:
.
,
, ,
.
.
.


, ,
"CTRL" .
, ( )
, "CTRL".
.
,
, .



.
.
, .
( ).
-,
.
"Edit: Go to: Jump back" (": :
") ,
.

4 -20

CFC, 1
C79000G7000C73301


,
.
:


,
.
. .


,
:
-

,
,
.
, .

:
-

,
"Edit:
Delete" (": ") "DEL".


,
"DEL".

, "YES".

:
,
, "Edit: Delete" (": ")
"DEL".

4 -21
CFC, 1
C79000G7000C73301

4.6


.
CFC.

""
"" CFC.
, OB
PLC.

4.6.1


,
.
.
, .
4.6.4.

" "

"Object properties"
(" ").
, "Object properties" ("
") "Run-time properties" (" ").
.
(,
). "+" ,
( ) - .
"+" , .
"-".
,
.



"Install".
,
.

4 -22

CFC, 1
C79000G7000C73301

:
-

,
.

,
:
.

,
.


.
( ) "Install".
.


"Remove".
. ,
.


,
. . .


,
. "Search for"
(
).

4 -23
CFC, 1
C79000G7000C73301

4.6.2



. .
,
.
4-1 4-25
.


.
.
.
.
.

.
CFC.

4.6.3


: , CPU.

:
- .
- "-".
,
( , ).

CPU

"Run sequence" ("
").
. . 4.6.4.

4 -24

CFC, 1
C79000G7000C73301

4.6.4


"Edit: Run sequence" (":
"),
. , Windows
95 .
Run sequence
Group

Edit

H elp
OB1\

CPU
OB1 [free cycle]
Groupe1
CFC1.2
CFC1.3
CFC1.4
CFC1.5
OB10
[Uh
OB100 it l
[N
OB101t t]
[Wi d
l
OB11
[Uh
OB12 it l

Comment

Group1
CFC1.2
CFC1.3
CFC1.4
CFC1.5

]
f]
U

[Uh it l
OB13
[Uh
OB14 it l
[Uh
OB15 it l

[Uh it l
OB16
[Uh it l

. 4-1

Name

U
U
U


(,
). "+" , (
) .
. "+"
,
. "-".


.
( , SFC, ) ,
. , ,
.
, - .

.

4 -25
CFC, 1
C79000G7000C73301


, .

. "Yes"
. "No",
.


,
.
.
.
"Edit: Remove" (": ").
, . ,
.



.
"Edit: Search for" (": "),
.
(, , SFC
).
, .
.
, .


,
. ,
.
.
,
,
.
"Run sequence" ("
") :

,
"Edit: Mark default position" (":
"). .


"Group: Exit"
(": ").

4 -26

CFC, 1
C79000G7000C73301

4.6.5


"Edit: Run
Sequence" (": ");
"Run sequence" ("
").

,

.

"Group: New" (": ").


"Create group" (" ").

.
, .
"Run sequence"
(" ") .

( PLC
, "Scan rate" (" ") "Phase offset"
("")
).

"OK".
.



.
( )
"Group: Properties" (": ").
"Edit group" (" ").
.
, .
"Group: Delete" (":
").

("Predecessor for installation"),
,
, .

4 -27
CFC, 1
C79000G7000C73301

4.7

?
/
CFC,
.
, .
FB FC.
BOP ,
CFC.


,
,
, , ..
.
,
.

.
, :


( ).

"Options: Block Types" (":


"), ,
"New
Version".



, ,
.
.
,
( FB <> FC).


,
.
, "Options:>Reports: Block types"
(": : ").
,
.

4 -28

CFC, 1
C79000G7000C73301

4.7.1



. , SFC
, I/O (
).


, .
, "displayed"
(S7_visible:=true) "not displayed"
(S7_visible:=false). , ()
.


.
, ( SFC) .
( SFC) .


,
, .


.
, , .


.
.
, , .


:
:
,
.

4 -29
CFC, 1
C79000G7000C73301

4.8

, CPU
. PLC, .
( "Chart: Compile" (":
") ).


. ,
,
.

,
CFC. (. 5).


, ,
PLC, .
"PLC: Download"
(": ") ( ).
, ,
PLC.
CFC.

4 -30

CFC, 1
C79000G7000C73301


CFC-.

5.1

5.1.1
5.2

52
53

54

5.2.1

55

5.2.2

56

5.2.3

56

5.3

CFC, 1
C79000G7000C73301

57

5-1

5.1


CFC :





"Chart: Print" (": ").

,
. .
, ,
.


"Chart: Print Selection" (": ")
.
, .
, ,
- .


"Chart: Page Setup" (": ")
.


"Use vectors" (" ") "Use grid"
(" ") ( HP LaserJet
).
, "Print
Ture-Type as graphics" (" ")
"Fonts" ("").


Windows95/NT,

,
.
: ,
.
"Settings: Printer" (": "),
"Start", "Printer Setup" (" ")
CFC .

5 -2

CFC, 1
C79000G7000C73301

5.1.1


DOCPRO CFC
, :
.
DOCPRO SIMATIC
.
CFC. ,
.
,
DOCPRO .

.


"Chart: Labeling field" (": "),
: "Part 1" - "Part 4"
"Free fields" (" ").
,
, , , ..

5 -3
CFC, 1
C79000G7000C73301

5.2



"Reference data" (" ")
, :


.
PLC ( .
CFC, 2).



CPU.
.


, .
.
.
,
"View: Update" (": ") "F5".



, CFC ,
.
.

, ,
.

5 -4

CFC, 1
C79000G7000C73301

5.2.1


"Options: Reference data" (":
"). "Reference data" ("
"),
.


"Window" ,
. ,
, .

.
CFC
.
CFC.


Reference data: Open (" : ")
STEP 7.
.
STEP 7
/231/.



. "View"

.
.



.
, ,
.

"Edit: Find" (": ")


. .
,
.



"Edit: Go to Point of Use"
(": ") ,
. (, SFC,
SFC) .

5 -5
CFC, 1
C79000G7000C73301

"Reference data" (" ")


,
CFC. .

5 -6

CFC, 1
C79000G7000C73301

5.2.2

" "
CFC.

5.2.3


5.1
CPU (, ). ,

PLC.

CFC/SFC-Util: Display ref erence dat a - [CFC_BSP\THB1\THB2\Run sequence]


Reference data Ed it Vi ew

Window H elp

OB
30
OB
31

SFC-LaLi
[2\0]
OB
32
OB
33
OB
34
OB
35
OB
36 CFC-LaLi.Timer [TIMER_P |
I
l ]
CFC-LaLi.Konv_1
[R TO I]
GRU3
[2\0]
Press F1 for help

. 5-1: "Reference data"

:
OB3
3

SFC-LaLi
[2\0]

CFC [/ ]

CFC-LaLi.Timer [TIMER_P |
I _._[
l ]
GRU3
[2\0]

[/ ]

5 -7
CFC, 1
C79000G7000C73301

5.3



,
, .
"Help"
.


"Report" ("") "Options" (""),
. PLC
,
. (,
, ..).
,
.
:



( ).

"Print" .
"Page Setup" .

5 -8

CFC, 1
C79000G7000C73301

CFC SIMATIC S7 / M7

10


CFC, Step7.
CFC (CFC
1).

10.1

CFC Step7

103

10.1.1

104

10.1.2


CFC

105

10.1.3

PRO-C/C++ CFC

107

10.2

108

10.2.1

S7

108

10.2.2

S7

108

10.2.3

M7

109

10.2.4

M7

1010

10.2.5

M7

1011

10.2.6

(S7 M7)

1011

10.3
10.3.1
10.4

1012

1012

1013

10.4.1

1013

10.4.2

SFC

1017

10.5

1018

10.5.1

1018

10.5.2

1019

CFC, 2: S7/M7
C79000G7000C71502

10-1


10.5.3

M7

.
1020

10.6

(S7)

1026

10.7

PLC OS

1027

10.8

1028

10.8.1

S7 PLC

1028

10.8.2

M7 PLC

1031

10.8.3


M7

1032

10.8.4


PLC

1033

10.9

1035

10-2
CFC, 2: S7/M7
C79000G7000C71502

10.1 CFC Step7


CFC
10.1 , CFC
Step7:

SIMATIC

STEP 7

STEP 7
CFC

PLC
. 10.1 CFC Step 7

Step 7
Step 7
CFC:

SIMATIC
SIMATIC .
,
(CPU, CFC),
CFC.

Step7
CFC,
I/O, CFC.
-

LAD, STL, SCL


Step 7.
, Step 7 CFC
.



, ,
. ., Step 7.
CFC.

C, C++

M7.

SFC ( S7 PCS 7)

.

( CFC)
.

10-3
CFC, 2: S7/M7
C79000G7000C71502

10.1.1


Windows 95,
Step 7 Basic. PLC,
,
CFC.

CFC S7
CFC S7, STL.
S7, CFC,
CFC.

CFC M7
CFC M7, M7 SYS
Borland C (. 5.01)
M7, CFC,
CFC (. 10.2.4).
, M7
M7, ,
Borland C++
:
-

User-defined ( )
Borland C++ installation ( Borland C++).
.

32-bit Windows (32- Windows) Borland


C++ target platform (, Borland
C++)

Command line tools ( )


Borland C++ tools ( Borland C++)

VisualTools ( ), Borland
Database Engine ( Borland), Examples
() Help ()

Libraries () Run-time libraries


( ). ,
, ,
.


CFC:

10-4
CFC, 2: S7/M7
C79000G7000C71502

M7

S7
CFC

Borland C / C++
SCL

M7-SYS

STEP7
. 10.2 CFC Step 7

10-5
CFC, 2: S7/M7
C79000G7000C71502

10.1.2

CFC

Step 7
10.3 S7,
PLC.

CFC

CFC

LAD/STL
STL

- DB

SCL

STL
LAD

S7

S7 PLC

. 10.3 (S7)

Step 7.
S7 CPU
:
1. () Step 7, ,
SCL,
S7.
()
LAD/STL S7.

10-6
CFC, 2: S7/M7
C79000G7000C71502

2. CFC : ,
(
S7 )
3. CFC CFC.
4. CFC CPU.

Step 7
10.4 M7,
PLC.

CFC

CFC

LAD/STL

-

(Borland C)

S7

M7

( )

.EXE

SIMATIC )

M7 PLC

. 10.3 (M7)

10-7
CFC, 2: S7/M7
C79000G7000C71502

M7
M7 CPU
:
1. Step 7 ,
.
CFC, .
, , CFC.
2. () ,
PLC SIMATIC .
3. ,
CFC.
4. CFC . CFC.
5. CFC PLC .

10.1.3

PRO-C/C++ CFC

API
CFC API ( )
PRO-C/C++. API (.h
.lib) CFC (\STEP7\S7CFC\M7CFAPI\).
. .13.1

10-8
CFC, 2: S7/M7
C79000G7000C71502

10.2

, ,
CFC.

10.2.1

S7
S7
M7
M7
M7
(S7 M7)

S7


S7 ,
( , . 10.2.2)
Options: Block Types (: )

Block Types
,

( ) . ,
, ,
. (.
1, 4.7, )
, .
,
.
User Program
( )
,
Import ().
, .

10.2.2

S7

S7, CFC ,
( ).

10-9
CFC, 2: S7/M7
C79000G7000C71502


.
, Other blocks (
) ( ) S7.
.
.
.


CFC,
,
.

SFC
CFC, SFC,
CFC.
SFC_CTRL CFC ,
SFC_CTRL.
,
SFC .
SFC
SFC /255/.

10.2.3

M7



. - , CFC
, ( )
-.
-
-,
- Windows Explorer (
).


,
Compiler signals error (
) (. 10.2.4).
Compiler signals errors (
) Compiler errors (
), .

10-10
CFC, 2: S7/M7
C79000G7000C71502

10.2.4

M7

M7
PLC. ,
:

CFC:
.
.

:
- .
() .


,
:


Options: Block Types (: ).
:
(:
CFC),
.
.

, .

Import ().
.
-
.
: M7
.
.

-
,
M7 (
)


. . ,
.

- (,

). ,
, .

.
, ,
, .

10-11
CFC, 2: S7/M7
C79000G7000C71502

,
Compiler signals errors (
) Compiler errors (
), .
,
( ).

.
Options: Reports (: ), 7
. Block types ( ).

10.2.5

M7

CFC
, CFC,
CFC .
.
.
, Other blocks ( ) (
, ).
View:
Catalog (: ) .


, .

10.2.6

(S7 M7)


,
Options: Blocks Type (: ).
Delete
(). .


, ,
. SIMATIC
.

10-12
CFC, 2: S7/M7
C79000G7000C71502

10.3

CFC, 1, 4.4.1,
, I/O
(/). , .

10.3.1


. , 0
1, 1 c 0.
.


,
:


Edit: Invert input
(: ).


Properties I/O ( I/O).
Inverted ().
.


,
.
, :
-

,
. ,
.
,
,
.

10-13
CFC, 2: S7/M7
C79000G7000C71502

10.4


CFC, 1.
.


I/O ANY, STRING
DATE_AND_TIME:

(OUT), (
, IN_OUT) FC, FB,
.

I/O ANY I/O .


CFC , (
SKA) (I, Q, M, PI, PQ ..).

I/O STRING DATE_AND_TIME


I/O CFC ( SKA), (
).

: FC ANY, STRING DATE_AND_TIME



, CFC.

10.4.1

, CFC,
, , I/O, , ,
. .

.

simbolic.absolut



. . /231/.

10-14
CFC, 2: S7/M7
C79000G7000C71502

:

:

I/O
.
,
. (
).

,
. CFC
.

, ,
.

(
CONT_S) EN ,
I/O ( I5.1) ,
.


10.1 , ,
I/O .
I/O .
. 10.1 I/O

I/O

8 Bit

IB, QB, MB, PIB, PQB

BYTE, CHAR

16 Bit

IW, QW, MW, PIW, PQW WORD, INT, S5TIME

32 Bit

ID, QD, MD, PID, PQD

DWORD, DINT, REAL, TOD,


TIME

10-15
CFC, 2: S7/M7
C79000G7000C71502


:
. 10.2

Limit switch

, , .

.

Recipe.Setpoint

(recipe).
(setpoint)
.

I5.1

I5.1.
, ,
,


:
. 10.3

I5.1

5.1

I5.1

5.1

M6.7

6.7

MW10

(2 ) 10

DB10.DBW20

10, 20

DB20.DBX2.1

10, 2.1


,
DB .
:


CFC .


CPU.

10-16
CFC, 2: S7/M7
C79000G7000C71502



, Insert connection to operand
( )
(.. ).
.

.
,
.
Chart:
Consistency Check (: ) ,
.
Options: Reports (: ).


Options: Symbol Table (:
),
. . /231/
.


View: Update (: )
F5, /
CFC .

10-17
CFC, 2: S7/M7
C79000G7000C71502

10.4.2

SFC

SFC (SFC PCS7)


SFC CFC
.
CFC.


SFC ,
(.
CFC, 1, 2.2.3. . 2.7).

SFC
SFC.
I/O ,
. I/O SFC,
SFC accesses ( SFC)
SFC . (. 10.5)

. 10.5 () SFC

SFC SFC ,
.

SFC
,
SFC , ,
- .

, SFC ,
.

10-18
CFC, 2: S7/M7
C79000G7000C71502

10.5

4.6 CFC, 1
, .
:



M7

10.5.1

M7
(OB) S7.


. 4.1 ( CFC, 1, 4.6.4)
.


. S7 PLC , M7
. . 10.5.3.


.
, .
(
. CFC,
1, 4.6.5).
/
. . 10.5.2.


:
, .
: ,
, .
(.
CFC, 1, 4.6.4)


.
, , .
,

.

10-19
CFC, 2: S7/M7
C79000G7000C71502

10.5.2





.
.
.


, (. 1, . 0). .
0, .
1.
.
CFC
.
. . 4.5.3.


,
n- . n (n =
t
2 , 0 t 15). .
:
: 1 .
: 2,4,8,16 ..
1,
.



CPU.
n, .
n, m . m
, 0mn-1. 0,
.

,
, .

, ,
.
, ,
.

10-20
CFC, 2: S7/M7
C79000G7000C71502

8 3

0 1 2 3

11

19

n
t

. 10.6 :

10.5.3

M7

CFC M7 PLC
, RMOS. ,
CFC
,
CPU .

Priority classes.
CPU,
.


CPU (
):

1
3 ( )
9
8 (
)

10-21
CFC, 2: S7/M7
C79000G7000C71502


. ,
, .
Processor error ( ) I/O access error
( I/O) ,
.
.
CFC RMOS ,
. 10.7

CF
2

RMO

13

13

13

10

10


Processor error
I/O
I/O access error

. 10.7

1 . 26 .


,
.
, Active (),
. ,
Inactive () ,
, .
.
PLC:
Additional functions (PLC: ), CFC priority
classes ( CFC). . 12.1.7.

10-22
CFC, 2: S7/M7
C79000G7000C71502


:
1. CFC, CPU,
.
2. Options: Priority classes (:
). Priority classes (
).
,
(, , ) .
-

.
.
,
.
.
, .
, , .
3. Apply ()
.
,
.

/
CPU PLC .
,
Stop/Run (/).
, ,
.

Startup/Background (/).


.
,
. :

I/O
, ,


, , 0 (
)


,
.

, ,
.
.

10-23
CFC, 2: S7/M7
C79000G7000C71502


, Errors.


,
. Event (),
CFC. ,
.
Software Interrupts ( )
( 0 24) ,
.


.
,
. .

. 10.8 Run-time properties:Hardware interrupts

10-24
CFC, 2: S7/M7
C79000G7000C71502


Hardware Interrupts ( ):

( )
(0-24)
/

:
-

Insert
symbol( )
.
, .

, , ,
-.
32 .
.
,
, :

,
,

,
().

. 10.9 Run-time properties: Cyclic Interrupts

10-25
CFC, 2: S7/M7
C79000G7000C71502

Cyclic
interrupt ( ) :

(0-24)
() . . .
. . .
./.

:
,
.
, ,
.
:
,
,
.
.
CPU.

.
1 . .

.
1. 1: 8. 0( ).
2. 2: 8. 3 .

11

16

19

1
2

. 10.10

10-26
CFC, 2: S7/M7
C79000G7000C71502

10.6 (S7)

,
CFC, .

. , PLC
.


,
, Object
properties ( ) . General ()
Special object properties ( )
Message () . ,
.
Message ()
Edit () , Special object properties
( ) .

10-27
CFC, 2: S7/M7
C79000G7000C71502

10.7 PLC OS (S7).

PLC OS CFC PCS7.


PLC <> OS Engineering 1.
WinCC-OS Step7,
WinCC.
PLC <> OS Engineering 2.

PLC OS
PLC, WinCCOS PLC OS, .
OS,
.

.
, ,
, Operator C and M
possible ( )
Operator control and monitoring ( )
Special object properties ( )
Object properties ( ) .
ES
/256/.

10-28
CFC, 2: S7/M7
C79000G7000C71502

10.8

:

S7 PLC
M7 PLC

10.8.1

S7 PLC

,
PLC Settings
for Compiling ( ).
, CFC,
S7, FC () , DB ( ).
FC , , CFC
:

OB FC
FC
DB :

FB DB
DB , ,
, FC. DB DB. DB
, (4 Kbytes).

SCL

SCL.

SCL, ,
CFC. ,
. FC,
, SCL
:
Internal symbol table is full (
).
: .
FC,
FC.

CFC,
SCL, . ,

.

10-29
CFC, 2: S7/M7
C79000G7000C71502



Chart: Compile (: ) . Ok
.

Scope: Complete ()
, PLC. ,
CFC,
- .

Scope: Details ()
PLC,
.
(, , ..),
.
.
.

:
.
, .

SCL
Settings () Compile
(), ,
.
SCL, , :



. .


, ( )
.

Print () . Close () ,
.

Options: Reports.

10-30
CFC, 2: S7/M7
C79000G7000C71502


:
Options: Compilation settings (:
), (. .
10.11), FC DB.
CFC.
PLC , CPU
. , (general) (()).

.

FC DB CPU.
FC DB CFC( CPU
)

FC DB CFC.
CPU ,
n/a.
Compress (),
FC DB. ,
, .
, DB .

. 10.11 Settings for compiling

10-31
CFC, 2: S7/M7
C79000G7000C71502

10.8.2

M7 PLC

Chart: Compile (:
) . OK.
:

Borland C
,
Borland C,
CFC:
Chart: Compile (: ) ,
, Options ().
,
,
Borland C.

/
M7. CFC
. ,
M7 CPU .


, CPU
Options (). Version of
the M7 system software ( 7).
. . 10.8.3
, ,
.


(
) ,
M7 Reports ( 7).

10-32
CFC, 2: S7/M7
C79000G7000C71502

10.8.3

M7


Options M7 code generator (
7), Options
Compile () Optimize DB accesses to run time
( DB ).



,
, M7
(. ).
.
:
-

M7 PLC


/. , M7 PLC
STOP.


,
. , DB
,
. CFC
.
.
,
. ,
M7-SYS, 2.0 ,
.



, STOP,
CFC
( ).

PROC:
, ,
DB, .
,
,
, S7 (,
SKA). CFC
,
S7.

, ,
CFC . SKA.

10-33
CFC, 2: S7/M7
C79000G7000C71502

10.8.4

PLC


CPU,
PLC.
CPU, .

CPU .
, ,
.

CPU
, , CPU
.

S7 M7 PLC
PLC: Download ( ).
,
.

(S7)
Step7 Complet program
() Details().
;
.
CPU RUN-P.

. , 100% ,
Stop () - ,
(,
).

STOP README
STOP . ,
, Online
downloading of changes ( )
RUN-P.

10-34
CFC, 2: S7/M7
C79000G7000C71502

(M7)
CFC ,
(N7RMOS32) M7
CPU.
CPU STOP RUN-P.
RUN-P, CFC CPU
STOP. CPU RUN-P,
CPU: Operating Mode"
CPU , CFC
(, , /)
.
.
OK, .
CPU STOP (
. 12.1.4.).

Manage M7 system
CFC (CFC run-time system) M7 CPU
Download PLC ( PLC) (
: M7 RMOS32 ).
Programs () Generating
System ( ) Install>
().
. CFC ,
CFC.
M7 CPU .
CFC ,
,
() CPU .

10-35
CFC, 2: S7/M7
C79000G7000C71502

10.9

, PLC , , , OS
WinCC ( ),
CFC ( )
.

Chart: Read Back...


(: ). .
-

, ( PLC)


, ,
.

10-36
CFC, 2: S7/M7
C79000G7000C71502

11

,
CFC. ,
SIMATIC CFC, ,
, PLC
.

11.1

112

11.2

113

11.3

CFC

115

11.4

118

11.5

11.5

11.6

PLC

1111

11.7

1113

11.8

1114

CFC PLC.
,
, S7.
, -.

.
.

"CFC, 2: S7/M7
C79000G7000C71502

11-1

11.1

CFC ,
S7-400 PLC (

).
, Windows 95
STEP 7 ( SCL) CFC .
,

Windows. .......

, CFC, SIMATIC
. STEP 7.

STEP 7 Windows 95.


SIMATIC .


. ,

. -
, ....

11-2

"CFC, 2: S7/M7
C79000G7000C71502

11.2

.
SIMATIC .
.
(New project)

New project (" ") ,


( auto_ex)
OK.
, .
. ,
MPI, .

, .
, CPU,
, .

,
, CPU .

HWCONFIG. HWCONFIG ,
SIMATIC.

S7 -
.


Insert Program S7 Software
( - - S7)

Blocks
Sources S7 . ,
, ,
.
, , Sources ,
Blocks OB1.
CFC .

S7 ,
.

Insert New Object S7 Software Chart Container


( - S7 - )

11-3
"CFC, 2: S7/M7
C79000G7000C71502

Insert New Object S7 Software CFC


( - S7 - CFC)
CFC . .
.

, cfc_reg1.
SIMATIC Manager - [auto_ex - <Standardhierarchie, Offline>
(P
j kt)]
Datei Bearbeiten Einfgen Zielsystem Ansicht Extras Fenster

cfc_reg1

auto_ex

S7-Program(1)

Sources

Blocks
Charts

, . ,
.

11-4

"CFC, 2: S7/M7
C79000G7000C71502

11.3 CFC

, ,

.
,
.
: (TIMER_P) (CONT_S).
: (Q0)
(I0), (PTIME)
(SP_INT).
(LMN) (PV_IN).
(TIME0), 70,
.
70 ,
OB 32.
1
(SAMPLE_T). ,
(input MODE=2).

11-5
"CFC, 2: S7/M7
C79000G7000C71502

CFC
,
CFC.
CFC,
.
View .
(Catalog)

Bausteinkatalog

Text
BIT_ LGC
COMPARE
CONVERT
MATH_ FP
MULTIPLX
WRD_LGC
Other Bl ocks
S7-Program
Li braries
SFC
CFCLIBS
StdLi b30
stdli b

Li braries


.
.

CFCLIBS.
ELEMENTA, ELEM_300 ELEM_400.

ELEMENTA.
TIMER_P [FB5].
,
. .
, .
.
CONT_S. (
)
. , ,
ELEM_400. CONT_S[FB2] .
.

11-6

"CFC, 2: S7/M7
C79000G7000C71502

, ,
:

CONTROL

(: CONT_C)

IMPULS

(: TIMER_P)


.

Sheet view.
.

11-7
"CFC, 2: S7/M7
C79000G7000C71502

11.4

.

Q0 I0
PTIME SP_INT.
LNM PV_IN.

. .
R , BO .

11-8

"CFC, 2: S7/M7
C79000G7000C71502

11.5

,
.

Edit
(

Run sequence
)

Run
sequence (" ").
OB, .
OB 35 (
100 ms). ,
OB100 ( ).

OB35.
, (
/, ).
OB32. ,
OB32 .
OB100, ,
.
.


.
, .
Properties I/O (" /").
:

TIMER_P
Object properties (" ").
I/Os. , ,
.
Values ("")
:
MODE:
0 2 ( )
TIME0:
0.0 70.0 ( 70 .)
Watch ("") ,
: I0, PTIME, Q0.

CONT_S
:
MAN_ON:
1 0 ( )
GAIN:
2.0 0.1 ( )
TN:
20s 50s ( )
GAIN TN
. ,
, -
.

11-9
"CFC, 2: S7/M7
C79000G7000C71502


, . ,
OK :
(Add to w atch list)

( )

.
: .


.


,
.
:
(Invert input)

( )
.


,
.
, ,
.

2
CONT_C
Continuous PID

1
TIMER_P
Impulsfunctio
1
10.0
70.0
2
0

11-10

BO
R
R
I
BO
BO

EN
SAMPLE_T
TIME0
MODE
RESET
I0

OB100
ENO BO
QERR BO
Q0 BO
PTIME
R

1
0
0
1
1
0
0
0
1s
16#0
0.0
0.1
50s
10s
2s
0.0
100.0
0.0
1.0
0.0
1.0
0.0
0.0
0.0

BO
BO
BO
BO
BO
BO
BO
BO
TI
R
R
W
R
R
TI
TI
TI
R
R
R
R
R
R
R
R
R

OB32
1
EN
ENO BO
MAN_ON
R
LMN
PVPER_ON LMN_PER W
P_SEL
QLMN_HLM BO
I_SEL
QLMN_LLM BO
INT_HOLD
LMN_P R
I_ITL_ON
LMN_I R
D_SEL
LMN_D R
CYCLE
PV R
SP_INT
ER R
PV_IN
PV_PER
MAN
GAIN
TN
TV
TM_LAG
DEADB_W
LMN_HLM
LMN_LLM
PV_FAC
PV_OFF
LMN_FAC
LMN_OFF
I_ITLVAL
DISV

"CFC, 2: S7/M7
C79000G7000C71502

11.6 PLC


.
:
(Compile)

()
"Compile" ("") :
PLC:

S7-CPU(general)
Charts

"Scope" .
(complete),
(delta).
. ,
,
(complete). "OK" .
.
"SCL code is being generated" ("
SCL") "Data blocks are being generated" (" ")
.
"Compile" ("")
.


,
.
, , .
"Consistency Check" (" ")
"Chart" ("").


"S7 reports"
(" S7") "Compile" ("")
. :
W: The program is not assigned to a concrete CPU.
The CPU quantified project scope will not be checked .
(: - CPU. CPU
)
- CPU
, : "Code
generation: 0 error(s) and 0 warning(s) found" (" : 0
0 ").


, .
CPU.

CPU
CPU
STOP.

CPU STOP.

11-11
"CFC, 2: S7/M7
C79000G7000C71502

CPU
CPU,
.

PLCClear/Reset
( - /)
, CPU
( )
.


, CPU STOP
.
:
(Dow nload)

()
"Download S7" (" S7") "OK".
.
"Blocks successfully downloaded to CPU" (
CPU) "OK".

11-12

"CFC, 2: S7/M7
C79000G7000C71502

11.7
CPU RUN
CPU .
CPU RUN.

RUN.

:

"Toggle switch" (" ")


.
(Test mode)

( )
TEST CPU .

, , ..
. I/O,
.



. ,
, 10.0
"SAMPLE_T".

"SAMPLE_T"
"Properties-I/O" (" - /").
"OK".
, PTIME
10 ( ), ,
70 7 .



(Test mode)

( )
CFC


,
PLC.
, .

11-13
"CFC, 2: S7/M7
C79000G7000C71502

11.8

.
.



"Assignment of the planning objects to S7 resources" (
S7), "Cross references for block types" (
) "Run sequence" ( ).

(Reference data)

( )
"CFC/SFC-Util: Display reference data"
(" CFC/SFC: ")
,
(Print)

()
.


.
, .
,

(Print)

()

. ,
Alt+F4
,
CFC: Chart: Exit
("CFC : ")
CFC .
SIMATIC Manager: File: Exit
("SIMATIC Maneger: : ")
SIMATIC
Windows.

11-14

"CFC, 2: S7/M7
C79000G7000C71502

12

, CFC
,
.

12.1

123

12.1.1

PLC(M7)

123

12.1.2


CPU

124

12.1.3

124

12.1.4

CPU

124

12.1.5

CPU

125

12.1.6

125

12.1.7

(M7)

125

12.1.8

1213

12.2

1215

12.3

(M7)

1217

12.3.1

1218

12.3.2

1220

12.3.3

1223

12.3.4

1225

12.3.5

1225

12.4

(M7)

1226

12.4.1

PLC

1228

12.4.2

, ,

1229

12.4.3

1231

12.4.4

CPU

1234

12.4.5

1234

"CFC, 2: S7/M7
C79000G7000C71502

12-1


CFC :
(Create) (Test) ( .
12.1.8).

Create
CPU (. CFC, 1, 4
CFC).

(S7 M7)

(M7)


(M7)

, CPU.


CPU .
, Create, Test
(
, , ..).
Test
( , ,
..).

Create ,
, (. 12.2)
(. 12.4.2 12.4.3).
,
(
, ,
, , ..).



CPU.

12-2

"CFC, 2: S7/M7
C79000G7000C71502

12.1


.
:

, (. 10.8.4),
CPU, ..

, ,

,


,
.

12.1.1

PLC (M7)

PLC: Manage PLC (": ")



M7 PLC.
SIMATIC . . /231/.

M7
/.
CFC , ,
M7 CPU .
Manage PLC (" ")
M7,
M7. , CPU.
10.8.2.

CFC M7
CFC CFC
PLC: Manage PLC. (": ") .
10.8.4.

12-3
"CFC, 2: S7/M7
C79000G7000C71502

12.1.2

CPU

"PLC:Compare" (": ")


CPU.
:

Create
Test
e
/
.
,
CPU CFC.
, ,

.

12.1.3


CPU,
"PLC: Module Information" (":
").
SIMATIC
. /231/.

12.1.4

CPU


CPU "PLC:
Operating Mode" (": ")
"Complete Restart/Restart" ("/ ") "Stop"
.
SIMATIC
. , /231/.
CPU
/234/.

12-4

"CFC, 2: S7/M7
C79000G7000C71502

12.1.5

CPU

( ) ,
CPU .
CPU STOP.
"PLC: Clear/Reset" (": /").
SIMATIC
. /231/.

12.1.6


CPU,
"PLC: Set Time and Date" (": ").
SIMATIC
. /231/.

12.1.7

(M7)

"PLC: Additional Functions" (":


") :

CFC system status (" CFC"),


CPU .

CPU,
.
.

CFC interrupt stack (" CFC")


, PLC.
PLC
HOLD (, ) STOP
(, ).
.

"Status of CFC priority classes" ("


CFC")
(, )
, PLC,
.
,
" CFC".

12-5
"CFC, 2: S7/M7
C79000G7000C71502

CFC
"PLC: Additional Functions" (":
") "CFC system status" ("
CFC")

CFC System Status


System
Status: RUNNING

Print

Memory utiliz ation: 67%

Priority classes
Priority class:

Prio:

OB1

Size: [bytes] Start s:

1024

194 m s
100 m s
190 m s
15 ms
196 m s
20 ms

End priority cl ass


Start priority class
End priority cl ass
Start priority class
End priority cl ass
Start priority class

813

Duration current: minimum: m aximum:


94 ms

92 m s

246 m s

Diagnostic dat a
Instant:
0d 0h
0d 0h
0d 0h
0d 0h
0d 0h
0d 0h

Event:

11 m in 18s
11 m in 18s
11 m in 18s
11 m in 18s
11 m in 18s
11 m in 18s

415ms
415ms
315ms
315ms
215ms
215ms

Priority class:
OB1
OB1
OB1
OB1
OB1
OB1

Prio:
1
1
1
1
1
1

Sear ch for

Close

Help

. 12-1 "CFC System Status"



(, HOLD)
.



, . ,
,
CPU , .

, ,
, .
:

, .
"Duration current" ,
( HOLD STOP
).
,
,
, .

12-6

"CFC, 2: S7/M7
C79000G7000C71502


5000 ,
. ,
"" .
:

( CPU)
:

( ,
, )


.

"Search" "Search
for Diagnostic Data" (" "),
.

Search for Diagnoctic Data


Condition
Bracket:

Data cell

Operator

Compare with:

Bracket:

Operator:

Complex condition:
Sear ch dir ection
Up
Down

Line
Insert abo ve

Insert below

Delete

Sear ch for

Close

Help

. 12-2 "Search for Diagnostic Data"

12-7
"CFC, 2: S7/M7
C79000G7000C71502


,
.

Bracket Data field Operator

Compare with Bracket Operation

(" - - - - - ")
( ).

Bracket

Data Cell
.
, .

Operator
:
(=), (<>), (>), (<), (>=),
(<=).

.
.

Compare with
,
Data Cell ( ).
. ( , ).

Bracket
. .

Operation
AND, OR.
, AND, OR.
, OR
.

Insert Line Above/Below


"Insert Above" (" ") "Insert below"
(" "), ( ),
, .
,
.
Date Cell, Operator Compare with.
( )
. ,
.
,
.

12-8

"CFC, 2: S7/M7
C79000G7000C71502


"Delete" .

/
"Up"/"Down".
,
, .


"Start" .
.
"Search for diagnostic information" ("
") :
Search

Criterion...

"Search for Diagnostic Data"


Close

"CFC System Status"

CFC-
"Print" "CFC System Status" ("
CFC") .
, "Print CFC
System Status" (" CFC").

, .

.
.

12-9
"CFC, 2: S7/M7
C79000G7000C71502

CFC-
"PLC: Additional Functions" (":
") "CFC interrupt stack"
(" CFC") .

CFC Interrupt Stack


Operating mode transition of the System
Event: HOLD by progr amming d evice
Instant: 0d 0h 14min 27s 66ms 882 ms

Priority class:

Interrupt point(run-time group / block):

OB1

... / m 7_1P1.2

Sear ch for

Go to

Print

OB1
Priority:
1
Starting time: 0d 0h 14min 27s 63ms 23
Interrupt point: ... / m 7_1P1.2

Close

Help

. 12-3 "CFC Inte rrupt Stack"


,
.



.
,
.
,
, .



: ( ), ,
CPU
.

12-10

"CFC, 2: S7/M7
C79000G7000C71502


"Search" , "Search for
Stack Element" (" "),
.
,
"Search for Diagnostic Data"
(" ").
:
: , ,
.


"Print" "CFC Interrupt Stack" ("
CFC"), "Print Interrupt Stack"
(" ") (. "Print System
Status").

CFC
"PLC: Additional Functions" (":
") "Status CFC Priority
Classes" (" CFC")
.

Status CFC Priority Classes


Priority Cl ass:

Status:

Priority:

OB1

enabled

Print

OB1
Status:

Enabled

Priority:

Disabled

Apply

Close

Initial Values

Help

. 12-4 "Status CFC Priority Classes"

12-11
"CFC, 2: S7/M7
C79000G7000C71502


. CFC PLC ,
. ( "enabled"),
, -
( ).



, .
, .
2 24.


"Apply" ,
CPU.


"Initial values"
CFC.

CFC
"Print"
, , , .

12-12

"CFC, 2: S7/M7
C79000G7000C71502

12.1.8



"Test".

M7: , CPU
"RUN-P" .
"RUN",
CFC .
CPU,
.


"Debug: Test Mode" (": ")
("Toggle switch") (" ")
.
.
, "Create"
.
,
.


, ,
. S7
; M7 -
M7: ,
,
, ,
.


"Test" ,
"Create" - .
"Debug: Test
Mode" (": ") ("Toggle switch")
(" ") .

12-13
"CFC, 2: S7/M7
C79000G7000C71502


M7: / CPU ,
,
.
: CFC- PLC.

M7: CPU HOLD


, ,
. ,
CPU RUN STOP.
CPU.

PLC
.
"Create" .


,
(M7).
.
CFC , ,
/
.

PLC.
,
(, , )
. ,
.
.
,
.

12-14

"CFC, 2: S7/M7
C79000G7000C71502

12.2 /


("Watch").
, .
,
.

.
, , FC, ,
STRING, DATE_AND_TIME, ANY.

/

( ) "Debug: Add to Watch List"
(": ") ("block I/O")
.
"Debug:
Remove from Watch List" (": ")
("delete block I/O") .

/
,
. (, 500
) .
("faulty").

/

.
"Properties" (""),
"Watch".
:

("Create").
"Properties" (""),
.

12-15
"CFC, 2: S7/M7
C79000G7000C71502

/

:

"Debug: Watch" (": ")


(glasses) .
,
.

, ,
.

.
: (. 12-1)
. 12-1

CFC ( )


(offline)

, CPU

####
,
CPU,
()

"Debug: Test Settings" (":


") ,
, .
: 1 .



, .
CPU, .

, ,
CFC.

12-16

"CFC, 2: S7/M7
C79000G7000C71502

12.3 (M7)


.
,
.
,
.
.
.

.

, :

,
( ) ,
,
,
,
.

12-17
"CFC, 2: S7/M7
C79000G7000C71502

12.3.1


"Oscilloscope"
("").
"Debug:
Oscilloscope" (": ").
, .

Oscillosope [Chart Container:1]


Osci lloscope:

Insert

Hammer

Time (scal e):

Name

Delete

Print

Recording

ms

Chang

250 value(s) (start at 0)=>every 10


Immediat e triggering

m7_1P1. 1 Q
FALSE

Start

m7_1P1. 2 Q
FALSE
m7_1P1. 3 Q
FALSE
m7_1P1. 3 QN
FALSE
m7_1P1. 3 QL
FALSE

m7_1P1. 1
Q
Upper limit
0

300

600

900

1200

1500

1800

Lower lim it
Optimized disp lay

. 12-5 "Osillosope "

12-18

"CFC, 2: S7/M7
C79000G7000C71502


:
"Oscilloscope", "Insert", "Delete", "Name", "Print".

Oscilloscope .
"Insert"

.

"Delete"
/ .

"Name" .
"Print"
.

/ /

/.

.
,
. ,
.



. .
/ .
,
( "Insert").


.
"Change"
.
"Start" .


,
.


( . 12.3.3).

.
.

12-19
"CFC, 2: S7/M7
C79000G7000C71502

12.3.2

.
:

.
.
.

"Debug: Oscilloscope" (":
") (. 12-6)
"Oscilloscope" ("").
CPU.
"Insert"
( 32 ). ,
"OK". "Oscilloscope" ("").
, .


, "Name"
. "OK"
"Oscilloscope".



"Oscilloscope". .



.
, . :


.
"Debug: Assign I/O to
Oscilloscope" (": / ")
.
"Assign I/O" (" /").
( , , )
.

12-20

"CFC, 2: S7/M7
C79000G7000C71502

/
, , "Insert"
.


.
.


.
"Optimized display"
(" ") ,
. ,
.

,
. (. 12.3.3
.)

"OK" .


:

"Delete". "Delete".

"OK". .

12-21
"CFC, 2: S7/M7
C79000G7000C71502

"Change" "Oscilloscope".
. "Trigger":

, n
.


. ( ),
( /)
,
. (
. 12.4 ).
"immediately" ,
.


, .
,
,
.
. (
.)

12-22

"CFC, 2: S7/M7
C79000G7000C71502

12.3.3

, , PLC
.
PLC , , CFC
.
/, ,
CFC.
.
, "Assign I/O" ("
/") "Configure Recording" (" ").


,
.


"Start"
"Oscilloscope".
"Start" "Stop"
"Recording job active" (" ").
, "Stop".
.
, "OK",
, , ,
.


X
. CFC
.
.
.


Y "Optimized
display" "Assign I/O" (" /")
"Upper limit" "Lower limit" (" ").
"Optimized display" (" "),

. CFC
,
Y .
,
.

12-23
"CFC, 2: S7/M7
C79000G7000C71502


,
,
(1-8). "1",
- "0".
, .
, .



.
, Y,
.
. (. " "
12.3.2).
, ,
( ).



.

.
, .



.
,
.
I/O/
Y ,
X.
,
. ,
,
.
,
.
.

12-24

"CFC, 2: S7/M7
C79000G7000C71502

12.3.4


, "Print".
"Current oscilloscope" (" ")
"Report Output" (" ") "OK".
.

(,
,
, ).

(
( , /), ,
).


, , .
,
.
. ,
CFC .


, "Print"
"List of oscilloscopes" ("
") "Report output" (" ").
"OK" .
, CPU,
.

12.3.5

,
"Delete". .
"OK".

12-25
"CFC, 2: S7/M7
C79000G7000C71502

12.4 (M7)

,
:

.
, ,
.
.
(,
) , ,

CPU HOLD, ,
: .
, CPU RUN
STOP. , , CPU.
,
PLC, .
.
. ,
,
.

CPU
. ,
.

12-26

"CFC, 2: S7/M7
C79000G7000C71502


. .
, ,
. ,
,
. , ,
, .

(. 12.3
).


,
. , ,
,
,
.

Assign I/O to oscilloscope

Oscilloscope

Until selected block

Next step

Edit breakpoint

Reset breakpoint

Set breakpoint

Breakpoin active (on/off)

("Test") "View:
Breakpoint Bar" (": ")
, "Breakpoint Bar" (
). .

. 12-6

("breakpoints inactive")
PLC ("breakpoints active")

, ,

12-27
"CFC, 2: S7/M7
C79000G7000C71502

12.4.1

PLC

,
( = "breakpoint inactive").
, ( )
CFC.

PLC (breakpoints active).


,
.

("enabled", )
("disabled", ,
)
. 12.4.2.

" " On/Off


,
"breakpoints inactive" ( ).
"Debug: Breakpoints Active"
(": ")
, " "
("active") : (on/off)
Active on: CFC
CPU. ,
CPU .
Active off: CPU.

12-28

"CFC, 2: S7/M7
C79000G7000C71502

12.4.2

, ,

"Debug: Breakpoint" (": ")


"Set", "Reset", "Enable" "Disable"
(", , , ").
,
" ",
.

,
CPU ,
.
, ,
"RUN" .
CPU "STOP"
"RUN-P".


,
"Debug: Breakpoint: Set" (":
: ") .


,
( "" ).


, ,
.
(
"CTRL") "OK".

( "" "+" ).

, ,
"" ("enabled")
. (
. 12.4.3)

12-29
"CFC, 2: S7/M7
C79000G7000C71502



"Debug: Breakpoint: Disable" (": :
").

,
.

,
.
.
.



"Debug: Breakpoint: Enable" (": :
").
, .


("reset")
"Debug: Breakpoint: Reset " (": : ").
, .

12-30

"CFC, 2: S7/M7
C79000G7000C71502

12.4.3

"Breakpoints"
, "Breakpoint: Set" ("
: ") ( "Debug" ("")
), ,
"always", . (.
. 12-7).
,
"Debug: Edit Breakpoints" (": ")
.
-
.

"Breakpoints" (" ").

Breakpoints [active]
Status:

Priority cl ass:

Block:

Condition:

Enabled
Enabled
Free

OB1
OB1
OB1

m7_1P1. 5
m7_1P1. 4
m7_1P1. 2

Always valid
If INV = = TRUE every 4 run(s)
Always valid

Disable

Goto

Delete all

Delete

Print

Condition
Always
Conditional

INV
Ever y

==
4

run(s)
hl f

Close

TRUE

Apply

Help

.12-7 "Breakpoints"

"Breakpoints" :
,
.

,
.
.

12-31
"CFC, 2: S7/M7
C79000G7000C71502


CPU, :
(., .),
( , , ), .

.



.
"Debug: Breakpoint: Set/Delete/Enable/Disable"
(": :
///").



. (. 12.4.2).

"Debug: Breakpoint: Delete" (":


: ").


.
.

,
"Breakpoints" .
, , .

,
(, ),
( , , )
.


,
.

Always
, .
,
.

Conditional
, n- ,
.

12-32

"CFC, 2: S7/M7
C79000G7000C71502


, ,
. : "I/O - Operator - I/O /
Constant" ("/ - - / ").


(. 12.1.7):
1. .
,
I/O.
2. :
: (=), (<>),
(>), (<), (>=), (<=).
,
. , ,
BOOL,
.
3. :
,
,
,
.
, , "BOOL",
"TRUE" "FALSE"
.
4. ,
(n-th run) .
,
n-, (
n- "").
5. "Apply"
.

12-33
"CFC, 2: S7/M7
C79000G7000C71502

12.4.4

CPU

( Test)
,
"Debug: Hold" (": ").
.
, .
: "HOLD (command)"
(" ()").

12.4.5

!

"HOLD" ( "command", "step"
"breakpoint"), CFC.
- ,
.
, .
,
CPU
"Debug: Continue" (": ").

"Debug" :

(
)

.

( )
.



.

- .


"Execute Next Step" (" ")
"Continue" ("") ,
,
(. ).
"No Selection" (" ") , .

12-34

"CFC, 2: S7/M7
C79000G7000C71502


, "Execute Next
Step" (" ") .
,
. ,
"HOLD (step)" (" ()").
,
.
:

, ,

.

,

.

,
.


, "Execute to
Selection" (" "),
, .
, "HOLD (step)" ("
()").

, .


"Debug: Continue" (":
") .
"RUNNING" ("").

, , "HOLD
(breakpoint)" (" ()") .

12-35
"CFC, 2: S7/M7
C79000G7000C71502

13

, CFC,
, .
.

13.1

S7

132

13.1.1

133

13.1.2

CFC

135

13.1.3

13.2

M7

1312
1315

13.2.1

1316

13.2.2

1318

13.2.3

1326

13.2.4

1332

CFC, 2: S7/M7
C79000G7000C71502

13-1

13.1 S7
CFC
CFC .
CFC .
, , ,
(
I/O).
.


:
-

, /, ,
.
.
.
S7
. CFC
. .
- , SCL
ES (
Edited by: ES-Map (: ES-Map)).
.


( )
ES. :

13-2

(FC, FB)
( )
( )


-

(IN, OUT ..)

(BOOL, INT ..)

CFC, 2: S7/M7
C79000G7000C71502

13.1.1

Step 7
Step 7 CFC
Step 7, LAD, STL, SCL . .
/231/, /232/, /250/ Step 7.

FB / FC
FB FC.
:

FB,
, ,
.
DB .
FB FB (
). FB DB.

FC
,
. , ,
, AND, NAND .. FC
. DB
.


, CFC,
(, SKA 7),
CFC.
I/O, . ,
:

, ,
.
CFC, DB.

I/O, .
( Block Types... ( ), New Version
( )).

( Object properties
( )), CFC, ,
, , .
,
, , FB100.
FAMILY
(<= 8 ), , LOGIC. , ,
(TreeView
(-)).
I/O IN, OUT IN_OUT, ,
, ,
.

13-3
CFC, 2: S7/M7
C79000G7000C71502

STRUCT, ARRAY BLOCK_SDB


CFC .

CFC FC ( STL /
SCL), (VAR_OUTPUT)
, ,
. In/out
(VAR_INOUT) ,
().

S7 I/O EN ENO,
Enable ( )
Enable Output ( ).

CFC
.
FB, FC, SFB, SFC.
. :

13-4


,
CFC .


:
,
,

: /
( ), ,
, -.


,
, ,
.
OS, PLC.


.
.
OS, PLC.

CFC, 2: S7/M7
C79000G7000C71502

13.1.2

CFC




:
-

S7_

( ,
S7_ - )


FB,
. ,
DB.
. /250/.


.
Properties () . Attributes
() :
, .


, (: 24
, : 254) (
)


,
.

,
CFC.

13-5
CFC, 2: S7/M7
C79000G7000C71502

S7_tasklist
.
CFC,
. .
S7 OB ,
. ,
OB,
.

S7_tasklist:=taskname1,taskname2,.
..



:
:

:
, ,
. , , .
.
,
OB .
OB. OB
OB
.

S7_blockview

CFC ,
.

S7_blockview:=big
S7_blockview:=small

,

big small
:
:

13-6

S7_blockview:=big

CFC, 2: S7/M7
C79000G7000C71502

S7_visible
: /
CFC I/O .

S7_visible:=true
S7_visible:=false



:
:

S7_visible:=true

S7_param
: /
, I/O (
) CFC .

S7_param:=true
S7_param:=false



false,
:
,
, I/O

:

S7_param:=true

S7_link
: /
CFC, I/O .

S7_link:=true
S7_link:=false



false,
:

13-7
CFC, 2: S7/M7
C79000G7000C71502

13-8

S7_link:=true

CFC, 2: S7/M7
C79000G7000C71502

S7_dynamic
: /
CFC , I/O
() .

S7_dynamic:=true
S7_dynamic:=false



:
:

S7_dynamic:=false


,
.
WinCC,
.

S7_m_c
I/O .

S7_m_c
(OS)
/.
,
(
). Operator control and monitoring (
)
( I/O S7_m_c:=true).

S7_m_c:=true
S7_m_c:=false



:
:

S7_m_c:=false

13-9
CFC, 2: S7/M7
C79000G7000C71502

S7_m_c I/O
I/O
(OS) /
CFC , I/O
OS.

S7_m_c:=true
S7_m_c:=false



:
:

S7_m_c:=false

S7_server

CFC , I/O
. I/O /
.

S7_server:=alarm_archiv



:
:

kein ServerAufruf

S7_a_type
/
: S7_server:=alarm_archiv
I/O,
( ALARM, ALARM_8, ALARM_8P, ALARM_8S NOTIFY),
(AR_SEND).
,
(, ,
)

13-10

S7_a_type:=alarm
S7_a_type:=alarm_8
S7_a_type:=alarm_8p
S7_a_type:=alarm_s
S7_a_type:=notify
S7_a_type:=ar_send

CFC, 2: S7/M7
C79000G7000C71502



:
:

S7_shortcut

16
I/O ,
OS.

S7_shortcut:=Sollwert
S7_shortcut:=Stellgroesse
..



:
:

S7_unit

16
. I/O
OS

S7_unit:=Liter
S7_unit:=m
..



:
:

S7_string_0
, 0
16 I/O
0 ,

13-11
CFC, 2: S7/M7
C79000G7000C71502

(, LABEL )
OS. CFC .
BOOL.

S7_string_0:=Open
S7_string_0:=On
..



:
:

S7_string_1
, , 1.
16 I/O
, 1(,
CLOSED ())
OS. CFC .

S7_string_1:=Closed
S7_string_1:=Off
..



:
:

13-12

CFC, 2: S7/M7
C79000G7000C71502

13.1.3

,
, .


( SP_OP)
( MODE)

(
SP)

QMODE)

ALARM_8P

( EV_ID)


,
I/O .


:
S7_m_c:=true
CFC
.
.

13-13
CFC, 2: S7/M7
C79000G7000C71502

I/O
I/O :
1. SP_OP
S7_m_c:=true
.
S7_shortcut:=W=
S7_unit:=rpm
WinCC
(W=) (rpm)
2. MODE
S7_m_c:=true
.
S7_string_0:=Manual
S7_string_1:=Automatic
WinCC
(, ).
3. SP
S7_m_c:=true
.
S7_shortcut:=WW
S7_unit:=rpm
WinCC
(WW) (rpm)
4. QMODE
S7_m_c:=true
.
S7_string_0:=Manual
S7_string_1:=Automatic
WinCC
(, ).

13-14

CFC, 2: S7/M7
C79000G7000C71502

5. EV_ID Alarm_8P
S7_server:=alarm_archiv
S7_a_type:=alarm_8P
,
( OS)
, ,
.
.
CFC.
S7_link:=false
S7_param:=false

,
CFC.
:

(S7_link:=false S7_param:=false) EV_ID.

,
(shortcut, unit, string_0, string_1)
, CFC
. ,
/
.
WinCC
,
WinCC.
.
EV_ID
.

.

13-15
CFC, 2: S7/M7
C79000G7000C71502

13.2 M7.

,
M7 PLC CFC.
.
:






CFC /280/.

13-16

CFC, 2: S7/M7
C79000G7000C71502

13.2.1


M7 ASCII .
(, / ..)
.
CFC .
.
ASCII.


, ,
.
M7.

CFC:

CFC.
CFC.

:
-
. ()
.


, , Borland
.

( SIMATIC Edit:
Object properties (: ) ,
path ()) Windows Explorer,
M7BLOCKS SRC, INC and
LIB ->1

,
,
Windows Explorer SRC.
INC,
LIB ->2.

13-17
CFC, 2: S7/M7
C79000G7000C71502

STEP7_V

CFC-
S7cfc

("")

M7Blocks

M7Blocks

src

src

_
inc

inc

lib

lib

example

M7cfapi

M7Lzs

. 13.1. * " . #

CFC
CFC Windows Explorer,
CFC -> M7BLOCKS.
SRC.
INC, LIB

, ,
. . 10.2.4.
.

13-18

CFC, 2: S7/M7
C79000G7000C71502

13.2.2


ASCII (
) .SRC.
. : CFC > M7BLOCKS ->
EXAMPLE.
ASCII , , Siemens
NOTEPAD.EXE, WINDOWS 95/NT
Borland.
(ASCII).
,
.
8 , .src.


,
.

/.

C.
.
,
(, ),
.
: S7.
:
/*< >*/ //< >

13-19
CFC, 2: S7/M7
C79000G7000C71502


FUNCTION or FUNCTION_BLOCK
{
COMMENT:=< >;
BLOCKVIEW:=< >;
GENERIC:=< >;
TASKLIST:=< >};
NAME:< >;
FAMILY:< >;
VAR_INPUT
< >
END_VAR
VAR_OUTPUT
< >
END_VAR
VAR
< >
END_VAR
BEGIN
{
INCLUDES:=< >;
CODELIBS:=< >;
}
< >
END_FUNCTION or END_FUNCTION_BLOCK

:
FUNCTION FUNCTION_BLOCK, NAME, BEGIN, END_FUNCTION
END_FUNCTION_BLOCK
:
COMMENT, BLOCKVIEW, GENERIC, FAMILY, VAR_INPUT, VAR_OUTPUT,
VAR, INCLUDES, CODELIBS, TASKLIST
,
.
,
VAR_INPUT VAR_OUTPUT (
).
END_VAR
VAR_INPUT, VAR_OUTPUT VAR.

TASKLIST, UNIT, STRING_0, STRING_1,


LINK DYNAMIC :

13-20

, LINK:=TRUE

S7_,
S7_link:=TRUE

CFC, 2: S7/M7
C79000G7000C71502


, CFC
.
. 13.1

COMMENT

BLOCKVIEW

BIG =

GENERIC

NONE =

FAMILY

VAR_INPUT

VAR_OUTPUT

VAR

INCLUDES

CODELIBS

TASKLIST


:
:

BLOCKVIEW:=< >;
BLOCKVIEW:=BIG;

BLOCKVIEW:=BIG BLOCKVIEW:=SMALL CFC


.

FUNCTION_BLOCK FUNCTION

FUNCTION_BLOCK ( DB).
,
.
FUNCTION ,
FUNCTION_BLOCK. FUNCTION
VAR ENDVAR.

COMMENT:= < >;

COMMENT:= PID ;

80 .
, () ({) .

13-21
CFC, 2: S7/M7
C79000G7000C71502

TASKLIST:=<1,2,...>;

TASKLIST CFC ,
. .
: TASKLIST.
Restart (),
.
,
, ,
. .
,
.
.

GENERIC:= < >;

GENERIC:= SINGLE;

, .
SINGLE
CFC. ,
.
.
SINGLE: AND OR .
, NONE .
:

FUNCTION .
,
.
, ,
MIN MAX .

.
EN/ENO .
IN1, IN2 ..


( 2).
, , ,
/
.

150.

13-22

CFC, 2: S7/M7
C79000G7000C71502

NAME: < >;

NAME: PID ;

1 24
,
CPU, .

FAMILY: < >;

FAMILY:;

1 8 .
CPU.

13-23
CFC, 2: S7/M7
C79000G7000C71502

/
:

VAR_INPUT VAR_OUTPUT
< / >
END_VAR

, ( VAR_OUTPUT),
( VAR_INPUT).
. .
,
CFC.
, 160 ( CFC).
:
< / > {COMMENT:= < >; VISIBLE:= <
>;}: <Datentyp> := < >;
:

VAR_INPUT
TN {COMMENT:= Reset time; DISPLAY:= TRUE;}: WORD := 5;
END_VAR
COMMENT VISIBLE .
, .
,
:
. 13.2


(/)

COMMENT

VISIBLE

*)

UNIT

*)

STRING_0

*)

STRING_1

*)

LINK

*)

DYNAMIC

*)

*) : . S7, 13.1.2.
/
:

< / >

/ 1 24 .
CFC 8 . /

( )
, IN1, IN2, IN3
..

13-24

CFC, 2: S7/M7
C79000G7000C71502

/
:

COMMENT:= <>;

80 .
, () ({) . ()
(), .

/
:

< >

/
:
BOOL, INT, DINT, REAL, BYTE, WORD, DWORD, TIME, TASK (
), STRING
. A.3.

/
:

:= < >

.

/.
.
, :
0 BOOL, INT, DINT, REAL, BYTE, WORD, DWORD, TIME
STRING

VAR
< >
END_VAR

:
< 1 >:< 1 >;
< 2 >:< 2 >;
:
VAR
ParamX : WORD;
ParamY : WORD;
END_VAR
. ,
. /.
,
FUNCTION_BLOCK.
,
(_).
/.

13-25
CFC, 2: S7/M7
C79000G7000C71502

INCLUDES :=< >

:
< 1>, < 2>, ..;
:

INCLUDES := dtypen.h, param.h;


.
8 . h
. .
:
1.
2. M7BLOCKS\INC
3. M7BLOCKS\INC CFC

CODELIBS :=< >

:
< 1>, < 2>, ..;
:

CODELIBS := Regler.lib, Arithm.lib;

,
, .
, C .
.
8 . lib .
.
, .

< >

.
.
RMOS M7API .
DOS (svc.h dos.h) .

END_FUNCTION END_FUNCTION_BLOCK

13-26

CFC, 2: S7/M7
C79000G7000C71502

13.2.3


(__),
.

/
$< /> $<
>( $TN ,
/)

,
( ),
.
:
....
{
static BOOL Flag_critical //
//
//
#if_INIT}
{
static BOOL Flag_uncritical //
//
//
}
#else
}
END_FUNCTION
FUNCTION_BLOCK ( VAR
END_VAR) .


4 kbyte . M7 PLC
STOP.
:
static (),
, (. ).

13-27
CFC, 2: S7/M7
C79000G7000C71502

,
.
{}.
,

.
:
....
BEGIN
{
INCLUDES:=...
}
{
//<
BOOL ; //
...
}
// <
END_FUNCTION

C
C
M7 .

32- EXE
(Borland C: TargetOption (Borland C: -)).

*.C
( *.CPP).

:
-

Compiler ()> Compiler Output ( )>


Create Underlines ( )

Compiler ()> Floating Point: All options deactivated


( : )

Borland


DTYP.H.
M7. ...\S7CFC\M7LZS,
#INCLUDE

, ,
, , void XSUM
(init,int) A short XSUM (short,short,short)
B. ,
, , ,
.


CFC :
.

(, )

13-28

CFC, 2: S7/M7
C79000G7000C71502

#if __INIT
<>
//
#elif __TIMED
< >
//

#elif __PROG_ERR
< >
//
#endif



:
__INIT
__ALARM
__TIMED
__EVENT
__FREE_CYCLE
__TIME_ERR
__ACCESS_ERR
__PROG_ERR



,
. , /
.
(,
)
,
, ,
, ,
-
.
#if __TIMED
<>
#endif

// -
// _T0

-
,
.

13-29
CFC, 2: S7/M7
C79000G7000C71502



. GENERIC SINGLE ,
. (
) .
, .
$$B
.

$$B(<>)
$$E

$$IN

,
.

.
, .

GENERIC SINGLE
VAR_INPUT
IN1:WORD;
IN2:WORD;
END_VAR
VAR_OUTPUT
OUT:WORD;
END_VAR
$OUT = $IN1 $$B(2) + $$IN $$E; $OUT1 = $IN1 +
$IN2; , .
$OUT1 = $$B(2) $$IN + $$E 9; $OUT1 = $IN2 + 9;
, .
5 ,
: $OUT1 = $IN2 + $IN3 + $IN4 + $IN5 + 9;
$$B(1) $$B(2)
:
$OUT1 = $IN1 + $IN2 + $IN3 + $IN4 + $IN5 + 9;
$$B(4) $$B(2)
, : $OUT = 9;
$$B(4) $$B(2)
, :
$OUT = $IN4 + $IN5 + 9;

IN1 IN3.
, ( +)
,
.

13-30

CFC, 2: S7/M7
C79000G7000C71502

1 ( )
.

/**************************************************************

**************************************************************/
//: Mr. Th. Miller
//: 20.06.95
// 1.0
FUNCTION;
NAME : Adder;
VAR_INPUT
I1 : WORD;
I2 : WORD;
END_VAR
VAR_OUTPUT
Q1 : WORD;
END_VAR
BEGIN
$Q1 = $I1+$I2;
END_FUNCTION

13-31
CFC, 2: S7/M7
C79000G7000C71502

2 ( )
.
EXAMPLE CFC.

/**************************************************************

X =
TD = .
EN =
Y1 =
**************************************************************/
//: Mr. Th. Miller
//: 07.06.95
// 1.0
FUNCTION_BLOCK
{
COMMENT := ;
BLOCKVIEW := BIG; //
GENERIC := NONE; //
};
NAME : DIVRE;
FAMILY : Control;
VAR_INPUT
X {COMMENT:= ; DISPLAY:= TRUE;} : REAL :=
0;
TD {COMMENT:= . .;
DISPLAY:=TRUE;} : WORD := 1;
EN {COMMENT:= ; DISPLAY:= TRUE;} : BOOL := 0;
END_VAR
VAR_OUTPUT
Y1 {COMMENT:= ; DISPLAY:= TRUE;} : REAL
:= 0;
END_VAR
VAR
XA : REAL;
END_VAR
BEGIN
{
INCLUDES:= math.h, arithm.h;
CODELIBS:= controls.lib;
}
if ($EN == 0)
{ /* */
$Y1 = 0;
}
else
{ /* */
$Y1 = Diff_Calc($TD, $X, $XA); /* */
/* Diff_Calc controls.lib*/
}
$XA = $X; /* Store X(n-1) */
END_FUNCTION_BLOCK

13-32

CFC, 2: S7/M7
C79000G7000C71502

13.2.4


(. 10.2.4)
(
) .


, , CPU
(. 10.2), (.
12.2). , Siemens

. CFC.


C
Borland,
.

13-33
CFC, 2: S7/M7
C79000G7000C71502

14

14.1

142

14.1.1

144

14.1.2

I/O
CFC

145

14.1.3

146

14.1.4

SFC

147

14.1.5

148

14.1.6

S7

149

"CFC, 2: S7/M7
C79000G7000C71502

14-1

14.1

CFC
"Reference data" (" "),
:



CPU.

CFC 5.2.3
.


, ,
, .

I/O CFC ( SFC)


SFC
CFC.


SFC CFC
.

SFC ( SFC)
SFC
CFC.

S7
S7 CFC.

CFC CFC
,
() .

14-2

"CFC, 2: S7/M7
C79000G7000C71502


14-1
.
. 14-1

: ( "virtual")

: ( "virtual")

( )

( )

14-3
"CFC, 2: S7/M7
C79000G7000C71502

14.1.1


,
, ( ). 14-1

. 14-2 .

CFC/SFC-Util: Display Refer ence Data - [pro1\ anl1\reak3\tp2\\Cro ss r eferen ces O. .


Reference Data Edit

Symbol

Address
QB16

View Window Help

Data type
BYTE

R/W
W

Chart
Chart elem ent
Elem ent comment
CFC-LaLi Recepe_Conv3. OUT
Output value

Type
W_BY

Press F1 for help

. 14-1

. 14-2


Symbol

Address

(
, "---" )

Data type


R/W

(R) (W)

/
Chart

Chart Element

14-4

,

( Plant Hierarchy,
)

SFC,

"CFC, 2: S7/M7
C79000G7000C71502

Element comment

/ SFC

Type

14.1.2

( CFC
(: PID) SFC
(: "STEP"))

I/O CFC
I/O CFC
SFC ( ).
. 14-3

I/O CFC

CFC

( Plant
Hierarchy, )

I/O Unit

I/O

/
Type

(: MUX8_R)

Virtual

R/W

x = SFC CFC
(- =
)
(R) (W)

/
SFC

SFC,
( Plant Hierarchy,
)

Zoom-in element

SFC,
(,
Step.B.005)


Type

(
)

14-5
"CFC, 2: S7/M7
C79000G7000C71502

14.1.3



(/ , )
CFC SFC.
. 14-4


Run-time group


Virtual

R/W

x = SFC CFC
(- =
)
(R) (W)

/
Chart

Chart element

,
(
Plant Hierarchy, )
I/O SFC


Element comment

Type

14-6

SFC I/O

( CFC
(: PID) SFC
(: "STEP"))

"CFC, 2: S7/M7
C79000G7000C71502

14.1.4

SFC
SFC
(/ , )
SFC ( ).
. 14-5

SFC

SFC

SFC

Virtual

x = SFC CFC
(- =
)

R/W

(R) (W)

/
SFC

,
SFC
( Plant Hierarchy,
)

Zoom-in element

SFC,
(,
Step.B.005)


Type

(
)

14-7
"CFC, 2: S7/M7
C79000G7000C71502

14.1.5


, ,
(, , ,
- ).
. 14-6


Block Type


Chart

Block

CFC,
(
Plant Hierarchy, )
(: )

Block comment

Virtual

14-8

(:
)

x = SFC CFC
(- =
)

"CFC, 2: S7/M7
C79000G7000C71502

14.1.6

S7
S7,
ES.
. 14-7


Planning object

Element

Type

S7 resource
S7

Resource Type

S7

(: CFC/SFC
, , OB)

I/O (,
COUNTER.END)
, ,
(: START.B.002.R)
,
(: TIMER.01.R)

(: EN )
( , SFC, ,
, , )
DB ( ),
FC, OB
(: DB 27 OFFSET 3.5, DB 17, FC 9,
OB1)
(: Instance DB, sequencer DB, pool
element, transition FC, action FC, task FC)

14-9
"CFC, 2: S7/M7
C79000G7000C71502

Bibliothek Technologische Bausteine


C79000G7000C71502

_10


A
:

A.1

A2

A.2

A3

A.3

A4

CFC, 2: S7 / M7
C79000G7000C71502

A-1

A.1

SIMATIC :
80486
( : Pentium)

16 MByte RAM
( 32 MByte )

120 MByte
VGA 640 x 480
(: SVGA 1024 x 768 )

SIMATIC S7300, S7400

SIMATIC M7300, M7400


Microsoft Windows 95 / NT
STEP 7
SCL ( S7)

M7SYS ( M7)
Borland C ( M7)

A-2

CFC, 2: S7 / M7
C79000G7000C71502

A.2

. A_1

22 *)

255

ANSII

22

22

STEP 7

80

ANSII .
S7

24

STEP 7.
(09)

80

ANSII


()

16 *)

24

.
,

32

ANSII

*)

\ . : / * ? < > | # %

\ . : / * ? < > | # %

( ) 24

A-3
CFC, 2: S7 / M7
C79000G7000C71502

A.3

. A.2

SIMATIC S7 / M7

S7

M7

ANY

80

BO

BOOL

BY

BYTE

CHAR

CR

COUNTER

S7

16

DATE

16

DB

BLOCK_DB

DB

16

DI

DINT

Double integer

32

DT

DATE_AND_TIME Lfnf b dhtvz


DT

64

DW

DWORD

32

32

FB

BLOCK_FB

FB

16

FC

BLOCK_FC

FC

16

INT

Integer

16

POINTER

48

REAL

32

STRING

256

SD

BLOCK_SDB

SDB

16

SN

STRING[n]

n , 1 n
253

TIME_OF_DAY
TOD

32

TI

TIME

32

TK

TASK

16

TR

TIMER

S7

16

T5

S5TIME

S5

16

WORD

16

16

A-4

x
x

CFC, 2: S7 / M7
C79000G7000C71502

B
AP

BOP
(, AND, OR ..)

C/C++

CFC

COM

CPU

DB

FB

FDB

FC
( )

IEC

CFC, 2: S7 / M7
C79000G7000C71502

-1

LAD

MPI

MS
Microsoft

OB

OS

PC

PCE

PG

PLC
/

SFB

SFC

SFC

SFV
SFC ( WinCC)

SINEC
Siemens

STEP 7
SIMATIC S7 / M7

STL

B-2

CFC, 2: S7 / M7
C79000G7000C71502


/100/ Manual: S7-400/M7-400 Programmable
Controllers, Hardware and Installation
/101/ Reference Manual: S7-400/M7-400 Programmable
Controllers,Module Specifications
/102/ Reference Guide: S7-400 Instruction List,CPU 412,
413, 414, 416
/104/ Manual: FM 451 Positioning Function
Module,Installation and Parameter Assignment
/140/ Manual: ET 200M Distributed I/O Device
/141/ Manual: ET 200L Distributed I/O Device
/231/ User Manual: Standard Software for S7 and
M7,STEP 7
/232/ Manual: Statement List (STL) for S7-300 and S7400,Programming
/233/ Manual: Ladder Logic (LAD) for S7-300 and S7400,Programming
/234/ Programming Manual: System Software for S7-300
and S7-400,Program Design
/235/ Reference Manual: System Software for S7-300
and S7-400,System and Standard Functions
/236/ Manual: Function Block Diagram (FBD) for S7-300
and S7-400,Programming
/237/ Master Index, STEP 7
/250/ Manual: Structured Control Language (SCL) for S7300 and S7-400,Programming
/251/ Manual: GRAPH for S7-300 and S7400,Programming Sequential Control Systems
/252/ Manual: HiGraph for S7-300 and S7400,Programming State Graphs
/253/ Manual: C Programming for S7-300 and S7400,Writing C Programs
/254/ Manual (new title):CFC Continuous Function Chart,
Volume 1 and Volume 2: S7/M7s

CFC, 2: S7 / M7
C79000G7000C71502

C-1

/255/ Manual (new title)


SFC Sequential Function Charts (SFC)
/256/ Manual (new title):
PCS 7 Engineering System
/257/ Manual: Process Control System PCS 7,
Batch flexible Automating Batch Processes
/258/ Reference Manual: Library of Standard Blocks
/259/ Reference Manual: Library of Technological Blocks
/260/ Reference Manual: Library of Field Device Blocks
/261/ Manual: Process Control System PCS 7,
System Overview
/262/ Getting Started: Process Control System PCS 7
/280/ Programming Manual: System Software for M7-300
and M7-400,
Program Design
/281/ Reference Manual: System Software for M7-300 and
M7-400,
System and Standard Functions
/282/ User Manual: System Software for M7-300 and M7400,
Installation and Operation
/290/ User Manual: ProC/C++ for M7-300 and M7-400,
Writing C Programs
/291/ User Manual: ProC/C++ for M7-300 and M7-400,
Debugging C Programs
/500/ Manual: SIMATIC NET,
NCM S7 for Industrial Ethernet
/501/ Manual: SIMATIC NET
,NCM S7 for PROFIBUS

C-2

CFC, 2: S7 / M7
C79000G7000C71502

Gl

A


.
: Q0.4 , 4 0
(PIQ).


CFC,
, ,
, .

MPI
MPI
.

"Enable"

. "0",

.
.
- .
.


,
. ,
.

,
.

"CFC, 2: S7/M7
C79000G7000C71502

-1

SIMATIC S7 CPU,
, (, ,
, )
.

- ,
, .
CFC ,
.
,
CFC.

(DB)
- ,
. : ,
, ,
FB. DB .


I/O ,
.

/ (I/O)
.


/.
.


I/O ,
.


CFC
( SCL S7 7).

-2

"CFC, 2: S7/M7
C79000G7000C71502

) ,


.
.
.
. .


- ,
.

,
CPU CFC.

, , I/O
I/O .
.


CFC.
, ,
.


CPU .
. S7
OB.


(7) .
, , ,
.

("Error")
(7) ,
.
: I/O, ,
.

-3
"CFC, 2: S7/M7
C79000G7000C71502


(7) ,
.


(7) ,
.


,
.

,
,
( ).
.

I/O
CPU,
.


, .

(CFC) . ,
.

-4

"CFC, 2: S7/M7
C79000G7000C71502

SIMATIC S7 - .
,
. :
-

()

(FB)

(FC)

(SFB)

(SFC)

(MPI)
32 (, ,
).


.
.


- ,
(FC, FB, OB). :
(), (I), (Q), (T), (C)
(DB).
, .


,
CFC.
, , , .



. LAD STL.

-5
"CFC, 2: S7/M7
C79000G7000C71502

STEP7 ,
.
, . SFC
() ().


,
, ,

.

()
S7 -
.
.
.




( AND, OR).

,
I/O
.

:
) S7
) , . ,

.



CPU.

, .


(CFC) I/O , I/O
. I/O,
.

-6

"CFC, 2: S7/M7
C79000G7000C71502

(S7) CPU ( STOP


RUN )
(1) 100
() 101 (; S7-400).
/
, (STOP
). 7.


- ,
( STEP7, CFC) (WinCC) , ,
.
.

(PLC)

.


,
,
.
CPU FM
( ).


, ..
.

S7 7.

M7
"" 7.

S7
,
S7.

""
7, ""
7.


, SIMATIC.

-7
"CFC, 2: S7/M7
C79000G7000C71502

- ,
, .


(Online)
. (Offline)
.

()
( ) CFC/SFC
, CPU
.

CPU
CPU
. :
-

RUN
STEP7 (RUN-P)

RUN

STOP

MRES


( )
, , ,
CFC.
SFC
. , ,
, .

" " (LAD)


-
STEP7. .

(FB, FC, DB, OB, T, C, ..),



CFC/SFC .


CPU:

-8

"CFC, 2: S7/M7
C79000G7000C71502

MPI

CFC/SFC
, ,
.

(SIMATIC)
Windows95,
, ,
.

- ,
.
, ,
.


,
.
.


(SIMATIC S7),
(
, SIMATIC C7) (SIMATIC
M7).


(phase offset)

.
.

(CFC) .

.
:
-
-
-
-

-9
"CFC, 2: S7/M7
C79000G7000C71502

(CFC) I/O - .
,
.
CFC.

CPU
SIMATIC S7/M7 :
(RUN), (STARTUP), (HOLD)
(STOP).

" " (STL)


-
. - STEP5
STEP7.
.



. :
.


CPU
- I-.

CPU (STOP):
-

STOP

CPU

,
,
.


(CFC) ,
.
, .

(SFC)
SFC (Sequential functional charts)
.

,
CFC SFC. , , ..
. :
-

-10

(CFC)

"CFC, 2: S7/M7
C79000G7000C71502

(SFC)

(SCL)
SCL (structured control language) -
, IEC 1131-3.

( , ).

()
CPU
STEP7.


( )
.

()
CPU,

. STEP7
.


- ,
CFC, .

.
S7 STL, LAD SCL.



. BOOL
, INT - 16 .

SFC
SFC
SFC .
, CFC.

( SFC).

-11
"CFC, 2: S7/M7
C79000G7000C71502



(7) ,
.

(FB)
1131-3 - ,
, ,
, .

, ,
. FB , (
)
.

(FC)
1131-3 - ,
.
,
, .
FC ,
-.


,
N (
).

( CFC )
CFC (continuos flow charts) - ,

, ().

, .
,
.

-12

"CFC, 2: S7/M7
C79000G7000C71502

, 4-19, 10-19
, 10-23

M7, 12-5
DB, 10-27
SFC, 4-17
DOCPRO, 5-3
, 2-18
DB, 10-27
, 5-4, 14-2

, 4-12
, 4-26
, 4-8
, 4-18
, 10-18
, 4-26
, 4-9
, 4-10
, 2-7
I/O
, 4-17
, 4-15,4-17
, 4-16,4-17,1215

, 13-16
, 13-25
SFC, 10-9

, 4-16, 4-17


, 13-16
, 13-25
, 10-23
, , 12-3
, , 10-22
, 10-18
, 10-21
, 10-20
,
10-32

, 2-17
, 12-4
, 2-4
, 4-15, 4-17

, 2-13
, 4-20
, 10-18
(M7), 10-31
, 4-24
, 4-19
, 2-20

CFC, 1
C79000G7000C73301

, 13-22
I/O
, 12-16
, 4-15, 4-17
, 4-16, 4-17
IEA
, 4-16, 4-17
, 4-16
, 4-17
, 10-12
, 2-22

, 13-16

-1


Borland C
, 10-4
, 10-30
, 4-15, 4-17
, 13-28

CPU, 4-6, 4-12


, 4-12
, 4-6
, 4-20
, 13-19
, 10-26
, 2-5, 2-24
, , 1020

, 2-5

, 2-12
M7 , 12-5
M7-SYS, 10-4
M7BLOCKS, 13-17
M7, 1327
, 2-19
, 2-2
, 12-19, 12-24

, 1-4
/ , 12-5
, 4-19
, 1-4, 10-13
, 10-9, 10-11
, 13-28
, 10-22
, 13-21, 13-29
, 2-2
, 12-17
I/O, 12-20
, 12-20
, 12-25

-2

, 12-20
, 12-25
, 12-23
, 5-7, 10-11
STEP7, 10-3

CPU
, 12-4
, 12-34
, 12-4

, 14-8
CFC I/O, 14-5
, 14-6
SFC, 14-7
, 12-16

M7, 10-6
S7, 10-5
, 2-10
, 4-21
, 4-19
, 5-3
, 2-19
I/O, 4-17
PLC OS , 1026
, 5-2

, 5-5
, 5-7
, 10-21
, 4-4
, 5-6, 1018
, 4-25
, 4-20
, 10-23
, 12-35
, 2-2
, 2-24

, 2-23, 12-2
, 2-6
, 2-17

CFC, 1
C79000G7000C73301

, 12-4
PLC, 10-27
, 2-23, 12-2, 12-13

, 2-5
, 4-4
, 4-4
, 10-16
, 2-24
, 2-10
, 2-10
M7 , 13-15
M7 , 13-15
, 2-3
, 14-2
, 10-19
, 4-10
, 2-5
, 10-19
, 1-5
(
), 10-25
,
4-8


, 10-11
(S7), 10-8
(S7), 10-8
, 4-2
I/O, 4-17
(7)
, 10-9
, 10-10
, 10-11

, 12-28
, 12-26
, 12-30
, 12-30
, 12-31
, 12-30
, 12-29
, 4-15

, 12-3
, 12-3
, 12-35

, 10-16
, 10-13

Borland C, 10-4
CFC, 3-3
, 12-5

, 10-22
(7), 1316
, 13-16
, 13-19
FC, 10-27
, 13-16

, 2-12
, 2-25
() 10-24

, 10-19

, 4-8

, 2-2

Index
C
CFC , 3-3
CFC
, 12-10

-3
CFC, 1
C79000G7000C73301

, 12-11
, 12-11
CFC
, 12-11
, 12-12
, 12-12
CFC
, 12-6
, 12-9
, 12-7

S
S7_shortcut, 13-10
S7_string_0, 13-10
S7_string_1, 13-11
S7_tasklist, 13-6, 13-21
S7_unit, 13-10
S7_visible, 13-7
S7_server, 13-9
S7_param, 13-7
S7_m_c, 13-8
S7_link, 13-7
S7_a_type, 13-9
S7_blockview, 13-6, 13-20
S7_dynamic, 13-8

-4

CFC, 1
C79000G7000C73301