Upload
lekhanh
View
504
Download
7
Embed Size (px)
Citation preview
STEP 7: SCL STEP 7
STEP 7 STL SCL SIMATIC S7-300/400 2001
Copyright Siemens AG 2001 , . . , , , . Siemens AG \ 4848, D- 90327,
. , . , , , . . Siemens AG 2001 Technical data subject to change.
Siemens Aktiengesellschaft
, , . , :
! , , , .
! , , .
! , .
, , .
, .
. , , , .
:
! , , , Siemens. , , , , .
SIMATIC, SIMATIC HMI SIMATIC NET - SIEMENS AG.
, , ; , .
II Automating with STEP 7 in STL and SCL STEP 7
STL SCL
SIMATIC "" . , (SIMATIC S7), (SIMATIC M7) (SIMATIC C7). . S7-200 ("-PLC"), S7-300 S7-400 .
STEP 7, STEP 5, SIMATIC. Windows 95/98 Microsoft Windows NT Microsoft , STEP 7 ( , "").
STEP 7 , DIN EN 6.1131-3: STL ("statement list" - , Assembler- ), LAD ("ladder diagram" - " ", ), FBD ("function block diagram" - " ", -) SCL ("Structured Control Language" " ", Pascal- ). , : S7-GRAPH ( SIMATIC ), S7-HiGraph ( SIMATIC ) CFC ("continuous function chart" - ; CFC FBD). .
Automating with STEP 7 in STL and SCL III STEP STL SCL
, , STEP 7. STL S7-300/400. S7-300/400 STEP 7. STEP 7 , STEP 7 . STL , . , , . STL, ( ) . , , , , . SCL. SCL , SCL . STEP 7 SIMATIC S7- , . STEP 5 STEP 7, STL SCL. STEP 7 5.1, S7-SCL 5.1. Erlangen, 2001
(Hans Berger)
IV Automating with STEP 7 in STL and SCL STEP 7
STL SCL
- S7-300/400
PLC
,
,
-
4 AND (), OR (), Exclusive OR ( );
9 INT, DINT REAL
15 "" , "" ; EN/ENO
1 SIMATIC S7-300/400 PLC ( S7-300/400); ; (PROFIBUS DP); (); ;
5 , ; ;
10 INT, DINT REAL; ; /
16 , , RLO, BR, "" ;
6 - Load Transfer;
11 ; Arc-; ;
17 (MCR) MCR, MCR-, MCR-
2 - STEP 7 ; - ; ; Symbol Editor ( ); STL/ SCL; ;
7 SIMATIC ; IEC-
12 ;
18 , - ; -
13
3 S7- ; ; STL/ SCL; DB; ; - ; ()
8 SIMATIC-; / ; /; IEC-
14 Word AND (), OR (), Exclusive OR ( )
19 ; ;
Automating with STEP 7 in STL and SCL V STEP STL SCL
,
SCL
S5/S7 ,
SCL
27 , , , ,
20 ; ; ( , ; ); ; - - ; - SFC SFB
24 ; ; UDT
28 IF, CASE, FOR, WHILE, REPEAT, CONTINUE, EXIT, GOTO, RETURN
32 S5/S7- ; S5-;
21 ; ; ; ; ,
25 ; DB; ANY; ( );
29 SCL SCL; ; ; EN/ENO
33 ; ; IEC- ; S5-S7 ; TI-S7 ; -;
22 STL "", "" ; STOP, HOLD, ;
30 SCL- ; ; ; ;
34 STL ; ;
23 ; ;
26 ; ; ; "" ANY;
28 - ; STRING-; Date/TOD-;
35 SCL- ; ; ;
VI Automating with STEP 7 in STL and SCL STEP 7
STL SCL
, STL SCL. , . STL_BOOK SCL_BOOK. 2,7 1,6 ( PG). STL_BOOK , STL- . , (: [Conveyor Example]), ( [Message Frame Example]). .
STL_BOOK STL-
SFC
FB 104 4: FB 105 5: FB 106 6: FB 107 7: FB 108 8:
FB 120 20: FB 121 21: FB 122 22: FB 123 23:
(Digital) STL-
FB 109 9: FB 110 10: FB 111 11: FB 112 12: FB 113 13: FB 114 14: Word
FB 124 24: FB 125 25: FB 126 26: FB 101 FB 102 FB 103
STL-
FB 115 15: FB 116 16: FB 117 17: FB 118 18: FB 119 19: ( 3)
FC 11 FC 12 FB 20 FB 21 FB 22
UDT 51 , UDT 52 , FB 51 FB 52 FC 61 FC 62 FC 63
FC 41 FC 42 FC 43 FC 44 DOUBLE WORD FC 45 S5 REAL S7 FC 46 REAL S7 S5 FC 47 ( ANY)
Automating with STEP 7 in STL and SCL VII STEP STL SCL
SCL_BOOK SCL SCL-. , STL- : " " [Conveyor Example] [Message Frame Example], SCL_BOOK SCL-. "General Examples" (" ") SCL- , SCL STL- SCL-.
SCL_BOOK SL- ( 27)
SCL- SL- ( 30)
FC 271 OB 1 FB 271 , , FB 272
FB 301 FB 302 FB 303 FB 304 FB 305
SL- ( 28)
SL- ( 31)
FB 281 IF FB 282 CASE FB 283 FOR FB 284 WHILE FB 285 REPEAT
FB 311 FB 312 FB 313 String FB 314 Date/TOD FB 315
SCL- SL- ( 29)
F 291 FC F 292 FC FB 291 FB FB 292 FC FB F 293 FC EN/ENO FB 293 FB EN/ENO FB 294 EN/ENO
FC 61 DT_TO_STRING FC 62 DT_TO_DATE FC 63 DT_TO_TOD FB 61 FB 62 FB 63 FB 64 FIFO STL SCL
FC 11 FC 12 FB 20 FB 21 FB 22
UDT 51 , UDT 52 , FB 51 FB 52 FC 61
, , , , , . -, . STEP 7 STEP 7Mini, -, - STEP 7 (. ).
VIII Automating with STEP 7 in STL and SCL STEP 7
STL SCL
STEP 7:
, , () STEP 7. SIMATIC Manager, . . , ( Windows) , CPU. . . , , . . . : (), ; () , ( ) . , SIMATIC Manager.
Automating with STEP 7 in STL and SCL IX STEP STL SCL
SIMATIC Manager
?
-
Proect
Hardware
CPU
Hardware
(Master) DP , , (Slave) DP-
-
System Data [ ]
( )
CPU c DP Master (CPU with DP Master): PROFIBUS, DP-
(,CPU)
X Automating with STEP 7 in STL and SCL STEP 7
STL SCL
""
,
(UDT) DB
Blocks []
System Data [ ]
" "
CP
FC FB, DB
OB
Automating with STEP 7 in STL and SCL XI STEP STL SCL
,
CPU PG
(online)
XII Automating with STEP 7 in STL and SCL STEP 7
STL SCL
1-1 1 SIMATIC S7-300/400 1-3 1.1 1-3
1.1.1 1-3
1.1.2 S7-300 1-4
1.1.3 S7-400 1-6
1.1.4 CPU 1-8
1.1.5 1-10
1.1.6 1-10
1.2 I/O (/) 1-11
1.2.1 DP- 1-12
1.2.2 DP- (DP Master) 1-13
1.2.3 DP- (DP Slaves) 1-13
1.2.4 PROFIBUS-PA 1-15
1.2.5 AS- 1-16
1.2.6 1-18
1.3 (communications) 1-18
1.3.1 1-18
1.3.2 1-20
1.3.3 (communications services) 1-24
1.3.4 (connections) 1-25
1.4 1-26
1.4.1 1-26
1.4.2 1-27
1.4.3 1-27
1.4.4 1-28
1.4.5 1-29
1.5 1-29
1.5.1 1-29
1.5.2 ( ) 1-31
1.5.3 1-32
Automating with STEP 7 in STL and SCL XIII STEP 7 STL SCL
2 STEP 7 2-1 2.1 STEP 7 (STEP 7 Basic Package) 2-1
2.1.1 2-1
2.1.2 2-2
2.1.3 SIMATIC Manager 2-2
2.1.4 (Project(s) Library(ies)) 2-6
2.1.5 (Online Help ) 2-7
2.2 2-8
2.2.1 2-8
2.2.2 , 2-10
2.2.3 (Project Versions) 2-11
2.3 2-13
2.3.1 2-15
2.3.2 2-15
2.3.3 2-16
2.3.4 MPI 2-17
2.3.5 Monitor () Modify () 2-18
2.4 (Network) 2-18
2.4.1 (Network View) 2-20
2.4.2 DP- Network Configuration 2-21
2.4.3 (Connections) 2-22
2.4.4 (Network Transitions) 2-27
2.4.5 (Loading the Connection Data) 2-28
2.5 S7- 2-29
2.5.1 2-29
2.5.2 (Symbol Table) 2-30
2.5.3 STL- (STL Program Editor) 2-32
2.5.4 SCL- (SCL Program Editor) 2-37
2.5.5 (Rewiring) 2-40
2.5.6 (Address Priority) 2-41
2.5.7 (Reference Data) 2-42
2.5.8 2-44
2.6 (Online Mode) 2-46
2.6.1 PLC 2-46
2.6.2 2-47
2.6.3 CPU (CPU Information) 2-49
2.6.4 CPU 2-49
XIV Automating with STEP 7 in STL and SCL STEP 7
STL SCL
2.6.5 (Block Handling) 2-50
2.7 2-52
2.7.1 2-53
2.7.2 STOP 2-53
2.7.3 (Monitoring and Modifying Variables) 2-54
2.7.4 (Forcing Variables) 2-56
2.7.5 ( Enable peripheral outputs) 2-59
2.7.6 "Program Status" (" ") STL 2-60
2.7.7 SCL- 2-62
3 SIMATIC S7- 3-1 3.1 3-1
3.1.1 3-1
3.1.2 3-3
3.1.3 3-4
3.2 3-5
3.2.1 (Block Types) 3-6
3.2.2 (Block Structure) 3-8
3.2.3 (Block Properties) 3-8
3.2.4 (Block Interface) 3-13
3.3 (Addressing Variables) 3-15
3.3.1 3-16
3.3.2 3-18
3.3.3 3-18
3.4 STL 3-20
3.4.1 STL- 3-20
3.4.2 STL 3-21
3.4.3 STL, 3-24
3.5 SCL 3-28
3.5.1 SCL- 3-28
3.5.2 SCL- 3-30
3.6 3-35
3.6.1 3-35
3.6.2 , 3-37
Automating with STEP 7 in STL and SCL XV STEP 7 STL SCL
3.7 3-39
3.7.1 3-39
3.7.2 3-41
3.7.3 3-41
3.7.4 3-42
3.7.5 3-45
4-1 4 4-3 4.1 4-3
4.2 4-7
4.2.1 AND () 4-8
4.2.2 OR () 4-10
4.2.3 Exclusive OR ( ) 4-10
4.2.4 , 4-11
4.3 4-13
4.4 4-14
4.4.1 ( ) 4-14
4.4.2 AND- () OR () 4-16
4.4.3 OR () Exclusive OR ( ) AND () 4-17
4.4.4 AND () Exclusive OR ( ) 4-18
4.4.5 OR () Exclusive OR ( ) 4-18
4.4.6 4-19
5 (memory functions) 5-1 5.1 Assign () 5-1
5.2 Set ( ) Reset ( ) 5-3
5.3 RS Flipflop (RS-) 5-4
5.3.1 Reset ( ) 5-4
5.3.2 Set ( ) 5-5
5.3.3 5-5
5.4 Edge Evaluation ( ) 5-7
5.4.1 5-8
XVI Automating with STEP 7 in STL and SCL STEP 7
STL SCL
5.4.2 5-10
5.4.3 5-10
5.4.4 5-12
5.4.5 (Binary Scaler) 5-12
5.5 5-14
6 (move functions) 6-1 6.1 6-1
6.2 Load ( ) 6-4
6.2.1 Load 6-4
6.2.2 6-6
6.2.3 6-7
6.3 Transfer ( ) 6-7
6.3.1 Transfer 6-7
6.3.2 6-8
6.4 (Accumulator Functions) 6-9
6.4.1 6-10
6.5 accumulator 1 6-12
6.6 6-12
6.6.1 6-13
6.6.2 6-14
6.6.3 6-15
6.6.4 STRING 6-16
7 (timer functions) 7-1 7.1 7-2
7.1.1 7-2
7.1.2 7-2
7.1.3 (Resetting a timer) 7-4
7.1.4 (Enabling a timer) 7-5
7.1.5 () (Checking a timer) 7-5
7.1.6 7-7
7.1.7 ( ) 7-8
7.2 (Pulse timer) 7-8
7.3 (Extended pulse timer) 7-12
7.4 (On-delay timer) 7-15
7.5 (Retentive On-delay timer) 7-19
7.6 (Off-delay timer) 7-23
Automating with STEP 7 in STL and SCL XVII STEP 7 STL SCL
7.7 IEC- (IEC Timer Functions) 7-26
7.7.1 SFB 3 TP 7-28
7.7.2 SFB 4 TON 7-28
7.7.3 SFB 5 TOF 7-29
8 (ounter functions) 8-1 8.1 8-2
8.2 (Counting) 8-3
8.3 () (Checking a Counter) 8-4
8.4 (Enabling a counter) 8-5
8.5 8-8
8.6 IEC- (IEC Counter Functions) 8-9
8.6.1 SFB 0 CTU 8-10
8.6.2 SFB 1 CTD 8-11
8.6.3 SFB 2 CTUD 8-11
8.7 8-12
9-1 9 9-3 9.1 9-4
9.2 9-5
9.3 9-8
10 10-1 10.1 10-2
10.2 INT 10-3
10.3 DINT 10-5
10.4 REAL 10-6
10.5 10-8
10.6 Accumulator 1 10-10
10.7 10-11
11 11-1 11.1 11-1
11.2 11-2
11.3 (Arc-) 11-3
11.4 11-4
XVIII Automating with STEP 7 in STL and SCL STEP 7
STL SCL
12 12-1 12.1 12-2
12.2 INT DINT 12-3
12.3 BCD 12-4
12.4 REAL 12-5
12.5 12-7
13 13-1 13.1 13-2
13.2 13-4
13.3 13-7
14 (Word Logic) 14-1 14.1 14-1
14.2 14-4
15-1 15 (Status Bits) 15-3 15.1 15-3
15.2 15-7
15.3 15-10
15.4 ( BR) 15-12
16 16-1 16.1 16-2
16.2 16-3
16.3 RLO BR 16-3
16.4 CC0 CC1 16-5
16.5 OV OS 16-8
16.6 (Jump Distributor) 16-9
16.7 (Loop Jump) 16-10
17 MCR 17-1 17.1 MCR- (MCR Dependency) 17-2
17.2 MCR- (MCR Area) 17-3
17.3 MCR- (MCR Zone) 17-4
17.4 (I/O ) 17-6
Automating with STEP 7 in STL and SCL XIX STEP 7 STL SCL
18 (Block Functions) 18-1 18.1 18-1
18.1.1 : 18-2
18.1.2 CALL 18-3
18.1.3 UC CC 18-4
18.1.4 (Block End Functions) 18-6
18.1.5 18-6
18.1.6 18-10
18.2 18-14
18.2.1 18-15
18.2.2 18-16
18.2.3 18-19
18.2.4 18-20
18.2.5 18-21
18.2.6 , 18-21
18.3 18-24
18.3.1 18-25
18.3.2 18-25
18.3.3 18-25
18.4 Null- (-) 18-26
18.4.1 NOP 18-26
18.4.2 BLD 18-26
19 19-1 19-1 : 19-1
19-1.1 19-1
19-1.2 19-1
19-1.3 (declaration) 19-2
19-1.4 (declaration) 19-5
19-1.5 (Initialization) 19-6
19-2 19-6
19-3 19-11
19-4 ("Pass On") 19-16
19-5 19-17
19.5.1 : 19-17
19.5.2 : 19-19
19.5.3 : 19-20
XX Automating with STEP 7 in STL and SCL STEP 7
STL SCL
20-1 20 (main program) 20-3 20.1 20-3
20.1.1 20-3
20.1.2 20-5
20.2 20-8
20.2.1 20-8
20.2.2 20-10
20.2.3 ("background scanning") 20-12
20.2.4 ("Response Time") 20-14
20.2.5 ("Start Information") 20-15
20.3 (Program Functions) 20-17
20.3.1 (Real-Time Clock) 20-17
20.3.2 (System Clock) 20-18
20.3.3 (Run-Time Meter) 20-19
20.3.4 CPU (Compressing CPU Memory) 20-20
20.3.5 20-21
20.3.6 20-21
20.4 (ommunications) I/O 20-22
20.4.1 (I/O) 20-24
20.4.2 (I/O) 20-30
20.4.3 (I/O) 20-45
20.5 20-49
20.5.1 20-49
20.5.2 GD- 20-53
20.5.3 GD- 20-56
20.6 SFC- 20-57
20.6.1 (Station-Internal) SFC- 20-57
20.6.2 20-59
20.6.3 (Station-External) SFC- 20-61
20.6.4 ("" SFC) 20-63
20.7 SFB- 20-67
20.7.1 20-67
20.7.2 (Two-way Data Exchange) 20-70
20.7.3 (One-way Data Exchange) 20-73
Automating with STEP 7 in STL and SCL XXI STEP 7 STL SCL
20.7.4 (Print Data) 20-74
20.7.5 (Control Functions) 20-75
20.7.6 (Monitoring Functions) 20-77
21 21-1 21.1 21-1
21.2 (Hardware Interrupts) 21-4
21.2.1 21-4
21.2.2 21-5
21.2.3 STEP 7 21-6
21.3 (watchdog Interrupts) 21-6
21.3.1 (watchdog Interrupts) 21-7
21.3.2 (watchdog Interrupts) STEP 7 21-9
21.4. (time-of-day interrupts) 21-10
21.4.1 (time-of-day interrupts) 21-10
21.4.2 (time-of-day interrupts) STEP 7 21-12
21.4.3 (time-of-day interrupts) 21-13
21.5. c (time-delay interrupts) 21-15
21.5.1 c (time-delay interrupts) 21-15
21.5.2 c (time-delay interrupts) STEP 7 21-17
21.5.3 c (time-delay interrupts) 21-17
21.6 21-19
21.7 21-21
22 22-1 22.1 22-1
22.1.1 22-1
22.1.2 HOLD () 22-2
22.1.3 (disable) 22-3
22.1.4 22-4
22.2 (Power-Up) 22-5
22.2.1 STOP () 22-5
22.2.2 (Memory Reset) 22-6
22.2.3 (Retentivity) 22-6
XXII Automating with STEP 7 in STL and SCL STEP 7
STL SCL
22.2.4 22-7
22.3 22-8
22.3.1 (START-UP) 22-8
22.3.2 "" (Cold Restart) 22-9
22.3.3 "" (Complete Restart) 22-11
22.3.4 "" (Warm Restart) 22-12
22.4 22-13
22.5 22-15
23 23-1 23.1 23-2
23.2 23-3
23.2.1 23-3
23.2.2 23-6
23.2.3 23-6
23.2.4 23-7
23.2.5 "" ( - Substitute Value) 23-7
23.3 23-8
23.4 23-12
23.4.1 23-12
23.4.2 23-13
23.4.3 23-14
23.4.4 23-15
24-1 24 24-3 24.1 24-3
24.1.1 24-3
24.1.2 BOOL, BYTE, WORD, DWORD, CHAR 24-4
24.1.3 24-6
24.1.4 24-9
24.2 24-11
24.2.1 DATA_AND_TIME 24-12
24.2.2 STRING 24-13
24.2.3 ARRAY 24-15
24.2.4 STRUCT 24-17
24.3 24-20
Automating with STEP 7 in STL and SCL XXIII STEP 7 STL SCL
24.3.1 , (UDT) 24-20
24.3.2 UDT 24-21
25 25-1 25.1 25-1
25.1.1 (area pointers) 25-2
25.1.2 DB (DB pointers) 25-2
25.1.3 ANY- (ANY pointer) 25-4
25.2 STL 25-5
25.2.1 25-6
25.2.2 (Indirect Addresses) 25-7
25.2.3 (memory-indirect addressing) 25-8
25.2.4 (Register-Indirect Area-Internal Addressing) 25-10
25.2.5 (Register-Indirect Area-Crossing Addressing) 25-11
25.2.6 25-12
25.3 25-13
25.3.1 25-14
25.3.2 25-15
25.3.3 25-15
25.3.4 25-16
25.4 25-18
25.4.1 AR1 25-18
25.4.2 AR2 25-18
25.4.3 25-20
26 26-1 26.1 26-1
26.2 26-4
26.2.1 26-4
26.2.2 26-6
26.2.3 26-6
26.3 26-8
26.3.1 26-8
26.3.2 26-11
26.3.3 "" ANY- (ANY-pointer) 26-13
XXIV Automating with STEP 7 in STL and SCL STEP 7
STL SCL
26.4 "Message Frame Example" ( ) 26-16
SCL 27-1 27 . 27-3 27.1 SIMATIC 27-3
27.1.1 () 27-3
27.1.2 27-4
27.1.3 SCL- 27-4
27.1.4 (Symbol Table) 27-5
27.1.5 SCL- 27-7
27.1.6 SCL- 27-7
27.1.7 SCL- 27-7
27.1.8 27-8
27.1.9 (Data Type Veiws) 27-10
27.2 27-12
27.2.1 27-12
27.2.2 27-13
27.2.3 SCL 27-13
27.3 27-15
27.4 27-16
27.4.1 27-17
27.4.2 27-17
27.4.3 27-19
27.5 27-20
27.5.1 27-20
27.5.2 DT STRING 27-20
27.5.3 27-21
27.5.4 27-21
28 (Control Statements) 28.1 28.1 IF 28.1
28.2 CASE 28.3
28.3 FOR 28.4
28.4 WHILE 28.5
28.5 REPEAT 28.6
28.6 CONTINUE 28.7
28.7 EXIT 28.8
Automating with STEP 7 in STL and SCL XXV STEP 7 STL SCL
28.8 RETURN 28.8
28.9 GOTO 28.9
29 SCL- 29-1 29.1 SCL-: 29-1
29.2 SCL- 29-2
29.2.1 FC 29-3
29.2.2 FC 29-3
29.2.3 FB 29-4
29.2.4 29-5
29.2.5 29-7
29.2.6 29-8
29.2.7 29-9
29.3 SCL- 29-10
29.3.1 FC 29-11
29.3.2 FC 29-11
29.3.3 29-12
29.3.4 29-13
29.3.5 29-14
29.4 EN/ENO 29-15
29.4.1 - 29-15
29.4.2 ENO (ENO output) 29-16
29.4.3 EN (EN input) 29-17
30. SCL- 30-1 30.1 30-1
30.2 30-2
30.3 30-4
30.4 (Shifting) (Rotating) 30-5
30.5 (Conversion Functions) 30-6
30.5.1 (Implicit Conversion Functions) 30-7
30.5.2 (Explicit Conversion Functions) 30-8
30.6 SCL 30-8
30.7 STL 30-13
30.8 SCL 30-15
30.8.1 "Conveyor" ("") 30-15
30.8.2 30-16
30.8.3 30-16
XXVI Automating with STEP 7 in STL and SCL STEP 7
STL SCL
31 IEC- 31-1 31.1 (Conversion Functions) 31-2 31.2 (Comparison Functions) 31-4 31.3 STRING (STRING Functions) 31-8 31.4 Date/Time-of-Day
(Date/Time-of-Day Functions) 31-11
31.5 (Numerical Functions) 31-14
32-1 32 S5/S7- 32-3 32.1 32-3
32.2 32-5
32.2.1 (PLC) 32-5
32.2.2 32-6
32.2.3 32-8
32.2.4 32-10
32.3 32-11
32.3.1 32-11
32.3.2 32-13
32.3.3 32-13
32.3.4 32-14
32.4 32-17
32.4.1 STEP 7 32-17
32.4.2 32-18
32.4.3 32-19
32.4.4 32-19
32.4.5 " " 32-21
32.4.6 32-21
32.4.7 32-23
32.4.8 32-23
32.4.9 32-23
33 33-1 33.1 () 33-1
33.2 (SFB) 33-3
33.3 IEC- 33-9
33.4 S5-S7- 33-11
33.5 TI-S7- 33-15
Automating with STEP 7 in STL and SCL XXVII STEP 7 STL SCL
33.6 - 33-16
33.7 33-16
34 STL- 34-1 34.1 34-2
34.1.1 34-2
34.1.2 34-3
34.1.3 34-3
34.1.4 34-4
34.1.5 34-5
34.2 34-5
34.2.1 34-5
34.2.2 34-5
34.2.3 34-6
34.2.4 34-6
34.2.5 34-7
34.2.6 34-7
34.3 34-8
34.3.1 34-8
34.3.2 MCR 34-9
34.3.3 34-9
34.4 34-10
35 SCL- 35-1 35.1 35-1
35.2 35-2
35.3 35-2
35.4 CSL 35-3
35.4.1 35-3
35.4.2 35-4
35.4.3 35-5
35.4.4 35-6
35.4.5 35-7
36-1
37-1
STEP 7 38-1
Automating with STEP 7 in STL and SCL 1- 1 STEP 7 STL SCL
SIMATIC S7-300/400. SIMATIC S7-300/400 . , , ( CPU) . SIMATIC S7 / (I/O) . CPU, , . (load memory) : , ( ), (work memory), , . STEP 7 S7-300/400. , SIMATIC Manager. SIMATIC Manager , Windows 95/98/NT , . SIMATIC Manager , , , . , STEP 7. SIMATIC S7 , , , , . . STEP 7 , (BOOL), (INT REAL) , ( ).
1- 2 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
S7-300/400. STEP 7 . STEP 7 5.1. 3 " SIMATIC S7" S7- STL SCL. STL SCL . . 1 SIMATIC S7-300/400 ; (I/O); ; ; . 2 STEP 7 SIMATIC Manager; ; ; ; ( , ); ; . 3 SIMATIC S7 ; ; ; STL SCL; ; ( ).
1. SIMATIC S7-300/400
Automating with STEP 7 in STL and SCL 1- 3 STEP 7 STL SCL
1 SIMATIC S7-300/400
1.1 1.1.1
SIMATIC S7-300/400 : (Rack): .
(PS "power supply"): . (CPU "central processing unit"): .
(IM "interface module"): . (SM "signal module"): , , .
(FM "function module"): CPU, .
(CP "communication processor"): . : .
( ) , . , CPU I/O ( SM, FM CP) . I/O I/O , , (. . 1). / (. 1.2, " I/O").
1. SIMATIC S7-300/400
1- 4 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
: / (I/O P-) ( K-). I/O- , . CPU (MPI) .
1.1.2 S7-300
S7-300 8 / . , CPU 314 : , ( IM 365 );
, 4 , .. , 3 ( IM 360 IM 361 ).
. , 1.2 ( CPU 312 IFM 0.8 ). , P- K-.
FM 356 M7-300. FM-356 "" , " " . , .
SIMATIC SIMATIC S7-300 . : (-25+60), , IEC 68 2-6; , IEC 721-3-3 Class 3 K5, / EN 50155 ( ). .
1. SIMATIC S7-300/400
Automating with STEP 7 in STL and SCL 1- 5 STEP 7 STL SCL
. 1.1 S7-300/400
S7-400
S7-300
: IM 460-1 IM 460-0 IM 460-3 IM 463-2
5 ; : 1.5 (IM 461-1)
5 ; : 3 (IM 461-0)
5 ; : 100 (IM 461-3)
S5-; : 600 (IM 314)
1. SIMATIC S7-300/400
1- 6 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
1.1.3 S7-400
S7-400 : 18 9 ( UR1 UR2), CPU, ( ). IM 460-1 IM 461-1 5- 1.5 . , IM 460-0 IM 461-0 4 3 . , IM 460-3 IM 461-3 4 100 . 21 . . P- K-. ER1 ER2 ( 18 9 ) "" , , 24- P-, K-. K- UR1, UR2 CR2 , 1 6.
CR2. CR2 . CPU , P- , K-.
S7-400 ( ) CPU. CPU ( ). 20.3.6 " " 21.6 " ".
1. SIMATIC S7-300/400
Automating with STEP 7 in STL and SCL 1- 7 STEP 7 STL SCL
SIMATIC S5 IM 463-2 S7-400 SIMATIC S5 (EG 183U, EG 185U, EG 186U, ER 701-2 ER 701-3), . IM 314 SIMATIC S5 . , . S7-400 IM 463-2; IM 463-2, , S5 .
SIMATIC S7-300/400, , . " ", , . , , "" . , , . / (I/O) (ET 200M IM 153-3 PROFIBUS-DP). () ("Software Redundancy").
SIMATIC S7-400H
SIMATIC S7-400H , , H CPU - . " "; . / (, ) ( ET 200M). . , ; . () "S7-400H".
1. SIMATIC S7-300/400
1- 8 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
1.1.4 CPU
1.2 CPU, . , (load memory) (work memory).
(load memory) CPU . , , (load memory) . (work memory) CPU RAM-. : . "" , , , .
. 1.2 CPU
(offline)
(offline)
( )
( )
()
I/O
-
CPU S7-400 ()
(CPU)
1. SIMATIC S7-300/400
Automating with STEP 7 in STL and SCL 1- 9 STEP 7 STL SCL
, , (load memory). CPU "" (. ) (work memory). CPU, (load memory) (work memory) ( . 2.6.4 " CPU" 2.6.5 " "). (load memory) RAM-, , CPU. (load memory) EEPROM- EPROM -, CPU . (load memory) CPU 3xxIFM RAM EEPROM . RAM- , EEPROM-, . (load memory) CPU S7-300 ( CPU 318) RAM-, . EPROM - , . CPU S7-300 ( ) (, , ) . . RAM- CPU S7-400 . , (load memory), RAM- . EPROM - . CPU S7-400 (work memory) . STEP 7 V5.1, CPU S7-400, (load memory) CPU (. 2.2.2 ", ").
1. SIMATIC S7-300/400
1- 10 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
1.1.5
: RAM- EPROM -. (load memory), RAM- (, CPU S7-400). RAM- . , RAM- . - , , EPROM -. , EPROM - . CPU , EPROM - CPU.
1.1.6
(), . ( ), , CPU, . , , , , , () . CPU : (I): " " .
(Q): " " .
(M): , .
(): , .
(): .
1. SIMATIC S7-300/400
Automating with STEP 7 in STL and SCL 1- 11 STEP 7 STL SCL
(L) . L-, CPU .
, , , . . ( ). , , S7-400 .
1.2 I/O (/)
PROFIBUS-DP " " . " " " DP-" (DP-master), " DP-" (DP-slave). / (I/O) , PROFIBUS-DP PROFIBUS. PROFIBUS-DP EN 50170 DP-. 1.3.2 "". DP- DP- " DP-" (DP-master system). 32 127 . DP- , DP-. PROFIBUS-DP , , , - , ET 200 DP- SIMATIC S5.
1. SIMATIC S7-300/400
1- 12 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
1.2.1 DP- DP- (mono master system)
PROFIBUS-DP DP- ("mono master system"); DP- DP-. DP- , , . DP- DP- " DP-" ("DP-master system") (. . 1.3).
. 1.3 DP- (DP-master system)
S7- DP-, ,CPU 318-2DP
, , ET 200B
, , ET 200M
, , CPU 315-2DP
DP/PA (DP/PA link)
DP/RS232C (link) DP/PA (DP/PA coupler)
PROFIBUS-PA
PROFIBUS-PA
DP/AS- (DP/AS-Interface link)
AS-
PROFIBUS-DP
1. SIMATIC S7-300/400
Automating with STEP 7 in STL and SCL 1- 13 STEP 7 STL SCL
DP- (multi master system) PROFIBUS-DP DP- ("multi master system"). , DP-; , , DP- "" DP-, DP- "" DP- . .
DP-
, DP- DP-. S7- DP-, DP- . CPU " DP-".
1.2.2 DP- (DP Master)
DP- (DP Master) PROFIBUS. "" DP-. DP- : CPU DP- (, CPU 315-2DP, CPU 417).
CPU (, IM 467). CP CPU (, CP 342-
5, CP 443-5). " DP- 1 ", , " DP- 2 ", (, ).
1.2.3 DP- (DP Slaves)
DP- (DP Slaves) PROFIBUS. SIMATIC S7 DP-: , DP-.
, (). , .
1. SIMATIC S7-300/400
1- 14 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
PROFIBUS DP- DP- : ET 200B ( / / , IP 20 , 12 /); ET 200C ( , IP 66/67, / / , , 1,5 / 12 /); ET 200L-SC (- / / , IP 20 , 1,5 /); , DP/AS-I (DP/AS-I Link), DP- PROFIBUS-DP.
PROFIBUS DP-
DP- ET 200M. S7-300, DIN, , IM 153 CPU 8 (SM) (FM). 9,6 / 12 /). ET 200M , DP- S7-400. , / S7-300 , . . , .. . ET 200M IM 153-3 DP- . IM 153-3 : - DP- () - DP- .
PROFIBUS DP- () DP- S7-300, CPU DP-, (slave) ( , CPU 315-2DP), S7-300 CP 342-5 (slave) .
1. SIMATIC S7-300/400
Automating with STEP 7 in STL and SCL 1- 15 STEP 7 STL SCL
DP- ET 200X BM 147/CPU. 7 . "" "" BM 147/CPU, S7- . / / , (load feeders), 400 5,5 . 9,6 / 12 /.
1.2.4 PROFIBUS-PA PROFIBUS-PA
PROFIBUS-PA ("Process Automation" [ ]) ( Ex-, , , ), (, ). PROFIBUS-PA EN 50170, 2 (PROFIBUS-DPA); IEC 1158-2. PROFIBUS-DP PROFIBUS-PA: DP/PA (DP/PA coupler), ,
PROFIBUS-DP , 45,45 /.
DP/PA (DP/PA link), PROFIBUS-DP PROFIBUS-PA.
DP/PA (DP/PA coupler)
DP/PA (DP/PA coupler) PA- PROFIBUS-DP. PROFIBUS-DP DP/PA DP- , 45,45 /. DP/PA 31 PA- . "" PROFIBUS-PA , 31,25 /. PROFIBUS-PA PROFIBUS-PA (shared). DP/PA : DP/PA -Ex 400 DP/PA Ex 100 .
1. SIMATIC S7-300/400
1- 16 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
DP/PA (DP/PA link) DP/PA (DP/PA link) PA- PROFIBUS-DP 9,6 / 12 /. DP/PA IM 157 5 DP/-, () SIMATIC S7. , PROFIBUS-PA, PROFIBUS-PD . DP/PA 31 PA- .
SIMATIC DPM
SIMATIC DPM (Process Device Manager [ ], : "SIPROM") , , , PROFIBUS-PA HART (Highway Addressable Remote Transducers [ -]). - DDL (Device Description Language [ ]). SIMATIC DPM "" , Windows 9x/NT, STEP 7.
1.2.5 AS- AS-
AS- ("Actuator-Sensor Interface" ("AS-i") [ -]) . AS-i , 31 AS-i. AS-i-, , . AS-i AS-i , 8 ("normal" - "") . AS-i 100 , ( AS-i ) ( AS-i , AS-i).
1. SIMATIC S7-300/400
Automating with STEP 7 in STL and SCL 1- 17 STEP 7 STL SCL
AS-i (AS-i master) AS-i (AS-i master) AS-i , 5 . AS-i SIMATIC S7 CP 342-2 PROFIBUS-DP DP/AS- (. . 1.4).
. 1.4 SIMATIC S7 AS-i CP 342-2 AS-i S7-300 ET 200M. : CP 342-2 / . 16 16 ( 256). AS-i CP, . AS-i. FC, ( , / , ). DP/AS- (DP/AS-Interface link) AS-i AS-i PROFIBUS-DP. PROFIBUS-DP DP-, AS- AS-i , 31 AS-i . AS-i DP/AS- 16 16 . - 12 /.
S7-300 P 342-2 PROFIBUS-DP
AS- :
DP/AS- (DP/AS-Interface link)
DP/AS-i
DP/AS-i (DP/AS-i distributor)
DP/AS-i
DP/AS-i
DP/AS-i
DP/AS-i
DP/AS-i
8 /
4
AS-i ASIC
AS-i ASIC
1. SIMATIC S7-300/400
1- 18 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
DP/AS- : ( 65) IP 66/67 ( 20) IP 20 , 20 .
1.2.6
PROFIBUS-DP/RS 232C (PROFIBUS-DP/RS 232C link) RS 232C (V.24) PROFIBUS-DP. DP/RS 232C RS 232C PROFIBUS-DP. DP/RS 232C 3964R ASCII. DP/RS 232C " ". . 224 . PROFIBUS-DP 12 /; RS 232C 38,4 / , , 8 1 -.
1.3 (ommunications)
- SIMATIC S7. . - CPU. CP ( SIEMENS) . SIMATIC NET - , SIMATIC. SIMATIC NET , HMI (- ). SIMATIC .
1.3.1
1.5 . SIMATIC ( SIEMENS) . . SIMATIC S7 CPU MPI , . , (CP), .
1. SIMATIC S7-300/400
Automating with STEP 7 in STL and SCL 1- 19 STEP 7 STL SCL
. - ( ). "" (" "), (""). , S7- S7- .
. 1.5 SIMATIC S7
- . , .
, , ; , . SIMATIC : MPI, PROFIBUS, Industrial Ethernet PTP ("point-to-point" [ " "]).
(communications service) (communications service) , , . , .
CPU ID -
SFB ID
SD
DB
--
-
-
CPU ID -
SFB ID
RD
DB
--
-
SIMATIC S7 SIMATIC S7
(Subnet)
1. SIMATIC S7-300/400
1- 20 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
SIMATIC : S7, PROFIBUS-DP, PROFIBUS-FMS, PROFIBUS-FDL (SDA), ISO transport, ISO-on-TSP .
(connection) ( ). ( ) , , , (, ) . SIMATIC : S7- , S7- (), "point-to-point" [ " "], FMS- FDL-, "ISO transport"-, "ISO-on-TSP"- TSP-, UDP- E-mail-.
(communications functions) . SIMATIC S7 CPU . ( Siemens) .
1.1 , .
1.3.2 - . SIMATIC Manager. : MPI SIMATIC .
PROFIBUS ; /.
Industrial Ethernet PLC .
PTP (" ") .
1. SIMATIC S7-300/400
Automating with STEP 7 in STL and SCL 1- 21 STEP 7 STL SCL
1.1 ,
(GD) GD- SFC
SFC MPI CPU
SFB ( S7-400)
, SFB
PROFIBUS-DP ( )
, / , SFC
CPU DP-
SFC SFC PROFIBUS-DP ( )
, / , SFC
IM 467
SFC SFC PROFIBUS-FDL, PROFIBUS-DP ( )
NCM, , SEND / RECEIVE
SFC SFC
CP 342-5 CP 443-5 Extended ()
SFB ( S7-400)
, SFB
PROFIBUS-FMS, PROFIBUS-FDL
NCM, FMS- , SEND / RECEIVE
SFC SFC
PROFIBUS
CP 343-5 CP 443-5 Basic ()
SFB ( S7-400)
, SFB
ISO TCP / IP
NCM, , SEND / RECEIVE
CP 343-1 CP 443-1
SFB ( S7-400)
, SFB
ISO TCP / IP IT-
NCM, , SEND / RECEIVE
Industrial Ethernet
CP 343-1 IT CP 443-1 IT
SFB ( S7-400)
, SFB
NCM - CP; NCM PROFIBUS Industrial Ethernet.
STEP 7 V.5 SIMATIC S7 , , , . () S7 .
MPI CPU ("multipoint interface", MPI [" "]). CPU, PG, HMI (- ) Siemens.
1. SIMATIC S7-300/400
1- 22 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
MPI : " " - . 50 . 1100 RS485 100 (optical link modul). 187,5 /. 32 . . ( "token passing" [ ""]). MPI CPU : , SFC SFB. .
PROFIBUS PROFIBUS ("PROcess FIeldBUS") " ". PROFIBUS , EN 50170, . PROFIBUS : " " - . ; 100 (12 /) 1000 (9,6 /). (optical link modul). 127 . . . ( "token passing" [ ""]). (slaves) (master), , . . PROFIBUS; PROFIBUS-DP. CPU DP- . PROFIBUS SFC SFB. CP PROFIBUS-FMS PROFIBUS-FDL. (FMS- SEND/RESEIVE-).
1. SIMATIC S7-300/400
Automating with STEP 7 in STL and SCL 1- 23 STEP 7 STL SCL
Industrial Ethernet Industrial Ethernet - IEEE 802.3. Industrial Ethernet , " " ("industrial") - . 1,5 , 4,5 . 10 /. Industrial Ethernet 1000 . , , , . , , , , ( "CSMA/CD"). . Industrial Ethernet : S7- SFB. Industrial Ethernet CP, ISO transport ISO-on-TCP, SEND/RESEIVE.
Point-to-point " " ("Point-to-point", PTP) . "point-to-point" SIMATIC Manager. . RS 232C (V.24), 20 (TTY) RS 422/485. 20 300 / 19,2 /, RS 232C RS 422/485 - 76,8 /. ; 10 RS 232C, 1000 20 9,6 / 1200 RS 422/485 19,2 /. 3964 (R), RK 512, ASCII (), . .
AS- AS- ("AS-Interface", AS-i) IEC TG 178 AS- c . AS- SIMATIC Manager; AS-i (AS-I master) .
1. SIMATIC S7-300/400
1- 24 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
AS-Interface " ", ( ). 300 . 167 /. AS-I (master) 31 (slave) .
1.3.3 (communications services) , . , : S7- - SIMATIC. S7- CPU, () , HMI . : (PG): , ; PG , , "monitor variables" .
- (HMI): (OP), , / .
SFB- (SFB-communications): ; SFB ; , .
SFC- (SFC-communications): 76 ; SFC ; , .
S7- MPI, PROFIBUS Industrial Ethernet. (Global data communications) CPU . . "" ( ); . . MPI- -.
1. SIMATIC S7-300/400
Automating with STEP 7 in STL and SCL 1- 25 STEP 7 STL SCL
PROFIBUS-DP . " " EN 50170 2. , SIMATIC S7 PROFIBUS. PROFIBUS-FMS (Fieldbus Message Specification [" "]) (FMS-) EN 50170 2. PROFIBUS. PROFIBUS-FDL (Fieldbus Data Link [" "]) SDA (Send Data with Acknowledge [" "]) EN 50170 2. . PROFIBUS , , SIMATIC S5. ISO transport ISO 8073 Class 4. . ISO transport , , SIMATIC S5 Industrial Ethernet. ISO-on-TSP TCP/IP RFC 1006. Industrial Ethernet.
1.3.4 (connections) - . ; ("Communications via non-configured connections" - " "). . (connection table). ("Communications via configured connections"- " "). . "Connection type" (" ") (. 2.4 " "). (GD) PROFIBUS-DP SFC- (SFC-communications) S7-. GD GD; PROFIBUS-DP SFC- .
1. SIMATIC S7-300/400
1- 26 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
(Connection resources) - "" CP. , , S7 MPI- CPU, CPU; MPI- CP () CP CPU. CPU . PG ( ). " " (SFC-).
1.4 1.4.1
PLC (. . 1.6).
n n+1
0 7 0 7
I/O 4 5
0 7 0 7
4 5
0 1 2 3 4 5 6 7
+HP01 -S10
I 5 DI 16 4
"Switch motor on"
BOOL I 5.2
A "Switch motor on" / A I 5.2 /
1. SIMATIC S7-300/400
Automating with STEP 7 in STL and SCL 1- 27 STEP 7 STL SCL
, , +HP01-S10, ("Switch motor on" - " "), , . "", I/O- (, 5, 2). CPU " ", ("input") (, I 5.2). "I 5.2" . - , (, "Switch motor on"). "Switch motor on" .
1.4.2
( S7-). . (" "). , . , . , I/O " ", DP- . "Hardware Configuration" , S7-, . (. 2.3 " ").
1.4.3
, , , ( I/O-). / 0 , , CPU. , / (S7-). . (" "). () 8 (.. ). 0, 1, 2 3; . , 8 8, 9, 10 11 .
1. SIMATIC S7-300/400
1- 28 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
( ), "" ("channel"), 2 . , 2, 4, 8 16 , 4, 8, 16 32 . ( ) CPU , , . ( ) 0. . S7-3xx DP-, S7-318 S7-400 . . . , () I/O-. I/O . DP- , ( ) . DP- I/O , SFC 14 DPRD_DAT SFC 15 DPWR_DAT. , "Input" ("") "Output" (""). , FM CP .
1.4.4
, . ( ), . , , , , , , . I/O . 0; ( ), CPU . STEP 7 , I/O.
1. SIMATIC S7-300/400
Automating with STEP 7 in STL and SCL 1- 29 STEP 7 STL SCL
. ; (. 20.4.1 " ").
1.4.5 ,
DP- (, DP- ) PROFIBUS , .
MPI- , MPI- (, CPU, FM CP), MPI-. PG, HMI- . , S7-300 FM CP, , MPI-, MPI- CPU. CPU 318 MPI- , MPI-. .
1.5 : ; ; ; (. 7 " " 8
" "); L- ( 18.1.5 " "). ( ) , .
1.5.1
SIMATIC S7 : , LOAD TRANSFER .
1. SIMATIC S7-300/400
1- 30 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
, , I/O. () . . / . , , (). . , 1, 2, 4 . 0. 0 ; . I/O , PI- ("peripheral inputs") ( ) PQ- ("peripheral outputs") ( ). , CPU .
. PI- . 0- I/O, CPU. (Direct I/O Read) , (, ). , , . . , , . , .
. PQ- . 0- I/O, CPU. (Direct I/O Write) , (, ).
1. SIMATIC S7-300/400
Automating with STEP 7 in STL and SCL 1- 31 STEP 7 STL SCL
, , . . , (!), , .
1.5.2 ( ) ( ) , , . (I), (Q). , . , , . 20.2.1 " ". S7-300 CPU , 1998 ., S7-400 CPU , , , . , . CPU, , CPU 417, . , , , (work) . CPU (work) , .
- . - , . CPU . : (I/O ).
, (, - I/O , , , ). , .
( ). .
1. SIMATIC S7-300/400
1- 32 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
, , , RAM-. , . , . .
(. 20.2.4 " ").
- . - , . CPU . : ( I/O ).
, (, - I/O , , , ). , .
. .
, , , RAM-, , . .
. 20.2.4 " " , .
1.5.3
" " . . . CPU, , , . CPU. , , . : , , .
, , .
1. SIMATIC S7-300/400
Automating with STEP 7 in STL and SCL 1- 33 STEP 7 STL SCL
, , . 0- . CPU. 22.2.3 "".
. ( ), (watchdog) ( ) . - , /, 1:1. , , (. .1.7). CPU. , . .1.7
0
10
1
5 ( [flickering light])
2
2,5 ( [fast flashing light])
3
2
4
1,25 ( [flashing light])
5
1
6
0,625 ( [slow flashing light])
7
0,5
1. SIMATIC S7-300/400
1- 34 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
Automating with STEP 7 in STL and SCL 2- 1 STEP 7 STL SCL
2 STEP 7
2.1 STEP 7 (STEP 7 Basic Package)
STEP 7 (STEP 7 Basic Package) 5.1. , , . STEP 7 (STEP 7 Basic Package) : STL ("statement list" - ), LAD ("ladder diagram" - ), FBD ("function block diagram" - ). S7-SCL ("Structured Control Language" ), S7-GRAPH ( SIMATIC ), S7-HiGraph ( SIMATIC ).
2.1.1
STEP 7 V 5 32- , : Microsoft Windows 95 ( Service Pack 1, 4.00.950), Windows 98 Windows NT ( Service Pack 2, 4.00.1381). STEP 7 Windows 95/98 (PG) () 80486 32 ( : Pentium 64 ). Windows NT Pentium 32 ; STEP 7 Windows NT. STEP 7, , , , 100 , PG . STEP 7 V 5 200 380 (, ) . ( 128 256 ).
2. STEP 7
2- 2 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
, . , , . . Windows. STEP 7 SETUP Windows 9x/NT, -. PG STEP 7 . STEP 7 - (. ), NCM STEP 7 Acrobat Reader V3.01. MPI-. PG MPI-, MPI-. , . STEP 7 V 5 , , , , . Windows SIMATIC Workstation. .
2.1.2
STEP 7 ( ). . STEP 7 , . , . , - . , , - , ( ) " " (emergency license), - ( ).
2.1.3 SIMATIC Manager
SIMATIC Manager STEP 7. Windows: SIMATIC Manager .
2. STEP 7
Automating with STEP 7 in STL and SCL 2- 3 STEP 7 STL SCL
" " (Project Wizard). . , Check box "Display Wizard on starting the SIMATIC Manager" (" - SIMATIC Manager"). - : File () -> "New Project" Wizard. ("project"). . ZEn01_09_S7_ZEBRA : File () -> Open (), : (), - (.2.1).
.2.1 SIMATIC Manager "+" ; . SIMATIC Manager STEP 7. "" , SIMATIC Manager, "" (). () , (station) (PLC).
2. STEP 7
2- 4 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
.2.2 STEP 7 , , , MPI. CPU, CPU S7-. , Blocks (), .
Project
SIMATIC 300/400 station
MPI [PTP, PROFIBUS, Ethernet]
CPU xxx
Connections ()
S7 program
Symbols ()
Sources
Blocks
UDT n
OB n FB n FC n DB n
SFC n SFB n
System data ( )
VAT n
S7 program
Subnet ()
Configuration table ( )
CPU
Connection table ( )
Symbol table ( )
( ) GD
Source programs ( )
(STL-, SCL-)
.
, CPU
Data types (- )
,
Variable table( )
, CPU ( , S 7-, CPU)
Hardware ( )
Source files ( )
2. STEP 7
Automating with STEP 7 in STL and SCL 2- 5 STEP 7 STL SCL
STEP 7 . . 2.2 ("main branch" - " "), S7 (offline view). , , . (offline view) . PG. PG (online) CPU ( PLC), (online view), : View -> Online ( -> ). , ; , , . , (online) (offline) . . : Options -> Customize ( -> ) "View" (""). : Options -> Customize ( -> ), SIMATIC Manager, session language (), , .
: - , . - (. ) , , , , : Edit -> Object Properties ( -> ), . , CPU, (), (Hardware Configuration). - , , , SIMATIC Manager , , SIMATIC Manager (, ). . , . . .
2. STEP 7
2- 6 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
2.1.4 (Project(s) Library(ies))
STEP 7 " ", , (project) (library). (projects) . : ; ; ; ( , , ). . . . (library) . . STEP 7 , ( ), . (online) ( ), . STEP 7 V5 Standard Library, : System Function Blocks ( ), , CPU;
S5-S7 Converting Blocks ( S5-S7 ), S5-S7 ( S5 );
T1-S7 Converting Blocks ( TI-S7 ), TI-S7 ;
IEC Function Blocks ( IEC), DATE_AND_TIME STRING;
Communication Blocks ( ), CP;
PID Control Blocks ( -), ;
Organization Blocks ( ), ( ).
33 " ".
2. STEP 7
Automating with STEP 7 in STL and SCL 2- 7 STEP 7 STL SCL
S7- , . . : File -> Open ( -> ), . . : File -> New ( -> ) ( ). ( ) : Options -> Customize ( -> ) New (). Insert () (, ). , , SIMATIC Manager. : Edit -> Copy ( -> ) Edit -> Paste ( -> ) , Windows, "drag-n-drop", . , , SIMATIC Manager.
2.1.5 (Online Help )
(Online Help) SIMATIC Manager , . , Help (). Getting Started (), , SIMATIC Manager. : Help -> Contents ( -> ) STEP 7 . . : Help -> Context-Sensitive Help F1 ( -> ) , F1, , "" , , . , . (, ), .
2. STEP 7
2- 8 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
2.2
"" ("") , . , , ( , CPU) . , S7- - . , ( , CPU, ) Hardware Configuration tool. , SIMATIC Manager. , , (!) Windows Explorer () SIMATIC Manager.
2.2.1 Project Wizard ( )
STEP 7 V3.2 STEP 7 Wizard . CPU, - S7- CPU, S7-, .
S7- "", , . 2.1.3 "SIMATIC Manager" .
: File -> New ( -> ), , , , "" "Enter".
: Insert -> Station -> Simatic 300 Station ( -> -> S7-300) ( S7-300).
2. STEP 7
Automating with STEP 7 in STL and SCL 2- 9 STEP 7 STL SCL
, project ; SIMATIC Manager Hardware () . Hardware Hardware Configuration, . , : View -> Catalog ( -> ). (rail), , "SIMATIC 300" "RACK 300" "drag-n-drop" (station window). , . , "drag-n-drop", . CPU, , CPU 314 2. . 2.3 " ". , SIMATIC Manager. CPU. CPU SIMATIC Manager S7- . .
S7- CPU; S7- (S7-program) (connection table). S7-program; SIMATIC Manager (Blocks - ), . (Blocks - ); SIMATIC Manager (System data - ) (main) (OB1) .
. 1 . : Insert -> S7 Block -> (Blocks ) . System data ( ) . .
2. STEP 7
2- 10 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
Hardware () Station (). System data ( ) CPU, : PLC -> Download (PLC -> ), CPU. Source Files ( ) . Source Files : Insert -> S7 Software -> STL Source File ( -> S7 -> STL- ) Source Files , ASCII ( STEP) , : Insert -> External Source File ( -> ).
S7-
, . . S7-, : Insert -> Program -> S7 Program ( -> -> S7- ). S7- SIMATIC Manager Symbols () Sources ( ) Blocks (). Blocks () OB 1.
library (), , . , . , (online) , S7- .
2.2.2 ,
SIMATIC Manager " " ("main objects"), , () . () STEP 7 . File -> Rearrange ( -> ) SIMATIC Manager , , . , . : File -> Archive ( -> ). SIMATIC Manager ( ) . , . STEP 7 ARJ PKZIP 2.50, (, winzip, 6.0, pkzip, 2.04g, JAR, 1.02 LHARC, 2.13).
2. STEP 7
Automating with STEP 7 in STL and SCL 2- 11 STEP 7 STL SCL
, () . "" : File -> Retrieve ( -> ), . . "Archive" (""), : Options -> Customize ( -> ). "Generate archive name automatically" (" "), /, .
CPU
STEP 7 V 5.1, S7-400 CPU () CPU, . , , , , , . , , CPU. , CPU, , CPU PLC -> Save Project on Memory Card (PLC -> ). : PLC -> Retrieve Project from Memory Card (PLC -> ). , , CPU, , . , CPU, , CPU PLC -> Display Accessible Nodes (PLC -> ). PG, : File -> S7 Memory Card -> Open ( -> S7 -> ) .
2.2.3 (Project Versions)
SIMATIC. STEP 7 V1 1, STEP 7 V2 2, STEP 7 V3/ V4/ V5.0 - 2 3. STEP 7 V5.1 3 3.
2. STEP 7
2- 12 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
1 2, : File -> Open Version 1 Project ( -> 1). , 1, STL-, . 2 STEP 7 V2, V3, V4 V5.0 (. .2.3). .2.3 STEP
STEP 7 V5.1 3. , V1 V2, : File -> Open Version 1 Project ( -> 1). 2, : File -> Open ( -> ). , V2.
STEP 7 V1
STEP 7 V5.1
STEP 7 V2 STEP 7 V3/ V4/ V5.0
: File -> Open Version 1 Project ( -> 1) V1 V2
1 (V1)
3 (V3)
3 (V3)
File -> Open ( -> ) V2 V3
File -> New -> project ( -> -> ) V3
File -> New -> project 2. ( -> ) V2
File -> Save as ( -> ) V2 V3
V2 V3
2 (V2)
2 (V2)
2. STEP 7
Automating with STEP 7 in STL and SCL 2- 13 STEP 7 STL SCL
2.3
Hardware Configuration. (offline), .. CPU. . . : Edit -> Open Object ( -> ) (Hardware object) SIMATIC 300/400 Station. (basic settings) , : Options -> Customize ( -> ). : Station -> Consistency Check ( -> ). : Station -> Save ( -> ) . : Station -> Save and Compile ( -> ) , System data ( ) "" (offline) Blocks (). CPU, : PLC -> Download (PLC -> ). System data ( ) "" (online) Blocks () CPU. "" , : PLC -> Upload (PLC -> ). , : Station -> Export ( -> ). STEP 7 ASCII , . , , () . ASCII .
(Checksum) Hardware Configuration . , "" (offline) "" (online) . (Checksum) System data ( ).
2. STEP 7
2- 14 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
Blocks () S7-, System data ( ) : Edit -> Open Object ( -> ). . Blocks (): Blocks (), : Edit -> Object Properties ( -> ) "Checksums" ( ).
(Station) Hardware Configuration (. . 2.4).
. 2.4 , Hardware Configuration () . DP- . , , PROFIBUS, DP-. , DP-, .
2. STEP 7
Automating with STEP 7 in STL and SCL 2- 15 STEP 7 STL SCL
(Hardware) : View -> Catalog ( -> ). , , , STEP 7. : Options -> Edit Catalog Profile ( -> ) , , . "" .
(Configuration table) Hardware Configuration , , DP-. , , . (properties), .
2.3.1
"" "drag-n-drop" , , "SIMATIC 300" "RACK 300" . . . , "No Parking" (" ") , . S7-300 3 : . . S7-400 ( : ) "Link" () ("Properties") ("Send") IM. , : Edit -> Object Properties ( -> ). I/O 20.4.2 " I/O".
2.3.2
Hardware Configuration .
2. STEP 7
2- 16 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
. S7-400 CPU S7-300 CPU DP- . S7-400 S7-300, . , , () . , ; . S7-400, . , , CPU. : View -> Address Overview ( -> ) CPU. MPI MPI-. . , , MPI- , CPU.
, Hardware Configuration () , (Symbol Table). . ( ) : Edit -> Symbols ( -> ) , , ( ). "Add Symbol" (" ") . "Apply" ("") (Symbol Table). "OK" .
2.3.3
. , , . , . ,
2. STEP 7
Automating with STEP 7 in STL and SCL 2- 17 STEP 7 STL SCL
: Edit -> Object Properties ( -> ). . CPU . SFC 55 WR_PARM, SFC 56 WR_DPARM SFC 57 PARM_MOD.
2.3.4 MPI
MPI- (Module Properties). CPU MPI, , , : Edit -> Object Properties ( -> ). "General" ("") "Properties" () "Interface" (). , "Parameter" (), . MPI-, CPU. , S7-300 CPU, FM CP MPI- MPI- , CPU. MPI- MPI-, ( FM CP!). . : CPU , CPU (). "CPUxxx(1)", MPI-. CPU, , .. "CPUxxx(1)" "CPUxxx(n)", "n" MPI-. MPI- MPI- PG () . PG () MPI-; (spur-line) - MPI- . : 0 , 1 - 3 - CPU ( , ).
2. STEP 7
2- 18 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
2.3.5 Monitor () Modify ()
Hardware Configuration . , (online) , CPU. . , : PLC -> Monitor/Modify (PLC -> /) . "Status Value" ( ) Hardware Configuration . "Modify Value" ( ) , "Modify Value". checkbox "I/O Display" ( I/O), / / ( ). checkbox "Enable Periph Outputs" ( ), , CPU STOP (. 2.7.5 " "). 2.7.3 " " 2.7.4 " ".
2.4 (Network)
SIMATIC S7-. . SIMATIC Manager. ( CPU CP), Hardware Configuration; . - (connection) Network Configuration (connection table). Network Configuration . Network Configuration ; ("node properties") .
2. STEP 7
Automating with STEP 7 in STL and SCL 2- 19 STEP 7 STL SCL
(connections) Network Configuration : MPI-, . , : Insert -> Subnet ( -> ).
Network Configuration , , .
station () .
. , . (communication connections) (connection table), .
Network Configuration: MPI : Options -> Define Global Data ( -> ) (. 20.5 " "). : Network -> Save ( -> ) . : Network -> Consistency Check ( -> ). : Network -> Save and Compile ( -> ).
Network () Network Configuration . SIMATIC Manager MPI-. Network Configuration. , Connections () CPU. . 2.5 Network Configuration, () (connections). (connection table) . , , , , S7-400 CPU. SIMATIC , DP-. : View -> Catalog ( -> ). "" .
2. STEP 7
2- 20 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
. 2.5 Network Configuration : View -> Zoom In ( -> ), View -> Zoom Out ( -> ) View -> Zoom Factor ( -> ) .
2.4.1 (Network View)
"" . . .
2. STEP 7
Automating with STEP 7 in STL and SCL 2- 21 STEP 7 STL SCL
, . "". Hardware configuration, , , () . (Network Configuration). , , , . , "" . . . . .
, . : Edit -> Object Properties ( -> ) . "General" () S7- (ID). ID - . ID S7- (online) , . (network properties) "Network Settings" (" "), , (data transfer rate) (highest node address). (network connection), : Edit -> Object Properties ( -> ), , (node address) (subnet), , . "Interfaces" ("") . ( Hardware Configuration).
2.4.2 DP-
Network Configuration
Network Configuration I/O.
2. STEP 7
2- 22 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
: View -> with DP Slaves ( -> DP-), (slave) DP- (Network View). DP- : PROFIBUS ( , "" PROFIBUS ).
DP- (master) ( , "" , DP- Hardware Configuration CPU , ).
(connection) DP- PROFIBUS ( Hardware Configuration, DP- (master) Network Configuration "" PROFIBUS).
DP- (master), DP- (slave). DP- (slave) "PROFIBUS" , "" . DP- (slave) : Edit -> Open Object ( -> ). Hardware Configuration. , (slave), I/O (. 2.3 " "). DP- , (. 20.4.2 " I/O"). DP- (slave) "Already created stations" (" "). DP- (master) "" ( Hardware Configuration). : View -> Highlight -> Master System ( -> -> DP-) DP- (DP-master system). () (master) (slave) .
2.4.3 (Connections)
(Connection) .
2. STEP 7
Automating with STEP 7 in STL and SCL 2- 23 STEP 7 STL SCL
SFB- SIMATIC S7- ("Communications via configured connections" - " ")
SIMATIC S7-. : (online) MPI- . , , . (Network Object Catalog) PG/PC Stations (), PG/PC (network), .
Connection table ( ) (Connection table). : , , . Connections () CPU (Connection table). Connections () Network Configuration, . S7-400 CPU Network Configuration. (Connection table) (. : 2.1). , , , .
2.1 (Connection table)
Local ID (- ID)
Partner ID (ID -)
Partner ()
Type ()
Active Connection Buildup
( )
Send Operating State Message
( )
1 1 Station 416/CPU416(5) S7 connection Yes () No () 2 2 Station 416/CPU416(5) S7 connection Yes () No () 3 Station 315/CPU315(7) S7 connection Yes () No () 4 1 Station 417/CPU414(4) S7 connection Yes () No ()
: Insert -> New Connections ( -> ) . (connection) ("active") CPU. , S7-300 CPU ; S7-300 CPU "" ("passive") S7-.
2. STEP 7
2- 24 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
"New Connection" (" ") "Station" ("") "Module" ("") (. . 2.6); . .
. 2.6 , check box "Show Properties Dialog" (" "). . : View -> Display Columns ( -> ), .
Connection ID ( ) CPU. STEP 7 ID . .
Local ID ( ID) ID ( local ID - ID ). , ID .
2. STEP 7
Automating with STEP 7 in STL and SCL 2- 25 STEP 7 STL SCL
ID (local ID) . , , : S7-: 000116 0FFF16 PtP-: 100016 140016
Partner ID (ID ) ID ( partner ID), CPU ID (local ID); : Edit -> Object Properties ( -> ). STEP 7 ID (partner ID), , () (. ).
Partner () . , "Station" ("") "unspecified" (" "). (one-way connection) ; : SFB- S7-400 S7-300 CPU. SFB- S7-300, S7-400 CPU SFB 14 GET SFB 15 PUT. S7-300, . (one-way connection) (connection table) "" ("active") CPU. STEP 7 ID ("Local ID"). . (two-way connection) ; , , S7-400 CPU. , , SFB 8 BSEND SFB 9 BRCV. (two-way connection) . STEP 7 ID ("Local ID"), ID ("Partner ID") . .
Type () . STEP 7 (connection type):
2. STEP 7
2- 26 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
PtP connection ("Point-to-point", " ") PTP ( 3964 (R) RK 512) SFB-. PtP . SIMATIC S7 CP SIMATIC S7 ( SIMATIC), , -. S7 connection MPI, PROFIBUS Industrial Ethernet SFB-. S7 SIMATIC S7, PG HMI ( - ). S7 . Fault-tolerant S7 connection ( S7) PROFIBUS Industrial Ethernet SFB-. S7 SIMATIC S7 . "NCM S7 for PROFIBUS" "NCM S7 for Industrial Ethernet" . NCM : FMS-, FDL-, ISO transport-, TCP-, ISO-on-TCP-, UDP- E-mail-.
(Active Connection Buildup) , , (). , . check box "Active connection buildup" (" ") : , : Edit -> Object Properties ( -> ).
(Sending operating state messages) . , check box . CPU SFB 23 USTATUS.
(Connection Path) , , () (Connection Path). , STEP 7 : Industrial Ethernet, Industrial Ethernet/TCP-IP, MPI , , PROFIBUS.
2. STEP 7
Automating with STEP 7 in STL and SCL 2- 27 STEP 7 STL SCL
CPU, , . "Interface" ("") . CPU (, S7-400 CPU ), "PLC-internal" (" PLC"). "Type" ("") , . , , MPI- PROFIBUS-, "MPI". "PROFIBUS", STEP 7 . MPI PROFIBUS "Address" ("").
(Connections between projects) S7 , SIMATIC-, "unspecified" (" ") ( ). , , STEP 7 . .
S7- (Connection to non-S7 station) , S7-, : ( [ Siemens] , S7- )
PG / () SIMATIC S5- , ( S7) , (, Network Configuration, : Edit -> Object Properties [ -> ] "Interfaces" [""]).
2.4.4 (Network Transitions) , . S7-, MPI-. - S7- , PROFIBUS, . , .
2. STEP 7
2- 28 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
, (routing table), . S7- "", . , , , ( ). "placeholder" (""), PG/ (Network Object Catalog) . PG/ , PG. PG : PLC -> Assign PG/PC (PLC -> PG/). . PG : PLC -> Undo PG/PC Assignment (PLC -> PG/). (online) , , ID S7- . ID S7- : . ID . , - : Edit -> Object Properties ( -> ) "General" ("").
2.4.5 (Loading the Connection Data)
, ("connection table") PLC ( "" CPU). : (network window), . , . . , , STOP. : PLC -> Download -> (PLC -> -> ) . , , : -> Selected Stations ( ) -> Selected and Partner Stations ( ) -> Selected Connections ( ) -> Stations on Subnet ( ) -> Connections and Gateways ( )
2. STEP 7
Automating with STEP 7 in STL and SCL 2- 29 STEP 7 STL SCL
(connection table). (System data) Blocks. CPU . (online) MPI . PG Ethernet PROFIBUS, . "Set PG/PC Interface" Windows.
2.5 S7- 2.5.1
( ) S7 Program. CPU , CPU. S7 Program Symbols () Source Files ( ) Blocks () (. . 2.7).
. 2.7 , .
2. STEP 7
2- 30 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
("source-oriented") Source Files ( ). - ASCII, , . ; Blocks (). MC7 S7 CPU. "" ("incremental"), - - . . , Blocks (). (online) CPU, . . - , , I1.0 ( ). Symbol Table Symbols, , , "Switch motor on" (" ") , ( ). Blocks () , (Symbol Table) - , (address priority).
SIMATIC Manager , : Edit -> Object Properties ( -> ), "General-Part 2" (" - 2"). , SIMATIC Manager Blocks () : Edit -> Object Properties ( -> ). Blocks () (load memory) (work memory), . ; .
2.5.2 (Symbol Table)
, .. , , . (, I1.0) (, Start signal [ ]). . , , .
2. STEP 7
Automating with STEP 7 in STL and SCL 2- 31 STEP 7 STL SCL
(local) (global) ( ). (local) , . . . ( Symbols S7 Program). 24 . , , , . 00 hex, FF hex ("). . . 80 . : I, Q, PI PQ M, T C OB, FB, FC, SFC, SFB DB , , UDT VAT ; (declaration section) (declaration section) . S7- SIMATIC Manager Symbols. (. 2.8).
. 2.8 Symbol Table
2. STEP 7
2- 32 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
S7- Symbols. . , . , BOOL , INT , 16- . 3.7 " " 24 " ", STEP 7. "" ; . , .
, . "" , . , . : ASCII ( *.asc), sequential assignment list ( - *.seq), System Data Format ( - *.sdf Microsoft Access) Data Interchange Format ( - *.dif Microsoft Excel). . .
: Edit -> Special Object Properties ( -> ), . : HMI WinCC S7-PDIAG : View -> Columns O, M, C, R ( -> O, M, C, R), . : Options -> Customize ( -> ) , , .
2.5.3 STL- (STL Program Editor)
STEP 7 (STEP 7 Basic Package) LAD, FBD STL. STL- "" ()
2. STEP 7
Automating with STEP 7 in STL and SCL 2- 33 STEP 7 STL SCL
. . 2.9 , STL-. . 2.9 STL Editor. , . , . , , .
CPU
Blocks (on-line)
( )
on-line ( )
PG
Blocks (off-line)
PLC(PLC
download)
(Symbol
table)
Symbols
(Source programs)
,
Sources
( )
off-line ( )
PLC (PLC upload)
2. STEP 7
2- 34 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
STL- "" ("decompiled"), .. MC7 (offline database) ( CPU, PG ). , STL- .
STL- SIMATIC Manager, , OB1 Windows: Start -> Simatic -> STEP 7 -> LAD, STL, FBD -Program S7 Blocks. : Options -> Customize ( -> ). "Editor" ("") , , , , , . Blocks () (, ) . , , Source files ( ). , , , .. , . , , LAD FBD. MC7 . , , . , - . , , " " . , , , (block protection KNOW_HOW_PROTECT). , , CPU. , . , ACSII- . , (online) , ( ) .
2. STEP 7
Automating with STEP 7 in STL and SCL 2- 35 STEP 7 STL SCL
, "Source-oriented" ( ) STL- Source Files ( ). STL- ACSII- . , . SIMATIC Manager Source Files ( ) : Insert -> S7 Software -> STL Source File ( -> S7 -> STL-). , : Insert -> Block Template -> ( -> -> ) ( ). - \Step7\S7ska, S7kafnnx.txt. , . STL- : File -> Generate Source File ( -> ). , SIMATIC Manager: Insert -> External Source File ( -> ) Source Files ( ). : Edit -> Export Source File ( -> ). , , , . 3.4.3 " , STL" 3.6.2 " , " STL-.
STL- , . Blocks (). STL-, . "Source Files" (" ") , : Options -> Customize ( -> ) , , , , , . "Generate Block" (" ") . : File -> Consistency Check ( -> )
2. STEP 7
2- 36 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
. , : File -> Compile ( -> ). . , . , , , , CPU, , . , ( 3.4.3 " , STL").
STL- "Source Files" (" ") , : Options -> Customize ( -> ) "Generate source files automatically" (" "), ( ). . . "Execute" ("") , .
(offline), (online) Blocks (). . , , , . "Create Block" (" "), : Options -> Customize ( -> ), (reference data) . (offline) (online) CPU (, , ["programmable controller"] PLC). SIMATIC Manager ("offline" "online"); . "" ("offline") PG. ("offline") : File -> Save ( -> ) CPU : PLC -> Download (PLC -> ).
2. STEP 7
Automating with STEP 7 in STL and SCL 2- 37 STEP 7 STL SCL
, CPU, : File -> Save as ( -> ). CPU "" ("online") . CPU . CPU : PLC -> Download (PLC -> ). CPU (RUN) , . , "" ("online") ("offline") , : File -> Save ( -> ). 2.6.4 " CPU" 2.6.5 " " (online) . 3.4.2 " STL" 3.6.1 " STL" , STL-.
2.5.4 SCL- (SCL Program Editor)
S7-SCL SCL. S7-SCL SIMATIC Manager. . SCL, , (. . 2.10). , . , Blocks (), . , , STL. , . SCL- , , . (: CPU, ).
STL- SCL- SIMATIC Manager SCL- SCL- Windows: Start -> Simatic -> STEP 7 -> S7-SCL -> Program S7 Blocks. SCL- , , , STL-.
2. STEP 7
2- 38 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
. 2.10 SL Program Editor. SL- : Options -> Customize ( -> ). "Editor" ("") , , , , .
SCL- Source files ( ) SIMATIC Manager : Insert -> S7 Software -> SCL Source File ( -> S7 -> SCL-), . . : Insert -> Block Template -> ( -> -> ),
CPU
PG
Blocks (off-line)
PLC
(Symbol
table)
Symbols
(Source programs)
,
Sources
( )
Blocks (on-line)
( )
(PLC download)
2. STEP 7
Automating with STEP 7 in STL and SCL 2- 39 STEP 7 STL SCL
. SCL- , SIMATIC Manager: Insert -> External Source File ( -> ) Source Files ( ). : Edit -> Export Source File ( -> ). , "Window" (""). , , , . 3.5.2 " SCL" 3.6.2 " , " SL-.
SCL- , . Blocks (). SCL-, . "Compiler" ("") , : Options -> Customize ( -> ). Create object code ( ): , , , ; .
Optimize object code ( ): , .
Monitor array limits ( ): , , , , .
Create debug info ( ): Program Status, . ( - )
Set OK flag ( OK): , OK EN/ENO.
2. STEP 7
2- 40 Automating with STEP 7 in STL and SCL STEP 7
STL SCL
, : File -> Compile ( -> ). . , . , , , , CPU, , . , : File -> Partial Compile ( -> ). , ( 3.5.2 " SCL"). SCL- DB, . DB (Symbol Table) . , , , IEC-, Blocks () . : PLC -> Download (PLC -> ) CPU , Blocks () .
SCL , , . : Insert -> SCL Compilation Control File ( -> ) Source Files ( ). , . : File -> Compile ( -> ) .
2.5.5 (Rewiring)
Rewiring . , I 0.0 I 0.7 I 16.0 I 16.7. , , , , FC FB. SIMATIC Manager , ; , , Ctrl, - Blocks ().
2. STEP 7
Automating with STEP 7 in STL and SCL 2- 41 STEP 7 STL SCL
, , : Options -> Rewire ( -> ). , O, , SIMATIC Manager . , . : Address priority ( ).
, , , (rewire) .
2.5.6 (Address Priority)
("offline") Blocks () "Blocks" ("") ( ) , . . : "Absolute address has priority" ( ) ( , STEP 7). , , , . : "Symbol has priority" ( ), , , . : : I 1.0 "Limit_switch_up"