помощью 7 - siemens ag · simatic Программирование с ... • programming...
TRANSCRIPT
-
s
, 1
2 3 4
5 6 STEP 7 7
8 9 10 11 12
STL 13 14 15
16 17
online CPU 18
19 20 21
22
23 24 M7 25
26 A
SIMATIC
STEP 7 V5.3
- : 6ES7810-4CA07-8BW1
01/2004 A5E00261405-01
-
Copyright Siemens AG 2004 , . . , , , . Siemens AG : Postfach 4848, D- 90327 Nuernberg
Disclaimer of Liability . , . , , . Siemens AG 2004 .
Siemens A5E00261405-01
, - , . :
! , , .
! , , .
! , .
,
, .
. , , , .
:
! , , , Siemens. , , , , .
SIMATIC, SIMATIC HMI SIMATIC NET - SIEMENS AG.
- ; , .
-
STEP 7 V5.3 A5E00261405-01 iii
STEP 7. , . , , . , STEP 7 SIMATIC S7. , "Working with STEP 7 V5.3, Getting Started [ STEP 7 5.0, ]". " STEP 7."
. , - (., ) the MS Windows 2000 Professional MS Windows XP Professiona.
5.3 STEP 7.
[service packs]:
"readme.wri"
STEP 7.
"What's new? [ ?]" STEP 7.
-
STEP 7 V5.3 iv A5E00261405-01
STEP 7 STEP 7 Basic Information [STEP 7- ]. STEP 7:
STEP 7 Basic Information [STEP 7- ], Working with STEP 7
V5.3, Getting Started [ STEP 7 5.3, ]
Programming with STEP 7 V5.3 [ STEP 7 V5.3]
Configuring Hardware and Communication Connections, STEP 7 V5.3 [ STEP 7 V5.3]
From S5 to S7, Converter Manual [ S5 S7. ]
, STEP 7 S7-300/400.
6ES7810-4CA07-8BW0
STEP 7 Reference [ STEP 7], - KOP/FUP/AWL
S7-300/400
S7-300/400
LAD, FBD STL, STEP 7..
6ES7810-4CA07-8BW1
online
STEP 7 STEP 7 online.
STEP 7.
STL/LAD/FBD SFB/SFC
. STEP 7.
-
STEP 7 V5.3 A5E00261405-01 v
online , . , . :
, Help []: Contents [] STEP 7.
Using Help [ ] .
- , ., . Help [] F1.
- . , .
, .
, , .
, "Configuring Hardware with STEP 7", "Modifiying the System During Operation via CiR" "Automation System S7 400H - Fault-tolerant Systems", STEP 7, HTML. Help.
STEP 7 Start: Start > SIMATIC > Documentation.
, Siemens .
You will find your contact person at:
http://www.siemens.com/automation/partner
SIMATIC Siemens SIMATIC S7. , , (D 90327 Nuernberg). .:+49 (911) 895-3200
-
STEP 7 V5.3 vi A5E00261405-01
Internet: http://www.sitrain.com
-
STEP 7 V5.3 A5E00261405-01 vii
A&D
Beijing
Nuernberg
Johnson City
()
,
.: +49 (180) 5050-222
: +49 (180) 5050-223
E-Mail: adsupport@ siemens.com
GMT: +1:00
() : .-. 7:00 17:00
.: +49 (180) 5050-222
: +49 (180) 5050-223
E-Mail: adsupport@ siemens.com
GMT: +1:00
(-) : .-. 8:00 17:00
.: +1 (423) 262 2522
: +1 (423) 262 2289
E-Mail: simatic.hotline@
sea.siemens.com
GMT: -5:00
() : .-. 8:00 17:00
.: +86 10 64 75 75 75
: +86 10 64 74 74 74
E-Mail: adsupport.asia@
siemens.com
GMT: +8:00
SIMATIC Hotlines .
-
STEP 7 V5.3 viii A5E00261405-01
Internet , - internet: http://www.siemens.com/automation/service&support
:
.
.
, .
Automation & Drives.
, , "Services".
-
STEP 7 V5.3
A5E00261405-01 ix
1 ................... 1-1
1.1 STEP 7 ............................................................................................... 1-1
1.2 STEP 7 ......................................................................... 1-6
1.3 STEP 7 5.3?......................................... 1-11
1.4 STEP 7 .................. 1-13
1.4.1 ................................. 1-15
1.4.2 (Run-Time) ..................................... 1-17
1.4.3 - ............................................................... 1-18
2 ....................................................................................................................... 2-1
2.1 .................................................................................................. 2-1
2.1.1 ........................................................... 2-1
2.1.2 Automation License Manager ...................................................... 2-3
2.1.3 .................................................. 2-4
2.2 STEP 7......................................................................................... 2-5
2.2.1 ................................................................................... 2-6
2.2.2 PG/PC.................................................................. 2-10
2.3 STEP 7 ....................................................................................... 2-12
2.3.1 STEP 7 ....................................................................................... 2-12
3 ................................................................................ 3-1
3.1 ............................................................................................. 3-1
3.2 ..................................................... 3-2
3.3 ..................................... 3-4
3.4 , / ............................................... 3-6
3.5 / ................................... 3-6
3.6 / ............................... 3-7
3.7 ................................................... 3-7
3.8
................................................................................................. 3-9
3.9 .......................................... 3-10
4 .................................................. 4-1
4.1 CPU ........................................................................................ 4-1
4.2 ............................................................... 4-2
4.2.1 ............................................................... 4-2
4.2.2 ...................................... 4-3
-
STEP 7 V5.3
x A5E00261405-01
4.2.3 ......................................... 4-9
4.2.4 ................................................................................................ 4-11
4.2.5 ,
..................................................................... 4-26
5 ..................................................................................... 5-1
5.1 STEP 7............................................................................................... 5-1
5.1.1 STEP 7 ,
............................................................................................... 5-2
5.2 ............................................................................... 5-3
5.3 ................................................................................ 5-4
5.3.1 ................................................................................ 5-4
5.1.2 .............................................................................................. 5-5
5.1.3 ...................................................................................... 5-6
5.1.4 ............................................................................................ 5-7
5.1.5 ............................................................. 5-8
5.1.6 S7/M7.......................................................................... 5-10
5.1.7 ................................................................................. 5-11
5.1.8 ...................................................... 5-16
5.1.9 S7/M7 CPU.................................................. 5-17
5.4 .......................... 5-18
5.4.1 ................................................................... 5-18
5.1.10 ......................................................................................... 5-18
5.4.2 .................................................................. 5-19
5.1.11 ..................................................... 5-21
5.1.12 ...................................................................... 5-25
5.1.13 ............................................................................... 5-26
5.1.14 ................................................................. 5-27
5.1.15 ................................ 5-27
5.5 ......................................................................... 5-29
5.5.1 ......................................................................... 5-29
5.5.2 .................................................... 5-29
5.1.16 ..................................... 5-31
5.5.3 ............................................ 5-33
5.5.4 ................ 5-33
5.5.5 ......................... 5-34
6 ........................................................................... 6-1
6.1 ........................................................................................ 6-1
6.2 ............................................................................................. 6-2
6.2.1 ......................................................................................... 6-2
-
STEP 7 V5.3
A5E00261405-01
6.2.2 ........................................................................................... 6-4
6.2.3 S7/M7 ............................................................................. 6-6
6.2.4 ............................................................................. 6-8
6.2.5 , .................. 6-9
6.3 ................................................... 6-10
6.3.1 ................................................... 6-10
6.3.2 .................................................................... 6-12
6.3.3 .......................................................... 6-13
6.3.4 ,
................................................ 6-14
6.3.5 ................................. 6-15
6.3.6 ............................................................. 6-16
6.4 (MMC) .................................... 6-16
6.4.1 (MMC) ................................. 6-16
6.4.2 ............................................. 6-17
6.4.3 ..................................................................................... 6-18
6.4.4 (MMC)..................... 6-18
7 STEP 7..................... 7-1
7.1 2 .................................... 7-1
7.2 DP,
STEP 7.................................................... 7-1
7.3
STEP 7 .............................................................................................. 7-3
7.4 SIMATIC PC................................................................................................... 7-4
7.5 ,
STEP 7 ............................. 7-5
8 .............................................................................................. 8-1
8.1 ....................................................... 8-1
8.2 ............................................................ 8-3
8.3 ................................ 8-4
8.4 (/) ............... 8-5
8.5 .................................................. 8-8
8.5.1 .................................................. 8-8
8.5.2 ............................................. 8-9
8.5.3 , ................... 8-12
8.5.4 ..................... 8-13
8.6 ....................................................................... 8-14
8.6.1 ....................................................................... 8-14
8.6.2 ........................................................... 8-14
-
STEP 7 V5.3
xii A5E00261405-01
8.6.3 ................... 8-15
8.6.4 ................ 8-15
8.6.5 ............... 8-16
8.6.6 ......................................................... 8-18
8.6.7 .............. 8-19
8.6.8 ....................................... 8-21
9 ................................................................................... 9-1
9.1 ................................................................... 9-1
9.2 ................................................................ 9-2
9.2.1 Ladder Logic (LAD) ............................................. 9-4
9.2.2 . (FBD) ........................... 9-5
9.2.3 . (STL) ........................................ 9-5
9.2.4 S7 SCL ................................................................ 9-6
9.2.5 S7 Graph ( ) ..... 9-8
9.2.6 S7 HiGraph ( )............................ 9-9
9.2.7 S7 CFC.............................................................. 9-10
9.3 ........................................................................................ 9-11
9.3.1 ............................................................................................... 9-11
9.3.2 ............................................................................................... 9-11
9.3.3 , (UDT) .............................. 9-11
9.3.4 ......................................................................................... 9-12
9.3.5 ........................................................................ 9-14
9.3.6 ...................................................................................... 9-15
9.3.7 ................................................................................................ 9-19
9.3.8 ......................................................... 9-19
9.4 ............................................................................. 9-20
9.4.1 ........................................................ 9-21
9.4.2 .................................................................. 9-21
10 ................................................................................... 10-1
10.1 ....................................................... 10-1
10.1.1 ........................................................ 10-1
10.1.2
...................................................................................... 10-3
10.1.3 LAD/STL/FBD ........ 10-4
10.1.4 ......................................... 10-4
10.1.5 ........................................... 10-4
10.2 ................................... 10-6
10.2.1 ................. 10-6
10.2.2 .... 10-7
-
STEP 7 V5.3
A5E00261405-01
10.2.3 .............................................. 10-8
10.3 ............................ 10-8
10.3.1 ......................................................... 10-8
10.3.2 ................................................... 10-9
10.3.3 ............... 10-10
10.4 ......... 10-10
10.4.1 ......................................................................... 10-10
10.4.2 ......................................................................... 10-12
10.4.3 ............................................... 10-13
10.4.4 .................................. 10-13
10.4.5 ...................... 10-15
10.4.6 ............................................................... 10-15
10.4.7 ............................................... 10-16
10.5 LAD ...................................... 10-17
10.5.1 LAD .............................................. 10-17
10.5.2 LAD............................................................ 10-18
10.5.3 ................... 10-20
10.6 FBD ...................................... 10-21
10.6.1 ............... 10-21
10.6.2 ............................. 10-21
10.7 STL ...................................... 10-24
10.7.1 ................................ 10-24
10.7.2 STL..................................................................... 10-24
10.8 ................................................................. 10-25
10.8.1 ................................................................. 10-25
10.8.2 ......................................................................... 10-26
10.9 ............................................................... 10-27
10.9.1 ............................................................... 10-27
11 ......................................................................................... 11-1
11.1 ................................ 11-1
11.2 ................................................... 11-2
11.3 , ......................... 11-2
11.4 ........................................ 11-4
11.4.1 ............................................ 11-4
11.4.2 ,
FB ( DB) ..................................................... 11-4
11.4.3 ,
(UDT) ....................................................... 11-6
11.4.4 ,
-
STEP 7 V5.3
xiv A5E00261405-01
UDT .................................................................................... 11-6
11.4.5 .................................... 11-7
11.4.6 ................................................. 11-8
11.4.7 ....................................................................... 11-8
12 ....................................................... 12-1
12.1 ................................................. 12-1
12.2 ............................ 12-2
13 STL....................................................................... 13-1
13.1
STL.......................................................................................................... 13-1
13.2 STL ......................... 13-2
13.2.1 STL ........................ 13-2
13.2.2 STL ................. 13-3
13.2.3 STL ..................... 13-4
13.2.4 STL. 13-4
13.2.5 STL ....... 13-5
13.2.6 , ................................. 13-6
13.3 STL......................................... 13-8
13.3.1 STL ..................... 13-8
13.3.2 STL ........................... 13-9
13.3.3 ,
STL........................................................................ 13-9
13.3.4 STL ............. 13-9
13.3.5 ....................................... 13-10
13.3.6 ........................................ 13-11
13.3.7 ................................................................... 13-12
13.3.8 ........................................................ 13-13
13.4 STL ............................................................ 13-14
13.4.1 STL ............................................................ 13-14
13.4.2 S7................................................... 13-14
13.4.3 .............................................. 13-15
13.4.4 STL ................................ 13-15
13.4.5 STL ........................... 13-15
13.4.6
STL .............................................................................. 13-16
13.4.7 ....................................................... 13-16
13.4.8 STL ................................. 13-17
13.4.9 ....................................................................... 13-17
13.4.10 ....................................................................... 13-18
-
STEP 7 V5.3
A5E00261405-01
13.5 STL
............................................................. 13-18
13.5.1 STL................................................... 13-18
13.5.2 STL ................ 13-19
13.5.3 STL ............................................. 13-19
13.5.4 STL..................................................... 13-19
13.6 STL........................................................ 13-21
13.6.1 STL .............. 13-21
13.6.2 STL ............ 13-22
13.6.3 STL ........................................ 13-23
13.6.4 STL............. 13-26
13.6.5 STL ............................. 13-28
13.6.6 , ,
STL...................................................................... 13-29
14 ......................................................................... 14-1
14.1 ............................................................ 14-1
14.1.1 .................................................................... 14-2
14.1.2 ................................................................................ 14-3
14.1.3 ..................................................................................... 14-5
14.1.4 ..................................................................... 14-7
14.1.5 ................................................................................. 14-8
14.1.6 LAD, FBD STL..................... 14-8
14.2 ............................................................ 14-9
14.2.1 ............................................. 14-9
14.2.2 ......................... 14-10
14.2.3 ............................ 14-11
14.2.4 ............................. 14-12
14.2.5 ..................................... 14-13
15 ................... 15-1
15.1 .............................................................. 15-1
15.2 .......... 15-2
15.3 ........................................................ 15-3
15.4 .......................................... 15-4
15.5 ..................................... 15-4
15.6 UDT , UDT................ 15-5
15.7 , UDT15-6
15.8 .......................................... 15-6
16 .................................................................................... 16-1
16.1 ............................................................................... 16-1
-
STEP 7 V5.3
xvi A5E00261405-01
16.1.1 ? ...................................... 16-1
16.1.2 ......................................................................... 16-3
16.1.3 SIMATIC................................................................................. 16-4
16.1.4 ........................................................................................ 16-5
16.1.5 ? ........................................................... 16-6
16.1.6 , ..... 16-8
16.1.7 .......................................................... 16-9
16.1.8 STL ..... 16-10
16.1.9 ............................................................ 16-11
16.1.10
CPU.................................................................................................. 16-11
16.1.11
............................................................................................... 16-11
16.2 .......................................... 16-12
16.2.1 ..................................... 16-12
16.2.2 , ...... 16-12
16.2.3 , . 16-18
16.2.4 ,
................................................................ 16-19
16.3 CPU ............................................... 16-20
16.3.1 CPU .......................................... 16-20
16.3.2 , ...... 16-21
16.3.3 , 16-25
16.3.4 ,
................................................................ 16-27
16.4 ............................................... 16-28
16.4.1 ...................................... 16-28
16.4.2 .................. 16-30
16.4.3 ................................................................. 16-31
16.5 ........... 16-31
16.5.1 ........................ 16-32
16.6 ................................. 16-33
16.6.1 ............................................. 16-33
16.6.2 ......................................................... 16-33
16.6.3 ................................................................ 16-34
16.7
............................................................. 16-35
16.7.1
............................................................. 16-35
-
STEP 7 V5.3
A5E00261405-01
16.8 CPU ,
................................................................ 16-35
16.8.1 CPU ..................................................................... 16-38
16.8.2 CPU......................................... 16-39
16.9 ............................ 16-39
16.9.1 ........ 16-40
16.9.2 " ".................................... 16-43
16.9.3 ........................... 16-44
16.9.4 OB ...................................................................... 16-44
16.9.5 FB, DB ........................................................................ 16-45
17 ....................................................... 17-1
17.1
................................................................................ 17-1
17.2
, ............... 17-2
17.3
......................................................... 17-3
17.4
CFC............................................................................ 17-4
17.5
........................................................................ 17-5
18 online CPU ............................................ 18-1
18.1.1 online.............................................................. 18-1
18.1.2 online
"Accessible Nodes [ ]"........................................................ 18-1
18.1.3 online online .................. 18-2
18.1.4 Online PLC ...................................................... 18-4
18.1.5 ....... 18-5
18.1.6 ................................................................. 18-6
18.2 ............................................. 18-7
18.3 .............................................. 18-7
18.3.1 CPU / . 18-7
18.4 ....................................................... 18-9
18.4.1 Online . 18-9
19 .............................................................................................. 19-1
19.1 PG/PC .............................. 19-1
19.1.1 ........................................................................ 19-1
19.1.2 ................................. 19-2
19.1.3 CPU...................................................... 19-2
-
STEP 7 V5.3
xviii A5E00261405-01
19.1.4 , ............................. 19-4
19.1.5 CPU S7.................................................................. 19-5
19.2 PG ..................... 19-8
19.2.1 ................................ 19-8
19.2.2 ............................................... 19-10
19.3 PG/PC ......................... 19-11
19.3.1 PG/PC ......................... 19-11
19.3.2 .............................. 19-13
19.3.3 CPU S7 ..................................................................... 19-14
19.3.4 PG/PC..................................... 19-14
19.3.5 PG/PC..................................... 19-14
19.4 ......................................... 19-17
19.4.1 / CPU.............................. 19-17
19.5 (RAM)...................................................... 19-18
19.5.1 (RAM)................................................ 19-18
19.5.2 S7 CPU ................................................. 19-19
20 ........................................................................................................................ 20-1
20.1 ................ 20-1
20.2
................. 20-2
20.3 ............................... 20-2
20.3.1 ............................................ 20-2
20.3.2 / ................................... 20-3
20.3.3 ........................................................... 20-3
20.4 ............................................... 20-4
20.4.1 ......................... 20-4
20.4.2 ...... 20-5
20.4.3 ................................................................. 20-7
20.4.4 ..................................................... 20-7
20.4.5 .................................................... 20-8
20.4.6 ....................................................................... 20-9
20.4.7 ...................................................................................................... 20-9
20.4.8 ........................................ 20-9
20.5 CPU...................................................................... 20-12
20.5.1 CPU...................................................................... 20-12
20.6 ........................................................................ 20-13
20.6.1 .................................................... 20-13
20.6.2 ........................... 20-14
20.7 ........................................................................... 20-15
-
STEP 7 V5.3
A5E00261405-01
20.7.1 ....................................................... 20-15
20.7.2 .............................. 20-16
20.8 ....................... 20-18
20.8.1
.............................................................................. 20-18
20.8.2 ... 20-19
20.8.3
.............................................................................. 20-21
21 .................................. 21-1
21.1 ........................................................ 21-2
21.2
................................................................................. 21-3
21.3 HOLD................................................... 21-5
21.4 .................................................. 21-6
21.5 ............................... 21-7
21.6 ....................................................... 21-7
22
( )........................................................................................... 22-1
22.1
( ) ............................................................................ 22-1
23 ................................................................................................................. 23-1
23.1 ................... 23-1
23.2 online ................................ 23-2
23.3 : ................................. 23-4
23.3.1 .............................................................................. 23-4
23.3.2 ........................................ 23-4
23.4 : .................... 23-5
23.4.1 ............................................................... 23-5
23.4.2 .......................... 23-7
23.5 ............................................................................. 23-7
23.5.1 ............................... 23-7
23.5.2 .............................................................. 23-8
23.5.3 ............................. 23-10
23.5.4 PA DP
Y-............................................................................................ 23-12
23.6 STOP .............................................................. 23-13
23.6.1
STOP ...................................................................... 23-13
23.6.2 STOP.................................................. 23-14
-
STEP 7 V5.3
xx A5E00261405-01
23.7
................................................................................... 23-15
23.7.1
................................................................................... 23-15
23.8 ...................................................... 23-16
23.8.1 ...................................................... 23-16
23.8.2 (SSL) ........................................................... 23-17
23.8.3 ............... 23-19
23.8.4 ....................................................................... 23-20
23.9 ........................................... 23-21
23.9.1 RET_VAL ................................................ 23-22
23.9.2 OB , .............................. 23-23
23.9.3 ......... 23-28
23.9.4 / (OB70) .................................... 23-30
23.9.5 CPU (OB72) .................................................... 23-30
23.9.6 (OB80).......................................................................... 23-31
23.9.7 (OB81) ............................................................. 23-32
23.9.8 (OB82)..................................................... 23-32
23.9.9 / (OB83).......................................... 23-33
23.9.10 CPU (OB84) ................................................. 23-34
23.9.11 (OB85)............ 23-34
23.9.12 (OB86)................................................................................. 23-35
23.9.13 (OB87) ............................................................................... 23-36
23.9.14 (OB121) ...................................................... 23-36
23.9.15 / (OB122)...................................... 23-37
24 .......................................................................................... 24-1
24.1 .............................................................. 24-1
24.1.1 ............................. 24-2
24.1.2 ........................................................................................... 24-2
24.1.3 ............................ 24-3
24.2 ..................................................... 24-4
24.2.1 ..................................................... 24-4
24.2.2 /..................................... 24-5
24.2.3 ............................................................. 24-5
24.2.4 / ................................................... 24-6
25 M7................................. 25-1
25.1 M7......................................................................... 25-1
25.2
M7........................................................................ 25-4
-
STEP 7 V5.3
A5E00261405-01
25.3 M7-300/M7-400.................................................. 25-7
26 ......................................................................................................................... 25-1
26.1 ....................................... 25-1
26.2 ................................ 25-1
26.3 ............................................................................................ 25-2
26.4 ....................................... 25-2
26.5 .................................................... 25-3
26.6 ..................... 25-4
26.7 .................................................................... 25-5
A ...................................................................................................................A-1
A.1 ............................................................................................A-1
A.1.1 ................................................A-1
A.1.2 STOP ..........................................................................................A-4
A.1.3 STARTUP ..........................................................................................A-5
A.1.4 RUN .................................................................................................A-11
A.1.5 HOLD...............................................................................................A-12
A.2 CPU S7............................................................................A-13
A.2.1 ..............................................................................A-13
A.2.2 .....................................................A-13
A.2.3 ......................................................................................A-16
A.3 ..............................................................A-29
A.3.1 ..........................................A-29
A.3.2 .....................................................................A-30
A.3.3 ............................................................................A-38
A.3.4 ..............................................................................A-48
A.4 .........................................................A-66
A.4.1 1 .........................................................A-66
A.4.2 2 .........................................................A-67
A.4.3 STEP 7 V.2.1
.........................................................................A-68
A.4.4 DP GSD....................A-68
A.5 ...................................................................................A-69
A.5.1 ..................................................A-69
A.5.2 .........A-71
A.5.3 ............................................A-86
A.5.4 ..........................................A-93
A.6
............................................................................A-104
A.6.1 ........................................................A-104
-
STEP 7 V5.3
xxii A5E00261405-01
A.6.2 ..............................................A-105
A.7 ...................................................................A-107
A.7.1 ...................................................................A-107
A.7.2 .......................................A-108
A.7.3 ( )
Offline..............................................................A-110
A.7.4 ...............................................................A-110
A.7.5 .....................................A-112
-
Programming with STEP 7 V5.3 A5E00261405-01 1-1
1
1.1 STEP 7
STEP 7? STEP 7 ,
SIMATIC. SIMATIC. STEP 7:
STEP 7 Micro/DOS STEP 7 Micro/Win SIMATIC S7-200
STEP 7 SIMATIC S7-300/S7-400, SIMATIC M7-300/M7-400 SIMATIC C7 :
- , SIMATIC (. STEP 7)
-
-
-
-
-
STEP 7 , STEP 7 Micro "STEP 7 Micro/DOS".
STEP 7 . , , . , , , , .
-
Programming with STEP 7 V5.3 1-2 A5E00261405-01
STEP 7
STEP 7
? ?
?
?
?
?(, )
:
" "
?
?
-
Programming with STEP 7 V5.3 A5E00261405-01 1-3
, :
, .
, , , . , , , .
STEP 7, (. STEP 7 ).
STEP 7 (. ).
, , , , STEP 7 (. ).
STEP 7 STEP 7 Windows (. STEP 7).
, . (. ).
, ; , SIMATIC 300, SIMATIC 400, SIMATIC S5 (. ).
, . (. )
. , , , (. ).
-
Programming with STEP 7 V5.3 1-4 A5E00261405-01
, , (. ).
, , , , (. STL).
S7: (. ).
, , , , . , (, SIMATIC WinCC, SIMATIC ProTool), . .
STEP 7 . , WinCC (. ).
S7: , ( ). CPU . M7: 7.
S7: , , CPU, (. ). M7: .
, online. . ,
-
Programming with STEP 7 V5.3 A5E00261405-01 1-5
CPU (. ).
/ , (. ). DOCPRO, , , .
, :
CPU (. CPU)
(. )
7 (. 7):
-
Programming with STEP 7 V5.3 1-6 A5E00261405-01
1.2 STEP 7
SIMATIC STEP 7 EN 61131-3. Windows 2000 Windows XP - Windows.
, :
, , S7
STEP 7 , , .
STEP 7 online online Help PDF.
-
Programming with STEP 7 V5.3 A5E00261405-01 1-7
STEP 7 STEP 7 ( ) :
LAD FBD STL
SIMATIC Manager
-
NETPRO-
; .
SIMATIC Manager SIMATIC Manager , , (S7/M7/C7) . , , SIMATIC Manager'.
-
Programming with STEP 7 V5.3 1-8 A5E00261405-01
. :
(/), / / Windows
, , . , .
. , , - . . :
(, , , ) (, )
(, ) DP
CPU :
( , )
MPI
( /, , , )
: , S7-300 S7-400 .
(. KOP, . LAD) STEP 7. - : , .
(. AWL, . STL) STEP 7, . , , CPU .
-
Programming with STEP 7 V5.3 A5E00261405-01 1-9
( ).
(. FUP, . FBD) STEP 7, . (, ) .
.
, . :
.
. / .
CPU , . . .
. , , . CPU. , , .
(FM) () Hardware Configuration [ ] , . FM ( FM/CP) . , .
NetPro ( ) NetPro MPI , :
; (SDB) CPU
-
Programming with STEP 7 V5.3 1-10 A5E00261405-01
, , :
-
Programming with STEP 7 V5.3 A5E00261405-01 1-11
1.3 STEP 7 5.3?
:
STEP 7 MS Windows 2000 Professional
MS Windows XP Professional.
STEP 7 V5.3 . , .. (Automation License Manager) (. Automation License Manager). "AuthorsW" .
() File ( ) > Page Setup. SIMATIC Manager.
SIMATIC Manager "Compare Blocks" "Compare Details".
comparing blocks "Select" (). , MMC Memory Card,
"Files on MMC" , . .
F-, F-. , F-, File > New > Libraries. " " "F-".
PLC > Diagnostics/Setting > Node Flashing Test , (PG)/PC FORCE (. Online " " Ethernet (PROFInet)).
LAD/STL/FBD " "
, .
, LAD FBD , .
, Options > Customize, "" , , , (. Online " " ).
-
Programming with STEP 7 V5.3 1-12 A5E00261405-01
. , / .
"H" "S7-400H Fault-Tolerant Systems"
; STEP 7 V5.3. , "S7-400H Fault-Tolerant Systems", Start > SIMATIC > Documentation. " IO" , I/O.
(. Hardware Catalog).
( , FAQ) Internet. , , . , , , (. ).
: "Option Handling" ET 200S (. ET 200S Option Handling). ID CPU 41x-xxx40.
NCM S7 Industrial Ethernet NCM S7 PROFIBUS,
S7 CP, , STEP 7 V5.3.
. , (. ).
CPU 317-2 PN/DP S7 PROFInet. (Communication Blocks, CPU 300, . ).
. , .
( ) " ". , , , , , , , (. ).
-
Programming with STEP 7 V5.3 A5E00261405-01 1-13
" "
SFC85 , SFC112, SFC 113 SFC 114 PROFInet.
" " S7 CPU 317-2 PN/DP (CPU_300).
, , . , , F-, F-.
Process Diagnostics > Import Templates
[ > ] S7-PDIAG.
STEP 7 V5.3, CSV,
XLS .
1.4 STEP 7
, : ;
, .
(Run-Time) ; .
Human Machine Interfaces [- ] (HMI); .
, : STEP 7 S7-300
S7-400 M7-300 M7-400
C7-620
Borland C/C++
o
CFC +1) + +2) DOCPRO + +3) +
-
Programming with STEP 7 V5.3 1-14 A5E00261405-01
STEP 7 S7-300
S7-400 M7-300 M7-400
C7-620
HARDPRO + M7
ProC/C++ o
S7 GRAPH +1) +2) S7
HiGraph + +
S7 PDIAG + S7
PLCSIM + +
S7 SCL + + Teleservice + + +
Fuzzy Control [ ]
+ +
M7-DDE
+
M7-SYS RT
o
Modular PID Control [- PID-]
+ +
PC-DDE
+
PRODAVE MPI
+
Standard PID Control [- PID-]
+ +
-
ProAgent SIMATIC
ProTool
SIMATIC ProTool /Lite
o
SIMATIC WinCC
o = + = 1) = S7-400 2) = C7-620 3) =
-
Programming with STEP 7 V5.3 A5E00261405-01 1-15
1.4.1 , , . :
, , , .
S7 SCL S7 GRAPH
S7 HiGraph
S7 PLCSIM
DOCPRO
CFC
M7 ProC/C++ S7 PDIAG
TeleService HARDPRO
SIMATIC S7-300/S7-400:
S7 GRAPH , ( ). . . .
S7 HiGraph , , . , , . .
S7 SCL , EN 61131-3 (IEC 1131-3). , Pascal C. S7 SCL , . S7 SCL
-
Programming with STEP 7 V5.3 1-16 A5E00261405-01
, ,
CFC S7 M7 . , . . , .
Borland C++ ( M7)
Borland. DOCPRO
, STEP 7, .
HARDPRO S7-300, .
M7-ProC/C++ ( M7) Borland ++ STEP 7.
S7 PLCSIM ( S7) S7, , .
S7 PDIAG ( S7) SIMATIC S7-300/S7-400. , (, ).
TeleService S7 M7 , PC.
-
Programming with STEP 7 V5.3 A5E00261405-01 1-17
1.4.2 (Run-Time)
(Run-Time) , . . : SIMATIC S7, , ,
Windows
SIMATIC M7
PID-
PID-
Windows
PRODAVE MPI M7-DDE
M7-SYS RT
SIMATIC S7 PID-
, . .
PID- , PID- . .
(Fuzzy Control) . , , , .
-
Programming with STEP 7 V5.3 1-18 A5E00261405-01
Windows PRODAVE MPI
SIMATIC S7, SIMATIC M7 SIMATIC C7. (MPI).
M7-DDE (Dynamic Data Exchange ) Windows SIMATIC M7 .
M7-SYS RT M7 RMOS 32 . M7-ProC/C++ CFC SIMATIC M7.
1.4.3 -
- (Human Machine Interface, HMI) SIMATIC. SIMATIC WinCC
, .
SIMATIC ProTool SIMATIC ProTool/Lite SIMATIC (OP) SIMATIC C7.
ProAgent .
SIMATIC WinCC SIMATIC ProTool
-
ProAgent
SIMATIC ProTool/Lite
-
Programming with STEP 7 V5.3 A5E00261405-01 2-1
2
2.1
2.1.1
, STEP 7, ( ). STEP 7 V5.3, Automation License Manager.
Automation License Manager - Siemens AG. ( ) .
Automation License Manager :
,
Internet A&D Customer Support Siemens AG
Automation License Manager online help. F1 Help > Help on License Manager. Automation License Manager.
, STEP 7, . . :
CoL (Certificate of License),
-
Programming with STEP 7 V5.3 2-2 A5E00261405-01
(CoL) " ", , . (CoL) , .
( "license stamp") . SIEMENS AG , . , .
.
, STEP 7
, .
: , . , , Automation License Manager.
-
Programming with STEP 7 V5.3 A5E00261405-01 2-3
Siemens AG. , . .
.
(" ") .
: 14 ,
,
( ) :
" X" X+.
, .
2.1.2 Automation License Manager
Automation License Manager MSI. Automation License Manager STEP 7 CD.
Automation License Manager STEP 7 .
"Readme.wri"
Automation License Manager , .
-
Programming with STEP 7 V5.3 2-4 A5E00261405-01
STEP 7 , .
.
, STEP 7
, .
:
Internet. , .
,
online help Automation License Manager. help, F1 Help > Help on License Manager.
Windows 2000/XP, , .
("" ).
2.1.3
! : , online help Automation License Manager STEP 7 Readme.wrifile CD-ROM. , .
help, F1 Help > Help on License Manager.
.
-
Programming with STEP 7 V5.3 A5E00261405-01 2-5
2.2 STEP 7
STEP 7 Setup, . . Setup Windows 2000/XP. :
EPROM
(ID)
( )
Siemens ( PG 740) STEP 7 , .
Microsoft Windows 2000 or Windows XP.
: PC :
Pentium ( Windows 2000, P233; Windows XP, P233)
RAM: 128
, , Microsoft Windows
(PG) , . SIMATIC.
: readme- :
MPI (): (MPI) , MPI STEP 7. :
PC - (RS232), ,
-
Programming with STEP 7 V5.3 2-6 A5E00261405-01
MPI (, CP 5611), .
.
( ) , .
STEP 7 README.WRI "List of SIMATIC Software Packages, STEP 7."
Readme Start > Simatic > Product Notes.
Start > Simatic > Documentation.
2.2.1
(Windows 2000/XP).
, STEP 7 .
CD-ROM CD-ROM CD-ROM PC.
:
1. CD-ROM SETUP.EXE".
2. .
. .
, , . , .
-
Programming with STEP 7 V5.3 A5E00261405-01 2-7
- STEP 7... STEP 7, , : , STEP 7
Windows, , .
, . , , .
: :
, . , .
: , . , .
, : , , , , .
(ID) (ID). , (Software Product Certificate). STEP 7 .
, . , , . . , .
PG/PC , /. " PG/PC"..
-
Programming with STEP 7 V5.3 2-8 A5E00261405-01
, .
, (EPROM). No EPROM Driver [ ]".
, .
, . , (, LPT1).
, Memory Card Parameter Assignment [ ]" STEP 7.
- , -.
- , , EPROM SIMATIC M7 .
(PG 720/PG 740/PG 760, Field PG Power PG) , -.
:
Setup (initialization error), , , - Windows.
(Not enough memory): 100 , .
(Bad disk): , . Siemens.
(Operator error): .
, .
DOS-, Windows.
-
Programming with STEP 7 V5.3 A5E00261405-01 2-9
, STEP 7 - SIMATIC Manager.
SIMATIC Manager' .
, STEP 7.
-
Programming with STEP 7 V5.3 2-10 A5E00261405-01
2.2.2 PG/PC
/ . , /. , Setting PG/PC Interface [ PG/PC]" STEP 7. .
:
(MPI), , , .
MPI (), ("Control Panel") Windows, , .
Windows 2000 Windows XP, MPI-ISA .
/, ( ).
PG/PC , ( online-):
1. " " ("Control Panel") Setting PG/PC Interface [ PG/PC]".
3. Access Point of Application [ ]" S7ONLINE."
4. "Interface parameter set used [ ]" . , , , , Select []". . plug-and-play CP (CP 5611 CP 5511). " PG/PC , PG/PC.
- , (, CP 5611 (Auto)),
-
Programming with STEP 7 V5.3 A5E00261405-01 2-11
MPI PROFIBUS . , , 187,5 /, , . : , , . MPI; PROFIBUS ( PROFIBUS ).
- , , .
, (, ). Windows.
! TCP/IP", . .
MPI, , , , , / .
Windows 2000 Windows 2000 :
Control Panel > Administrative Tools > Computer Management > System Tools > System Information > Hardware Resources.
Control Panel > Administrative Tools > Computer Management > System Tools > Device Manager > SIMATIC NET > CP-Name > Properties > Resources
Windows XP Windows XP
START > All Programs > Accessories > System > System programs > System Information > Hardware Resources.
Control Panel > Desktop > Properties > Device Manager > SIMATIC NET > CP Name > Properties > Resources.
-
Programming with STEP 7 V5.3 2-12 A5E00261405-01
2.3 STEP 7
2.3.1 STEP 7
STEP 7 Windows:
1. Windows Add/Remove Programs [ ]" " " (Control Panel").
2 . STEP 7 . Add/Remove [/ ]" .
3. Remove Enabled File [ ]", No []", , .
-
Programming with STEP 7 V5.3 A5E00261405-01 3-1
3
3.1
, (). .
. , , .
.
.
.
, .
.
-
Programming with STEP 7 V5.3 3-2 A5E00261405-01
3.2
. .
, :
M
M
-
A
B
M
M M
M
:
-
Programming with STEP 7 V5.3 A5E00261405-01 3-3
, , :
M
M
: B
:
:
M
M M
M
:
, , , .
(. ). , .
A A A A
-
Programming with STEP 7 V5.3 3-4 A5E00261405-01
3.3
, , , . : ,
, . , . , . , .
A/B:
. : 400 : 100 1200 /.
(/) , . . , . :
. .
. , :
7 .
,
A/B:
. .
, . , .
. :
1 . , :
.
-
Programming with STEP 7 V5.3 A5E00261405-01 3-5
. : 100 1200 /. (/) , . . , . :
" "
. .
, : 10
.
() . .
, . , .
(/) . :
. " ". .
, : " ".
-
Programming with STEP 7 V5.3 3-6 A5E00261405-01
3.4 , /
, , .
/
n
/ 1
/ n
n
1 1
, .
3.5 /
. " ", . : , , ( / ), , , , .
: , , .
/. , " ".
-
Programming with STEP 7 V5.3 A5E00261405-01 3-7
_
_
_
/ " "
3.6 /
" ", . : . : , , , .
/ . , " ".
/ " "
3.7
, . , .
-
Programming with STEP 7 V5.3 3-8 A5E00261405-01
, . , ( / ). . .
:
/ .
, , , .
-
Programming with STEP 7 V5.3 A5E00261405-01 3-9
:
(PLC):
-
- B
-
-
.
.
3.8
, . .
, , , . (. ).
-
Programming with STEP 7 V5.3 3-10 A5E00261405-01
. A
. A
. B
. B
.
.
. B
.
, , , . . , , 0..
3.9
, .
, , . , :
CPU
/
S7 .
-
Programming with STEP 7 V5.3 A5E00261405-01 3-11
-
CPU S7-300I 0.0t
I 1.7
Q 4.0Q 5.0
Q 8.0Q 9.0
.
-
-
t
t
t
-
Programming with STEP 7 V5.3 3-12 A5E00261405-01
-
Programming with STEP 7 V5.3 A5E00261405-01 4-1
4
4.1 CPU CPU : .
CPU , CPU, . : "" ""
( ), CPU .
CPU. , . :
"" "" CPU (, )
(, , , , )
.
-
Programming with STEP 7 V5.3 4-2 A5E00261405-01
4.2
4.2.1
STEP 7 , , . : . . . . , . .
. .
-
Programming with STEP 7 V5.3 A5E00261405-01 4-3
, S7:
. (OB)
OB .
(SFB) (SFC)
SFB SFC CPU S7 .
(SFB) (SFC)
(FB)
FB "", .
(FB)
(FC) FC .
(FC)
( DB)
DB , FB/SFB. .
(DB) DB . , , , .
(DB)
OB, FB, SFB, FC SFC . CPU.
4.2.2 () . , . . , CPU.
, . . , . . .
, , . STEP 7 .
-
Programming with STEP 7 V5.3 4-4 A5E00261405-01
CPU S7 (. " S7-300 Programmable Controller, Hardware and Installation Manual [ S7-300. ]" "S7-400, M7-400 Programmable Controllers Module Specifications Reference Manual [ S7-400, M7-400. . ]").
( ) .
OB1 1 (OB1)
OB10 OB17 2 (OB10 OB17)
OB20 OB21 OB22 OB23
3 4 5 6
(OB20 OB23)
OB30 OB31 OB32 OB33 OB34 OB35 OB36 OB37 OB38
7 8 9 10 11 12 13 14 15
(OB30 OB38)
OB40 OB41 OB42 OB43 OB44 OB45 OB46 OB47
16 17 18 19 20 21 22 23
(OB40 OB47)
OB60
25 CPU
OB70 / ( H-) OB72 CPU ( H-)
25 28
(OB70 OB87 / OB121 OB122)
-
Programming with STEP 7 V5.3 A5E00261405-01 4-5
( )
.
OB80 OB81 OB82 OB83 / OB84 CPU OB85 OB86 OB87
26 ( 28, )
(OB70 OB87 / OB121 OB122)
OB90 29 1) (OB90)
OB100 OB101 OB102
27 27 27
(OB100/OB101/OB102)
OB121 OB122
,
(OB70 OB87 / OB121 OB122)
1) 29 0,29. , .
STEP 7 . , , , : , , . CPU S7-300 .
CPU S7-400 ( CPU 318) STEP 7: OB10OB47
OB70 OB72 ( H-CPU) OB81 OB87 RUN.
:
2 23 OB10 OB47
2 28 OB70 OB72
24 26 OB81 OB87. 2001 ( 3.0) : 2 26 OB 81 OB 84 OB 86 OB 87.
. , .
-
Programming with STEP 7 V5.3 4-6 A5E00261405-01
, , , , , .
(OB, FC, FB) . CPU .
S7-400 , , priority classes [ ]" STEP 7..
OB 20 , . , , , .
, 40, , , , .
0 20 , . :
RUN .
STOP , CPU "" , , .
, , , .
"" , , 1 . 1 .
-
Programming with STEP 7 V5.3 A5E00261405-01 4-7
, (). , , , , , . , , .
-
- -
-
-
, , ,
-
Programming with STEP 7 V5.3 4-8 A5E00261405-01
, . "" . , (, , ), , , , , .
1 ( ). , CPU S7-300 .
, , . , ( ).
= OB 1
OB 1
FB 1
FC 1
-
Programming with STEP 7 V5.3 A5E00261405-01 4-9
. STEP 7, , .
. , ( ), CPU.
.
FB 1
DB 1
OB 1
FC 1
FB 2 DB 2
FC 1
FB 1
DB 1
SFC 1
DB 1
:
, .
, . . .
OB1.
:
FC1 > FB1 + DB1 > DB1 > SFC1 > FB2 + DB2 > OB1
( ), (. ).
-
Programming with STEP 7 V5.3 4-10 A5E00261405-01
. , . , , , , , , .
,
(OB, FB, FC)
(FB, FC, SFB SFC)
, , , .
.
SFB , SFB =0 100. , , , SFB.
-
Programming with STEP 7 V5.3 A5E00261405-01 4-11
4.2.3
4.2.3.1 (OB1)
"" . 1 , .
:
CPU
CPU ( 10/98)
1. .
.
2 CPU .
CPU .
3 CPU .
CPU .
4 CPU .
CPU .
5 , , , .
, , , .
6 , CPU .
, CPU .
CPU , CPU (I) (Q) /, CPU, .
1 , 1 STEP 7.
-
Programming with STEP 7 V5.3 4-12 A5E00261405-01
, .
:
STOP ( , , SFC46 STP, SFB20 STOP)
, , (, ), (, ). .
(TC) . (TC1 TC2) CPU 10/98 CPU 10/98:
OB10
OB1 OB1 - -
TC1 TC2
OB1 OB1
CPU
- -
- -
- -
- -
-
Programming with STEP 7 V5.3 A5E00261405-01 4-13
OB10
OB1 OB1
TC1 TC2
OB1
CPU (10/98)
- -
- -
- -
- -
- -
OB1 .
STEP 7 , . , CPU STOP, 80, , CPU .
STEP 7 S7-400 CPU 318. :
, 1 ( ),
, .
CPU 10/98 CPU 10/98.
-
Programming with STEP 7 V5.3 4-14 A5E00261405-01
OB10 OB10
OB40
PC07
PC01
TC
Tmin
Tmax
T
PC16
OB1 OB1
-
OB1
OB90 OB90 OB90PC29
TmaxTminTcT
PC
CPU
= , = , = = T min .
=
-
-
-
Programming with STEP 7 V5.3 A5E00261405-01 4-15
OB10
OB40
PC07
PC01
TC
Tmin
Tmax
T
PC16
OB10
OB1 OB1
-
OB90 OB90 OB90PC29
TmaxTminTcT
PC
CPU (10/98)
= , = , = = T min . =
-
-
CPU , . CPU S7-400 CPU 318 , :
/
, SFC26 UPDAT_PI SFC27 UPDAT_PO.
CPU "Scan Cycle Load from Communication [ ]" , , . CPU MPI .
. , . ( S7-300).
-
Programming with STEP 7 V5.3 4-16 A5E00261405-01
CPU CPU ( ). , .
, OB1 , :
100
100 - "Scan cycle load from communication (%)"
1 ( ):
, 50%, OB1 .
, OB1 ( ). OB1, . OB1. , OB1 .
2 ( ):
OB1 500 , 50% 1000 (, CPU ). , , 100 20 , 5*20 = 100 . 600 . , 10 * 20 50% . , 1200 1000 .
" ", .
; .
-
Programming with STEP 7 V5.3 A5E00261405-01 4-17
, .
, CPU .
.
( S7-300), , .
4.2.3.2 (FC)
(FC) , . " ". , FC, . FC , . , () . FC , . FC .
FC , , FC . :
(: )
(: .
"" . . FC (, "E3.6" "Start"). , /, FC, , FC.
FC FB (FB) DB. FB, DB / DB = FB), .
-
Programming with STEP 7 V5.3 4-18 A5E00261405-01
(FC) . , FB, FC . FC ( ). ( ) , .
:
, FC, !
, , . , , 0 .
:
, OUTPUT.
RLO. OUTPUT, , RLO=0.
, OUTPUT - . , ENO LAD FBD, BEC ( ) MCR (Master Control Relay).
, OUTPUT FB INOUT FC FB ( ), , "" .
4.2.3.3 (FB)
(FB) , . " ". ( ). DB , FB, . .
-
Programming with STEP 7 V5.3 A5E00261405-01 4-19
, DB, , FB . , , , , FB .
FB .
FB , , FB . .
, .
FB, FB . , FB , . (, , . .) DB.
FB, , DB.
INT IN INT IN DT IN_OUT_ TIME IN_OUT
FB20:
(16 ):
(16 ):
(48 ):
(32 ):
DB202: _2
, FB , FB , , FB, , , FB. ""
-
Programming with STEP 7 V5.3 4-20 A5E00261405-01
().
STEP 7 FB. . :
/ (in/out) (, STRING, ARRAY DATE_AND_TIME)
(, TIMER, COUNTER POINTER)
STEP 7 FB :
: FB .
: FB , DB.
, FB .
/
FB. DB, FB.
, STEP 7 , DB. , FB.
, . , .
-
Programming with STEP 7 V5.3 A5E00261405-01 4-21
/
4.2.3.4
, . FB DB. , FB, . . , , S7 , .
DB FB . FB.
DB (FB), , FB .
(, , , ) . DB, FB , , . (. ).
FB22: DB202: _2
DB201:_1
DB203: _3
FB22,DB201 - 1
FB22,DB202 - 2
FB22,DB203 - 3
-
Programming with STEP 7 V5.3 4-22 A5E00261405-01
DB FB ()
DB. , FB , FB, FB.
DB FB, .
FB FB21 " ", FB22, Motor_1, Motor_2 Motor_3.
FB 21 :CALL FB21,DB100 Motor_1,Motor_2, Motor_3 FB 22 FB 21:
CALL Motor_1CALL Motor_2CALL Motor_3
Motor_2
DB100
Motor_3
FB21:
Motor_1
FB22:
:stat, Motor_1, FB 22stat, Motor_2, FB 22stat, Motor_3, FB 22
FB22 , FB.
DB FB ()
FB. , , FB, FB.
, , . , .
DB.
-
Programming with STEP 7 V5.3 A5E00261405-01 4-23
FB12:DB12: FB12, :
CALL FB12, DB12
FB13:
FB14:
DB13: FB 13, :CALL FB13, DB13
DB14
Motor_10
Pump_10
:stat, Motor_10, FB 12stat, Pump_10, FB 13
FB 14, FB 13 FB 12, :CALL FB14,DB14 ,Motor_10 Pump_10 FB 12 FB 14:CALL Motor_10 FB 13 FB 14:CALL Pump_1
4.2.3.5 (DB)
, STEP 7. , , , . , .
DB . CPU.
.
(FC, FB ) , (L-). DB. , , DB , DB , , .
FB, FC DB DB. DB .
DB .
-
Programming with STEP 7 V5.3 4-24 A5E00261405-01
FC10
FC11
FB12
DB(DB 20)
DB
(DB 112)
FB12
-
Programming with STEP 7 V5.3 A5E00261405-01 4-25
4.2.3.6 (SFB) (SFC)
. CPU S7 , .
( ).
(SFB) , CPU S7. SFB . FB, SFB " ". SFB CPU .
CPU S7 SFB:
(, SFB29 HS_COUNT" CPU 312 IFM CPU 314 IFM).
, , CPU S7. SFC . SFC . FC, SFC " ".
CPU S7 SFC :
CPU CPU
, ,
-
Programming with STEP 7 V5.3 4-26 A5E00261405-01
,
SFB SFC " S7-300/400. ". " S7-300. " " S7-400, M7-400. . " , SFB SFC .
4.2.4 ,
4.2.4.1 ,
, CPU S7 :
( )
, . , , , .
, .
OB10 OB17
OB20 OB23 , 20
OB30 OB38
OB40 OB47
-
Programming with STEP 7 V5.3 A5E00261405-01 4-27
4.2.4.2 (OB10 OB17)
CPU S7 , .
:
( )
, (, , , ).
, . , (80, . (70 87 / 121 122)). . 10 , 31 , . , 31 . , ( ) . , , . CPU STOP.
(, SFC30 ACT_TINT ).
CPU , , . :
STEP 7 ( time-of-day interrupts [ ]")
SFC28 SET_TINT SFC30 ACT_TINT
STEP 7 SFC30 ACT_TINT .
, , : SFC31 QRY_TINT
-
Programming with STEP 7 V5.3 4-28 A5E00261405-01
interrupt status [ ]" .
SFC29 CAN_TINT. SFC28 SET_TINT SFC30 ACT_TINT.
(2) . .
, :
SFC0 SET_CLK.
, .
... ...
,
OB80, OB80.
OB80,
.
OB80,
, .
- ,
.
4.2.4.3 (OB20 OB23)
CPU S7 , .
-
Programming with STEP 7 V5.3 A5E00261405-01 4-29
CPU. , (80, (70 87 / 121 OB122)).
, , . CPU STOP.
, , SFC32 SRT_DINT.
SFC32 , . " S7-300. " " S7-400, M7-400. . .
3 6. .
4.2.4.4 (OB30 OB38) CPU S7 , .
. , , STOP RUN.
, .
, . CPU STOP.
STEP 7 . 1 .
= n x 1 .
-
Programming with STEP 7 V5.3 4-30 A5E00261405-01
(. ). , . . " S7-300. " " S7-400, M7-400. . ".
( ) . , .
= m ( 0 m < n)
, (OB37) (OB38).
0 8 16 24 32 40 4816 + 5 32 + 5 48 +5
OB 38(n=8, m=0)
OB 37(n=16, m=5)
t []
. .
OB30 5000 7 OB31 2000 8 OB32 1000 9 OB33 500 10 OB34 200 11 OB35 100 12 OB36 50 13 OB37 20 14 OB38 10 15
-
Programming with STEP 7 V5.3 A5E00261405-01 4-31
4.2.4.5 (OB40 OB47)
CPU S7 , (, (SM), (), (FM)). STEP 7 , . FM .
, , , CPU CPU .
, CPU . , (80, . (70 87 / 121 122)).
, . CPU STOP.
,
, , . , , STEP 7 :
.
( OB40).
STEP 7 . .
16 23. .
-
Programming with STEP 7 V5.3 4-32 A5E00261405-01
4.2.4.6 (OB100 / OB101 / OB102)
: ( S7-300 S7-400H)
, :
OB101 OB100 OB102
CPU : STOP RUN/RUN-P H- ( CPU)
, CPU, (100, 101 102).
CPU ( RUN, /) 100 , 101 102 .
, . . 0.
-
Programming with STEP 7 V5.3 A5E00261405-01 4-33
CPU S7-300 ( CPU 318-2).
CPU S7-400 (CRST/WRST), , STEP 7. .
CPU S7-300 .
CPU S7-400 , .
CPU S7-400, , . , , .
, , , .
, CPU .
, , :
,
CPU S7-400 , .
, CPU STOP, .
4.2.4.7 (OB90)
STEP 7, , , CPU . . CPU 90 , CPU , . ,
-
Programming with STEP 7 V5.3 4-34 A5E00261405-01
90 , , , , .
29, 0,29. , . .
, 10 ( CPU 10/98).
OB10
OB1 OB1 - I
- I
TC
OB10
OB90 OB90
Tmin
t
T
TTminT
= , = STEP 7= ,
90 90 CPU, 90 . , , :
OB90 (. " S7-300 S7-400, ")
OB90.
-
Programming with STEP 7 V5.3 A5E00261405-01 4-35
4.2.4.8 (OB70 OB87 / OB121 OB122)
, CPU S7 , :
: . . , CPU STOP.
: . , (, ) . , CPU STOP (: OB70, OB72, OB81).
, , .
OB 121 (.,DB )
OB 122 / (., - - /)
/
OB 70 /( H CPU)OB 72 CPU (
H CPU, ., CPU)OB 80 (., )OB 81 (.,
)OB 82 (.,
)OB 83 / -
(., )
OB 84 CPU (- MPI)
OB 85 (., )
OB 86
OB 87 (., - )
-
Programming with STEP 7 V5.3 4-36 A5E00261405-01
. , (I-) .
, , , , , . 121 122 , . , (, , 122 SFC44 RPL_VAL). L- .
CPU S7-400 . CPU S7-300 .
CPU , (70 72 80 87). , . , , .
(SFC) , . SFC " S7-300 S7-400. ".
SFC SFC
SFC36 MSK_FLT .
SFC37 DMSK_FLT
SFC39 DIS_IRT . CPU
SFC40 EN_IRT SFC41 DIS_AIRT
OB SFC42 EN_AIRT
-
Programming with STEP 7 V5.3 A5E00261405-01 4-37
, , SFC, ( ).
-
Programming with STEP 7 V5.3 A5E00261405-01 5-1
5
5.1 STEP 7
Windows 95/98/NT SIMATIC Manager, STEP 7 Windows.
STEP 7 . , SIMATIC Manager. , .
SIMATIC Manager " Start []" Windows 95/98/NT. "Simatic".
Windows Windows Windows.
SIMATIC Manager SIMATIC Manager - . :
-, .
SIMATIC Manager' :
Offline,
Online,
.
-
Programming with STEP 7 V5.3 5-2 A5E00261405-01
, "". , :
5.1.1 STEP 7 ,
STEP 7 5.0, SIMATIC Manager . , SIMATIC Manager , . , .
s7tgtopx.exe, :
/e
/o
/h /onl /off
.
:
1. s7tgtopx.exe.
2. .
3. "Link []". "Target []" .
4. SIMATIC Manager.
5. CTRL+C.
6. "Target []" "Link []".
7. CTRL+V.
8. , "OK".
: /e F:\SIEMENS\STEP7\S7proj\MyConfig\MyConfig.s7p
/o 1,8:MyConfig\SIMATIC 400(1)\CPU416-1\S7-Program(1)\Blocks\FB1
/h T00112001;129;T00116001;1;T00116101;16e
-
Programming with STEP 7 V5.3 A5E00261405-01 5-3
. UNC , , : F:\SIEMENS\STEP7\S7proj\MyConfig\MyConfig.s7p
:
[ , online]: \{ \}*\
: /o 1.8:MyConfig\SIMATIC 400(1)\CPU416-1\S7-Program(1)\Blocks\FB1
.
, . :
/o "MyConfig\SIMATIC 400(1)\CPU416-1\S7-Program(1)\Blocks\FB1. /onl /off, , online offline. , .
: , .
5.2
Online Help , . . :
Contents []:
Context-Sensitive Help [- ] ( F1): F1 , ,
Introduction []: ,
Getting Started [ ]: ,
Using Help [ ]:
About [ ]:
Help [] , , .
-
Programming with STEP 7 V5.3 5-4 A5E00261405-01
:
Help [] .
Help" [] . .
, , F1 Help > Context-Sensitive Help [ > - ].
Windows.
- .
, .
5.3
5.3.1
STEP 7 SIMATIC Manager , Windows .
Project
Station
Progr. Module
S7 ProgramSource FilesBlocks
S7/M7
:
,
,
(, ).
-
Programming with STEP 7 V5.3 A5E00261405-01 5-5
, (, ). , :
, Edit > Open Object [ > ].
, Edit > Object Properties [ > ], , .
.
() . , .
, .
, . : ( ), ( ).
, : ( ).
Edit > Open Object [ > ], ( ). , "Hardware []".
5.1.2
.
Project
Station
Progr. Module
S7 ProgramSource FilesBlocks
S7/M7
-
Programming with STEP 7 V5.3 5-6 A5E00261405-01
1 2 PG/PC
C: SIMATIC 300 SIMATIC 400
( ), ( ).
S7 M7
S7/M7 S7/M7 ( ), ( ). S7/M7
.
:
5.1.3
S7/M7 . .
S7 Program (1)
Source FilesBlocks
S7/M7
-
Programming with STEP 7 V5.3 A5E00261405-01 5-7
S7 M7
S7/M7 S7/M7 ( ), ( ). S7/M7
5.1.4
SIMATIC 300/400 S7 .
Project
Station
Progr. Module
S7 ProgramSource FilesBlocks
S7/M7
CPU
,
/ CPU
SIMATIC PC ( )
SIMATIC PC
SIMATIC PC
SIMATIC PC
SIMATIC PC ()
SIMATIC PC
-
Programming with STEP 7 V5.3 5-8 A5E00261405-01
:
Master- DP
( ), ( " ").
5.1.5
(CPUxxx, FMxxx, CPxxx). (, CP441) CPU . "system data [ ]", .
Project
Station
Progr. Module
S7 ProgramSource FilesBlocks
S7/M7
-
Programming with STEP 7 V5.3 A5E00261405-01 5-9
: CPU ,
/ CPU
Online
STEP 7
-
Programming with STEP 7 V5.3 5-10 A5E00261405-01
"
"
: S7 M7
S7/M7 S7/M7 ( ), ( ). S7/M7.
SIMATIC
5.1.6 S7/M7
S7/M7 , CPU S7/M7 , CPU (, CP FM).
Project
Station
Progr. Module
S7 ProgramSource FilesBlocks
S7/M7
-
Programming with STEP 7 V5.3 A5E00261405-01 5-11
S7
, CPU ,
M7
M7
()
( ), ( ).
,
5.1.7
offline : (OB, FB, FC, SFB, SFC), (DB), , (UDT) (VAT). .
online , .
-
Programming with STEP 7 V5.3 5-12 A5E00261405-01
Project
Station
Progr. Module
S7 ProgramSource FilesBlocks
S7/M7
STL
()
:
/
-
Programming with STEP 7 V5.3 A5E00261405-01 5-13
(FC) :
/
(FB)
:
/ ,
PCS7
, (UDT)
STL
, ,
-
Programming with STEP 7 V5.3 5-14 A5E00261405-01
(DB)
,
( )
PCS7 ( )
( )
(SFC)
(SFB)
, , CPU PCS7 PCS7 CPU
KNOW HOW
STL
Diagnostic-capable block
S7-PDIAG.
F-FBD/-LAD/-STL/-DB
S7 Distributed Safety.
(VAT)
,
Forcing
-
Programming with STEP 7 V5.3 A5E00261405-01 5-15
(SDB)
(SDB) :
:
,
-
Programming with STEP 7 V5.3 5-16 A5E00261405-01
5.1.8
.
Project
Station
Progr. Module
S7 ProgramSource FilesBlocks
S7/M7
STL
(, STL)
STL
STL
STL
STL
STL
STL
STL
-
Programming with STEP 7 V5.3 A5E00261405-01 5-17
5.1.9 S7/M7 CPU
, SIMATIC. , , .
S7/M7 1. File > Open [ > ] . 2. offline. 3. , :
Insert > Program > S7 Program [ > > S7], SIMATIC S7.
Insert > Program > M7 Program [ > > 7], SIMATIC 7.
S7/M7 . . .
, , (drag and drop).
SIMATIC S7, " ", . , .
online. , .
, . , .
-
Programming with STEP 7 V5.3 5-18 A5E00261405-01
5.4
5.4.1
: - , . , , , , , , .
, STEP 7, , .
- - , , .
, - , , , , , .
- . , , .
, .
, . , .
5.1.10
:
-
Programming with STEP 7 V5.3 A5E00261405-01 5-19
(/ . .)
File
Press F1 for help [ F1]
View Options WindowSIMATIC Manager
: , .
PLC Help
. . , .
( ), . , .
, .
- .
5.4.2
, . , , , .
-
Programming with STEP 7 V5.3 5-20 A5E00261405-01
Search/Replace [ ]
CancelSearch HelpReplace Replace All
:Q1.0
:Q2.0
Whole Word/Cell only [ / ]Match case [ ]
From Cursor Down [ ]From Cursor Up [ ]Whole Table [ ]Selection []
Only Search In [ ]
0.All []1.Component [1- ]2.Component [2- ]3.Component [3- ]4.Component [4- ]5.Component [5- ]Search in Column
[ ]All
, . , , . , . , .
(. ).
Module Information [ ] [ CPU]
Path []: test01\Program(online)
Diagnostic BufferGeneral Memory Cycle Time StacksCommunicationPerformanceData
Time System
No. Time Date Event
2 18:00:22:378 08.12.95 STOP due to power supply failure[STOP - ]
Events [] :
Modu