Upload
mrinal570
View
1.177
Download
22
Embed Size (px)
Citation preview
SIMATIC S7-300/400 1 STEP 7 2 SIMATIC S7 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
STEP7 LAD FBD
SIMATIC S7-300/400
::6ES7810-4CA05-8AR0
2- , 2001
LAD 26 FBD 27
Copyright Siemens AG 2003 , . . , , ,.
Siemens AG : / 4848, D- 90327
. , . , , . .
Siemens AG 2003 .
Siemens 6ES7810-4CA05-8AR0
, , . :
! , , .
! , , .
! , .
, .
. , , , .
:
! , , , Siemens.
, , , .
SIMATIC, SIMATIC HMI SIMATIC NET SIEMENS AG.
, , ; , .
Die Deutsche Bibliothek CIP-Cataloguing-in-Publication-Data
Die Deutsche Bibliothek
LAD FBD SIMATIC S7 - .
- STEP7 S7-300/400. - -.
. , . - , , .
.Publicis MCD Corporate PublishingPostfach 3240D-91052 ErlangenFederal Republic of GermanyFax: ++49 9131/72 78 38E-mail: [email protected]
SIMATIC ,
,
.
,
(SIMATIC S7), -
(SIMATIC 7) (SIMATIC 7).
-
: S7-200 (-PLC), S7-300
S7-400 ,
, -
.
STEP 7, STEP 5, -
SIMATIC. -
(PC) (, )
Microsoft Windows 95/98 Windows
NT.
() STEP 7 -
, DIN EN 6.1131-3. STL (statement
list ; ), LAD
(ladder logic ladder diagram ; , -
; ), FBD (function block diagram
) SCL (-
),
.
: S7-GRAPH
( ), S7-HiGraph ( -
-) CFC ( ;
).
-
. -
STEP 7.
LAD FBD S7-300/400.
S7-300/400 -
STEP 7. -
, -;
.
, ; ,
, , .
LAD FBD (-
) . -
,
,
-/.
LAD
FBD.
STEP 7 5.1.
, 2001
S7-300/400
PLC, - -
1 - SIMATIC S7-300/400 - ( S7-300/400) ; / - (I/O) (PROFIBUS DP); (); ;
4 - AND, OR - OR;
9 INT, DINT REAL
2 - STEP 7 ; ; ; ; LAD/FBD; ; - LAD FBD
3 SIMATIC S7 ; ; (Code Block) (Data Block); , , -
5 , ,; ; ;
6 -; MOVE; -
7 SIMATIC- -, -; IEC-
8 SIMATIC-; , , -, ; IEC-
10 - INT,DINT REAL
11 - -; - ; , - , , -
12 - -;
13
14 - AND, OR - OR
, -
-
15 , ; - ; EN/ENO
20 ; - ( , - , ); ; - / ; SFC SFB-
24 - KNOW_HOW_PROTECT; , -: ;
16 ;, RLO = 1;, RLO = 0;
17 MCR-,MCR-,MCR-
21 ; ; -; ; -; -
22 , , ;STOP, HOLD, ;
23 ;
25 ; ; IEC; S5 -S7; TI -S7; PID-;
26 LAD ; ;
18 , - , ; -,
19 , ; ,
27 FBD ; ;
,
LAD FBD. , ,
: LAD_Book FBD_Book.
Retrieve ()
2 (
PC/PG).
LAD_Book FBD_Book , -
. -
, ( ),
( )
. .
.
. SIMATIC- (SIMATIC Manager)
File Dearchive ( ) - ( README.TXT ).
, , , -
. , -
.
STEP 7 STEP 7 Mini, -
- STEP 7 -.
LAD_Book
FB 101 FB 102 FB 103 LADFB 104 4: FB 105 5: FB 106 6: FB 107 7: FB 108 8: LADFB 109 9: FB 110 10: FB 111 11: FB 112 12: FB 113 13: FB 114 14: LADFB 115 15: FB 116 16: FB 117 17: FB 118 18: FB 119 19: SFC-FB 120 20: FB 121 21: FB 122 22: FB 123 23: FC 11 FC 12 FB 20 ( )FB 21 FB 22 UDT 51 UDT 52 FB 51 FB 52 FC 51 FC 52
FC 41 FC 42 FC 43 FC 44 32- ( )
FBD_Book
FB 101 FB 102 FB 103 FBDFB 104 4: FB 105 5: FB 106 6: FB 107 7: FB 108 8: FBDFB 109 9: FB 110 10: FB 111 11: FB 112 12: FB 113 13: FB 114 14: FBDFB 115 15: FB 116 16: FB 117 17: FB 118 18: FB 119 19: SFC-FB 120 20: FB 121 21: FB 122 22: FB 123 23: FC 11 FC 12 FB 20 ( )FB 21 FB 22
UDT 51 UDT 52 FB 51 FB 52 FC 51 FC 52
FC 41 FC 42 FC 43 FC 44 32- ( )
STEP 7
10
STEP 7
-
STEP 7.
SIMATIC- (SIMATIC Manager)
( ) .
.
-
, , , CPU; -
.
.
, ,
. .
. -
: (), -
; ,
.
-
SIMATIC- .
STEP 7
11
SIMATIC-
Project ()
Hardware
1
CPU
1
2
SystemData ( )
2
Hardware (-) SIMATIC-
( CPU)
CPU c DP-: PROFIBUS, DP-
(
)
DP-,
DP-
STEP 7
12
CP-
System Data
Blocks ()
()-
- -
-
UDT DB
FC/FB, DB
OB
-
CPU
,
3
-
3
SIMATIC S7-300/400.
S7-300/400 . , , ( CPU) -. SIMATIC S7 / (I/O) - . CPU . (load memory) : - (work memory), .
STEP 7 S7-300/400, SIMATIC- (SIMATIC Manager).SIMATIC- Windows 95/98/NT , . SIMATIC- - , , , , .
STEP 7. SIMATIC S7 , , (networks) (rungs). - , -. STEP 7 , ( BOOL ), ( INT REAL -), , ( - ).
- S7-300/400, STEP 7. STEP 7 5.1.
3 SIMATIC S7 S7- LAD FBD. LAD FBD. .
1 SIMATIC S7-300/400
; /; -; ;
2 STEP 7
SIMATIC-; ; ; - ; ( , ); - ;
3 SIMATIC S7
; ; ; LAD FBD; -; ()
1 SIMATIC S7-300/400
3 1
1 SIMATIC S7-300/400 .......................................................... 41.1 ........................................................................ 4
1.1.1 .................................................................................................................... 41.1.2 S7-300............................................................................................................... 61.1.3 S7-400............................................................................................................... 71.1.4 CPU...................................................................................................... 91.1.5 ................................................................................................................. 101.1.6 ......................................................................................................... 11
1.2 / .......................................................................................... 131.2.1 DP-..................................................................................................... 131.2.2 DP- ...................................................................................................................... 141.2.3 DP-................................................................................................................... 141.2.4 PROFIBUS-PA................................................................................... 161.2.5 AS-.................................................................................. 171.2.6 ...................................................... 18
1.3 ...................................................................................................................... 201.3.1 ............................................................................................................... 201.3.2 .......................................................................................................................... 231.3.3 ...................................................................................... 261.3.4 ................................................................................................................... 27
1.4 .................................................................................................................... 291.4.1 ................................................................................................................. 291.4.2 ................................................................................................................... 291.4.3 ............................................................................................. 291.4.4 ................................................................................................ 311.4.5 ............................................................................................... 32
1.5 ................................................................................................................... 331.5.1 ............................................................................. 331.5.2 ............................................................................................................. 341.5.3 .......................................................................................................... 36
1 SIMATIC S7-300/400
4
1 SIMATIC S7-300/400
1.1
1.1.1
SIMATIC S7-300/400 , - :
(Racks) ;
(Power Supply, PS) ;
(Central Processing Unit, CPU) ;
(Interface Modules, IM) ;
(Signal Modules, SM) ;
(Function Modules, FM) CPU;
(Communications Processors, CP) ();
(Subnets) -.
( ) , . , CPU / (SM, FM CP) ( I/O-) . / I/O- , , ( 1.1). - / ( 1.2 /).
1.1
5
1.1 S7-300/400
S7-300
IM 365
IM 365 IM 361
S7-400
:IM 460-1IM 460-0IM 460-3IM 463-2
- 1,5 - 5(IM 461-1)
- 3 - 5(IM 461-0)
- 100 - 5(IM 461-3)
- 600 S5(IM 314)
1 SIMATIC S7-300/400
6
: / (I/O-, P-) ( K-).I/O- (P-) - , (K-) - . CPU - (MPI) .
1.1.2 S7-300
S7-300 8 I/O-. , , CPU 314 :
( IM 365, 1 )
( IM 360 IM361, 10 ).
8 . , 1,2 (0,8 CPU 312 IFM).
, P- K-.
FM 356 7-300. FM356 - . .
SIMATIC
SIMATIC S7-300, -. 25 +60, - IEC 68 2-6, , IEC 721-3-3 3 5, -
1.1
7
EN 50155 ( ). - .
1.1.3 S7-400
S7-400 18 9 (UR1 UR2); CPU , . IM 460-1 IM 461-1 1,5 , 5 . , - 3 , - IM 360-0 IM 361-0. , , - IM 360-3 IM 361-3 100 .
21 . IM - .
P- K-. ER1 ER2 18 9 - , , 24 P-, - K-. K- UR1, UR2 CR2 , 1 6.
CR2. CPU () - . CPU K-, P- .
S7-400, , CPU, . CPU. 20.3.6 21.6 .
1 SIMATIC S7-300/400
8
SIMATIC S5
IM 463-2 S5(EG 183U, EG 185U, EG 186U, ER 701-2 ER 701-3) S7-400, - . IM314 S5 . , .S7-400 IM 463-2; - IM 463-2 S5.
SIMATIC S7-300/400, - - (master station) (standby station), - .
, , - , -. . - .
/ / ( 200 IM 153-3 PROFIBUS DP). ( ) Software Redundancy ( -).
SIMATIC S7-400H
SIMATIC S7-400H , , H-CPU - . -; - .
/ (, ) ( 200). -.
, -;
1.1
9
. - S7-400H.
1.1.4 CPU
1.2 CPU, . , - (load memory) (work memory).
CPU (plug-in) . , -, .
RAM ( ), CPU. ; . - , .
1.2 CPU
()
( - )
()
/
CPU S7-400 -
1 SIMATIC S7-300/400
10
() , , . CPU - -. ( 2.6.4 CPU 2.6.5 ).
RAM, . , - EEPROM - EPROM, CPU - .
CPU 3IFM RAM- EEPROM-. RAM, - (-) EEPROM, .
CPU S7-300 ( CPU 318) RAM, . - EPROM .
S7-300 ( datablocks) ( , ) . , .
RAM CPU S7-400 - . , , RAM. - EPROM - .
CPU S7-400 -.
STEP 7 5.1 (V5.1) CPU S7-400 ( 2.2.2 , -).
1.1.5
: RAM- EPROM-.
, RAM (-, CPU S7-400). RAM- -
1.1
11
() . RAM .
, , , EPROM. ( ) EPROM, . - CPU , CPU .
1.1.6
(system memory) (), . ( ), - . , , , - () - ( ), , . CPU - :
(Inputs, I) ( ) .
(Outputs, Q) ( ) .
(Bit memory, M) , .
(Timers, T) , - .
(Counters, C) , - .
(Temporary local data, L) , - . L-, CPU -.
, , , - . - .
1 SIMATIC S7-300/400
12
, , ( ). CPU S7-400 , L-, -.
1.2 /
13
1.2 /
PROFIBUS-DP - (-) . - DP- (DP master), DP- (DP slaves). () / -, PROFIBUS-DP PROFIBUS (-- PROFIBUS). PROFIBUS-DP EN 50170 DP.
PROFIBUS-DP 1.3.2 .
DP- DP-. - 32 , 127. DP- . , - PROFIBUS-DP , , -, 200 DP- SIMATIC S5.
1.2.1 DP-
PROFIBUS-DP , DP- DP-. DP- , - ( ). DP- DP- DP- ( 1.3).
DP- ( DP-) PROFIBUS ( ). , , DP- DP- DP-, , , DP-, ..
DP-
, DP- DP-. DP- S7, DP- - DP-. CPU DP-.
1 SIMATIC S7-300/400
14
1.3 PROFIBUS-DP
1.2.2 DP-
DP- PROFIBUS. - DP-. DP-
CPU DP- - (, CPU 315-2DP, CPU 417)
CPU (, IM 467)
CP CPU (, CP 342-5, CP 443-5)
1 2 (, ).
1.2.3 DP-
DP- PROFIBUS. SIMATIC S7
DP- DP- ;
S7 DP-,, CPU 318-2DP
,, 200
,, 200
,, CPU 315-2DP
PROFIBUS-DP
DP/PA
DP/PA
DP/RS232C
DP/AS-
PROFIBUS-PA PROFIBUS-PA
AS-
1.2 /
15
DP- ();
( ) DP- (I-slaves) , () .
PROFIBUS DP
DP- ET 200B ( -/ /; IP 20; - 12 /), ET 200 ( IP66/67; /; - 1,5 / 12 /) ET 200L-SC ( - / /; IP 20; 1,5/). , (Link) DP/AS-i, - PROFIBUS.
PROFIBUS DP
DP- 200. S7-300 DIN, , - IM 153 CPU (SM) (FM), . 9,6 / 12 /.
200 , DP- S7-400. , / S7-300 -. . .
200 IM 153-3 - . IM 153-3 , DP- , DP- .
(I-) PROFIBUS-DP
DP- S7-300, - CPU, DP-, - (, CPU 315-2DP), S7-300 CP 342-5 .
200 147/CPU DP-. 7 . -
1 SIMATIC S7-300/400
16
, 147/CPU, STEP 7. - /, -/, (- 5,5 400 ). 9,6 / 12 /.
1.2.4 PROFIBUS-PA
PROFIBUS-PA
PROFIBUS-PA (Process Automation ) (Ex- 1), , , , .
PROFIBUS-PA EN 50170, 2 (PROFIBUS-DP), IEC 1158-2.
PROFIBUS-DP PROFIBUS-PA:
DP/PA-, PROFIBUS-DP 45,45/
DP/PA, PROFIBUS-DP PROFIBUS-PA.
DP/PA-
DP/PA- PROFIBUS-DP. PROFIBUS-DP DP/PA- DP-, - 45,45 /. DP/PA- 31 - . PROFIBUS-PA 31,25 /. PROFIBUS-PA PROFIBUS-PA.
DP/PA- : -Ex- - 400 Ex- 100 .
DP/PA
DP/PA PROFIBUS-DP 9,6 / 12 /. DP/PA IM 157 DP/PA- ( 5 ), SIMATIC S7. -
1.2 /
17
, PROFIBUS-PA, PROFIBUS-DP. DP/PA 31 - .
SIMATIC PDM
SIMATIC PDM (Process Device Manager , SIPROM) , - PROFIBUS-PA HART. HART- (Highway AddressableRemote Transducers ) - DDL (Device Description Language ).
SIMATIC PDM Windows 9x/NT , STEP 7.
1.2.5 AS-
-
- (actuator-sensor interface AS-i) . AS-i- 31 AS-i- 2- AS-i-, , . AS-i- AS-i, 8 () .
AS-i 100 ; 2100 (AS-i- AS-i -) (AS-i- AS-i -, ).
AS-i-
AS-i- AS-i- 5 . AS-i- SIMATIC S7 342-2 PROFIBUS-DP DP/AS- ( 1.4).
AS-i- 342-2 S7-300 200. :
342-2 /. 16 16 ( 128 -). AS-i- , - .
1 SIMATIC S7-300/400
18
AS-i-. FC ( , / -, ).
DP/AS- AS-i- AS-i- PROFIBUS-DP. PROFIBUS-DP - DP-, AS- AS-i-, 31 AS-i-. AS-i- (31) DP/AS- 16 16 . - 12 /.
1.4 AS-i SIMATIC S7
DP/AS- : DP/AS- 65 IP 66/67 DP/AS-20 IP 20, , 20 .
1.2.6
PROFIBUS-DP/RS 232C - RS 232C (V.24) PROFIBUS-DP. RS 232C PROFIBUS-DP DP/RS 232C.
S7-300
PROFIBUS-DPCP342-2
AS-
DP/AS-
- AS-i
:
AS-i
AS-i
AS-i
AS-i
AS-i
AS-i
4 8
AS-iASIC
AS-iASIC
1.2 /
19
DP/RS 232C 3964R (free)ASCII.
PROFIBUS-DP/RS 232C - -- (, point-to-point). PROFIBUS-DP PROFIBUS-DP/RS 232C. - . 224 .
PROFIBUS-DP 12 /; RS 232C - 34 / , - , -.
1 SIMATIC S7-300/400
20
1.3
SIMATIC S7. - . - CPU - . ( Siemens).
SIMATIC (SIMATIC NET) (-) - SIMATIC. - - (HMI-). - .
1.3.1
1.5 . SIMATIC , . - .
1.5 SIMATIC S7
SIMATIC S7CPU
DB
ID-
-
ID
SD
SFB
SIMATIC S7CPU
DB
ID-
-
ID
RD
SFB
-
1.3
21
SIMATIC S7 CPU MPI-, . , - (CP), . - . -.
- ( ), , , (). S7- , , S7- .
. , - .
- , - , () (). SIMATIC MPI, PROFIBUS, Ethernet (Industrial Ethernet) - -- (point-to-point PTP).
() , , . , , , .
SIMATIC : S7-, PROFIBUS-DP, PROFIBUS-FMS, PROFIBUS-FDL (SDA), ISO-, ISO-on-TCP - (global data communications).
() - . - , , (, ), .
1 SIMATIC S7-300/400
22
SIMATIC : S7-, S7-(), FMS- FDL-, ISO-, ISO-on-TCP- TCP-, UDP- e-mail-.
- . SIMATIC S7 - CPU - . (loadableblocks).
1.1 , - .
1.1
, -
(GDtable)
SFC-
SFC-
MPI CPU
SFB- ( S7-400)
(connection ta-ble), FB-
PROFIBUS-DP(, )
Hardware configuration (- ), / -, SFC-
CPU DP-
SFC-
SFC-
PROFIBUS-DP ( -)
Hardware configuration, / -, SFC-
IM 467
SFC-
SFC-
PROFIBUS-DFLPROFIBUS-DP ( -)
NCM, ,SEND/RECEIVE
SFC-
SFC-
CP 342-5CP 443-5-
SFB- ( S7-400)
, SFB-
PROFIBUS-FMSPROFIBUS-FDL
NCM, , FMS-, SEND/RECEIVE
SFC-
SFC-
PROFIBUS
CP 343-5CP 443-5
SFB- ( S7-400)
, SFB-
1.3
23
1.1 ()
, ISO TCP/IP
NCM, ,SEND/RECEIVE
CP 343-1CP 443-1
SFB- ( S7-400)
, SFB-
ISO TCP/IP, IT-
NCM, ,SEND/RECEIVE
-Ethernet
CP 343-1 ITCP 443-1 IT
SFB- ( S7-400)
, SFB-
NCM ; NCM PROFIBUS . Ethernet.
1.3.2
- . SIMATIC- . :
MPI SIMATIC .
PROFIBUS , /.
Ethernet - .
Point-to-point (PTP-) - .
STEP 7, , SIMATIC S7, , - . - S7 .
MPI
CPU (- multipoint interface, MPI). , CPU, - - . - Siemens.
1 SIMATIC S7-300/400
24
MPI , . 50 . - RS485 ( 1100 ) ( 100 ). 187,5 /.
32. - . ( ).
MPI CPU - , SFC- SFB-. .
PROFIBUS
PROFIBUS Process Fieldbus ( ), , EN 50170, .
- . ; 100 - (12 /) 1000 (9,6 /). - .
127; . - , . - ( ). () (), , , . .
/ PROFIBUS; PROFIBUS-DP . CPU DP-, CP. SFC- SFB-.
PROFIBUS-FMS PROFIBUS-FDL, - CP. (FMS- SEND/RECEIVE-), .
1.3
25
Ethernet
Ethernet , - , , - IEEE 802.3.
, . - 1,5 , 4,5 . 10 /.
1000 Ethernet. , . , - (CSMA/CD-). .
Ethernet - SFB-, S7. - Ethernet CP, ISO- ISO-on-TCP- SEND/RECEIVE-.
-- (point-to-point)
-- (PTP) - . SIMATIC- .
. RS 232C (V.24), 20 (TTY) RS 422/485. - 300 / 19,2 / - 20 76,8 / RS 232C RS 422/485. ; 10 RS 232C, 1000 20 9,6 / 1200 RS 422/485 19,2 /.
AS-
AS- ( /, AS-i) - - AS- IEC TG 178. AS- SIMATIC- ; AS-I- - (hardware configuration) (net-work configuration).
1 SIMATIC S7-300/400
26
, ( ). - 300 . 167 /.
31 , .
1.3.3
- . - :
(PG): , - ; , , .
HMI-: -; - OP, , .
SFB-: - . SFB- ; , - .
SFC-: - 76 . SFC-; , .
S7- MPI, PROFIBUS - Ethernet.
- CPU . -.
; . .
MPI K- .
PROFIBUS-DP - /. - EN 50170 2. SIMATIC
1.3
27
S7 ( SIMATIC) 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-FDL , , - SIMATIC S5 PROFIBUS.
ISO- ISO 8073 4. . ISO- , , SIMATIC S5 Ethernet.
ISO-on-TCP TCP/IP RFC 1006. Ethernet.
1.3.4
(connection) . ; () ( ). .
; ( ). . Connection type ( ) ( 2.4 ).
S7 - PROFIBUS-DP SFC-. (global data table); PROFIBUS-DP SFC- .
1 SIMATIC S7-300/400
28
- () CP. , , S7 MPI- CPU, CPU; MPI- CP - CP CPU.
CPU . - OP ( ).
- SFC-.
1.4
29
1.4
1.4.1
, , ( 1.6).
, , +HP01-S10 ( , Switch motor on), , . , / (I/O-) (, 5, 2).
CPU , (I 5.2, -). I 5.2 - .
-, ( ), (symbol table). - - .
1.4.2
(S7). . - ( -).
, - . , .
, / - . DP- .
Hardware Configuration STEP 7 - S7 - . ( 2.3 ).
1.4.3
, , -, (
1 SIMATIC S7-300/400
30
/). / - 0 , CPU.
1.6 , ( )
, ( ). () , . , . 0,1, 2 3; . : 8 -
0 1 2 3 4 5 6 7
+HP01S10
7
0
7
0
n
n+1
4
57
0
7
0
I/O
4
5
I-5 DI 16 4
I 5.2 BOOL
(LAD)
I 5.2
(FBD)
I 5.2
&
&
1.4
31
8, 9, 10 11. (, ) , . 2, 4, 8 16 , 4, 8, 16 32 .
( ) CPU - , , . - (0-). (configuration table).
S7-3 DP-, S7-318 S7-400 - . - . - . FM CP - .
/() -/. -/ .
DP- , ( -) ( ). - / , SFC 14 DPRD_DAT SFC 15 DPWR_DAT.
, , (Input) (Output). , FM CP , - .
1.4.4
- , . - ( ), . (, ), / , - .
/ . ; , , - CPU .
1 SIMATIC S7-300/400
32
STEP 7 -, /. - Hardware Configuration.
; ( 20.4.1 -/).
1.4.5
,
DP- (, DP-, DP-, -) PROFIBUS , .
MPI-
, MPI ( CPU, FM CP), MPI-. -, - - .
, CPU S7-300 FM CP, , MPI-, MPI- CPU.
CPU S7-300 MPI- FM CP - MPI- CPU.
CPU 318 MPI- , MPI-. - .
1.5
33
1.5
, , -
,
,
,
( 7 8 -),
L- ( 18.1.5 ).
() .
1.5.1
SIMATIC S7 : , Load () Transfer (), .
, - /. () .
. - -/ , - , , . . , , , . - . - ; .
/, -, , (peripheralinputs, PI) (peripheral outputs, PQ). , CPU .
1 SIMATIC S7-300/400
34
(PI) . PI . I/O- 0; - CPU.
/ (Direct I/O Read) , - ( , ). , - , - (Direct Read). . , - , .
, .
(PQ), . - PQ . I/O- 0; CPU.
Direct I/O Write ( /) , (-, ). , , . -. , Direct I/O Write - ! , .
, - .
1.5.2
, . - (I), (Q). , - .
1.5
35
, - , . 20.2.1 -.
CPU S7-300, CPU S7-400, 1998 ., - . .
CPU, , CPU 417, . - . - CPU , .
(input) . , - . - CPU -.
:
, - ( / ).
, (, () / , , ). .
( ). , - .
, (random access memory). . - , .
(- 20.2.4 ).
1 SIMATIC S7-300/400
36
(output) -. , . CPU - .
:
( / ).
, (, () -/, , ). .
. - .
(), - . - , . , , -.
. - 20.2.4 - .
1.5.3
, , , . - . , . CPU . CPU.
, . -:
(temporary local data), , ;
1.5
37
(static local data), , .
()
( ), , - . - . CPU. - 22.2.3 .
. ( ), (watchdog) ( ) (clock memory).
, - ( ) 1:1. - ( 1.7). , , CPU. , .
7 6 5 4 3 2 1 0
1.7
10
5 ( )
2,5 ( )
2
1,25 ( )
1
0,625 ( )
0,5
2 STEP 7
3 2
2 STEP 7............................................................................................ 42.1 STEP 7............................................................................................................ 4
2.1.1 .................................................................................................................... 42.1.2 .................................................................................................................... 52.1.3 SIMATIC- ....................................................................................................... 52.1.4 ................................................................................................... 82.1.5 ..................................................................................................... 10
2.2 .................................................................................................... 112.2.1 ....................................................................................................... 112.2.2 , , ........................................................ 132.2.3 ........................................................................................................... 15
2.3 ................................................................................................ 172.3.1 ................................................................................................... 192.3.2 ...................................................................................................... 192.3.3 ............................................................................................ 202.3.4 MPI .......................................................... 212.3.5 ............................................................... 21
2.4 ...................................................................................................... 232.4.1 .......................................................................................... 252.4.2 DP- Network Configuration ......................... 262.4.3 .................................................................................. 272.4.4 ........................................................................................................ 322.4.5 ....................................................................................... 33
2.5 S7 ...................................................................................................... 352.5.1 ........................................................................................................................ 352.5.2 ........................................................................................................ 362.5.3 ....................................................................................................... 382.5.4 .................................................. 412.5.5 ......................................................................................................... 422.5.6 ....................................................................................................... 432.5.7 ............................................ 45
2.6 () ................................................................................ 482.6.1 PLC........................................................................................................ 482.6.2 ............................................................................... 492.6.3 CPU ......................................................................................................... 502.6.4 CPU.......................................................... 512.6.5 ......................................................................................................... 52
2.7 .................................................................................................... 552.7.1 ..................................................................... 552.7.2 STOP................................................. 562.7.3 ......................................................... 562.7.4 ( Force)....................................... 582.7.5 ..................................................................... 612.7.6 LAD/FBD...................................................................................... 62
2 STEP 7
4
2 STEP 7
2.1 STEP 7
STEP 7 5.1(V5.1). -, , .
(statement list,STL), (ladder logic, LAD) - (function block diagram, FBD). , S7-SCL (structured control language - ), S7-GRAPH (sequence planning -) S7-HiGraph (state-transition diagram -).
2.1.1
STEP 7 V5 32- , - Windows 95 Service Pack 1 ( 4.00.950), Windows 98 Windows NT Service Pack 3 ( 4.00.1381). - STEP 7 Windows 95/98 - (programming device, PG) PC 80486 32 RAM; Pentium 64 . WindowsNT Pentium 32 RAM; , STEP 7 Windows NT.
STEP 7 , , , - 100 , PC .
STEP 7 V5 200 300 - (, ) . ( swap-out). 128 256 - .
, , , - . , , - . -, , . , Windows.
SETUP Windows 95/98/NT. STEP 7 - .
2.1 STEP 7
5
STEP 7 V5 - (), NCM CP - STEP 7 Acrobat Reader V3.01.
MPI-. - , MPI. , (prommer).
STEP 7 V5 , , , , , , . - Windows (Windows Control Panel) SIMATICWorkstation ( SIMATIC). - .
2.1.2
STEP 7 ( ). - . STEP 7 , . .
- () .
- , , - - , , . .
2.1.3 SIMATIC-
SIMATIC- (SIMATIC Manager) STEP 7; () Windows (Start).
SIMATIC Manager
SIMATIC- .
2 STEP 7
6
(Project Wizard). . - (, check box) Display Wizard on start-ing the SIMATIC Manager ( SIMATIC- -), File NewProject Wizard ( ). (project). - .
, File Open ( -), : ( ), ( 2.1). - ; - .
2.1 SIMATIC-
STEP 7 SIMATIC-. - . , . , - , , MPI. CPU, CPU , S7-. , -, (container) , Blocks(), , , -.
2.1 STEP 7
7
STEP 7 . 2.2 ( ), STEP 7 S7- . () -. . , . - CPU ( PLC), View Online ( ). , , ; , , - .
MPI[PTP, PROFIBUS,Ethernet]
CPU
(= ) -
(, STL- SCL-)
-
OB nFB nFC nDB n
SFC nSFB n
. , CPU
UDT n -
VAT n (-)
, CPU( , S7-, CPU)
2.2 STEP 7
SIMATIC 300/400
CPU xxx
S7
S7
2 STEP 7
8
, - (). - , . Options Customize ( -) View ().
Options Customize ( ) , - SIMATIC-, (), (libraries), , .
:
() , , ( ).
( , ) Edit Object Properties ( ) . , CPU, - (), Hardware Configuration ( ).
, . , SIMATIC- - . - , SIMATIC- - (, , ).
. , - , (toolbar). . - .
2.1.4
STEP 7 (main objects) .
(Projects) , .
2.1 STEP 7
9
,
,
,
( , , ).
. () , -. , .
(Libraries) - . . - STEP 7, , , - ( ), (symbol table). ( ) , .
STEP 7 V5 (StandardLibrary), :
System Function Blocks ( ) , CPU, ;
S5-S7 Converting Blocks ( S5-S7) S5/S7 ( S5 );
I-S7 Converting Blocks ( I-S7) I-S7;
IEC Function Blocks ( IEC) - DATE_AND_TIME STRING;
Communication Blocks ( ) CP 342-5 (CP-);
PID Control Blocks ( PID-) ;
Organization Blocks ( ) (templates) ( ).
2 STEP 7
10
25 -. , S7 , - . - . File Open ( -) . .
File New ( ) - (, ). , SIMATIC- , - Options Customize ( ) New ().
Insert () - (, ). , SIMATIC- , .
- Edit Copy ( ) Edit Paste ( ), Windows, - . , SIMATIC- - (undo) .
2.1.5
() , , -. (topic), , - Help (). , GETTING STARTED() , SIMATIC-.
Help Contents ( ) - STEP 7 . .
Help Context-Sensitive Help F1 ( - F1) - , F1, - , - .
. , . , , , , - .
2.2
11
2.2
, - . -, , , , CPU . , S7- - . , - ( , CPU, -) Hardware Configuration.
, - SIMATIC-. , , (!) Windows Explorer( Windows) - SIMATIC-.
2.2.1
(Project wizard)
STEP 7 V3.2, - STEP 7 Wizard ( STEP 7). CPU, S7 CPU, S7-, - .
S7
, . 2.1.3 SIMATIC-.
File New ( ), , RETURN.
Insert Station SIMATIC 300Station ( SIMATIC 300) ( S7-300).
2 STEP 7
12
, , ; SIMATIC- . Hardware () Hardware Configuration, - (configuration table). - , View Catalog ( ). ,, SIMATIC 300 RACK 300, , - ( drag &drop). .
, , . - , -, CPU, , CPU 314 2. - . 2.3 .
, SIMATIC-. - CPU.
CPU SIMATIC- S7 Program(S7-) . .
S7 Program
CPU; S7- - (connection table) S7 Program Connection.
S7-; SIMATIC- - (Blocks ), - .
(Blocks); SIMATIC- - (Systemdata ) ( 1).
. 1 , , , - .
2.2
13
Insert S7 Block ( S7) (Blocks ) - .
System data ( ) - . - . Hardware () Station (). System data ( ) CPU, PLC Download (PLC ), CPU. Source Files ( ) . Source Files ( ), Insert S7 Software STL Source File ( S7 STL), . Insert External Source File ( ), - , , , ASCII, Source Files ( ).
S7
- . . S7- Insert Program S7Program ( S7-). S7-SIMATIC- Sources () Blocks(). Blocks () 1.
, , , . , , -.
, , , STEP 7 .
2.2.2 , ,
SIMATIC- - : , . - STEP 7, - .
2 STEP 7
14
File Rearrange ( )SIMATIC- . , (), ().
File Rearrange ( ), SIMATIC- , , , . .
(File Archive, ). SIMATIC- ( ) - .
. STEP7 ARJ PKZIP 2.50, - (WinZip 6.0, Pkzip 2.04g, JAR 1.02 LHARC 2.13).
() . File Retrieve ( ) . - .
Ar-chive (), Options Customize ( ); , Generate archive path automatically ( ) ( -, ).
CPU
STEP 7, 5.1, CPU S7-400 () CPU, . , -, , , - -. - , - CPU .
, CPU, -, CPU PLC Save Project on Memory Card (PLC ). : PLC Retrieve Project from Memory Card (PLC
2.2
15
). , - , CPU, CPU, .
, CPU, , CPU - PLC Display Accessible Nodes (PLC ). , File S7 MemoryCard Open ( S7 ).
2.2.3
STEP 7 V5 SIMATIC- . STEP7 V1 1, STEP 7 V2 2, STEP 7V3/V4/V5.0 - 2 3. STEP 7 V5.1 V3- V3-.
2.3
STEP 7 V3/V4/V5.0
STEP 7 V1
STEP 7 V5.1
S
TEP
7 V2
V2
V2
V1
V1 V2 File Open version 1 project.
- V3 File New Project.
V2 - File New project 2.x.
V3
V3
V2 V3.
V2 - V3 File Save As.
- V2 - V3,- File Open.
2 STEP 7
16
1, 2 File Open Version 1 Project ( 1). - , 1, STL-, - .
2 STEP 7 V2, V3, V4 V5.0 ( 2.3).
STEP 7 V5.1 3. , - V1- V2- File Open Version 1 Project ( - 1), V2-, File Open ( ). V2- 2 .
2.3
17
2.3
- Hardware Configuration. - CPU. . - .
, Edit Open Object ( ) - Hardware SIMATIC300/400 Station ( SIMATIC 300/400). - Options Customize ( ). , Station Consistency Check ( - ) . Station Save ( ) - .
2.4 Hardware Configuration
2 STEP 7
18
Station Save and Compile ( ) , System data ( ) Blocks (). - CPU PLC Download (PLC ). Sys-tem data ( ) Blocks () CPU. - PLC Upload (PLC ). Station Export ( ). STEP 7 ASCII, . - . - ASCII-.
Hardware Configuration (checksum) - . , , , .
System data ( ). , S7- Blocks(), System data ( ) - Edit Open Object ( ). . - Blocks (): Blocks () Edit Object Properties ( ) Checksums ( ).
Hardware Configuration ( 2.4). - . DP- . , , , PROFIBUS, DP-. - , DP-, .
2.3
19
View Catalog( ). , -, STEP 7. Options Edit Catalog Profile ( - ), , , , - . - .
Hardware Configuration , - , DP-. , . .
2.3.1
, - , , SIMATIC 300 RACK 300, , - (drag&drop). - . - . No Parking( ) .
S7-300 3 ; - .
- . - S7-400 ( : - ) Link () Properties () Send IM ( Edit Object Properties, ). I/O- 20.4.2 - /.
2.3.2
Hardware Configuration - () .
2 STEP 7
20
. CPUS7-400 CPU S7-300 DP- . , S7-300 S7-400, .
, , (-) . , ; .
S7-400, - (subsidiary) ( Part process image). - CPU, , .
View Address Overview ( ) , - , - CPU.
MPI- MPI-. . , , MPI- - CPU .
Hardware Configuration (), .
, , - . () Edit Symbols( ). , , -, ( ).
Add Symbol ( ) . Apply () . .
2.3.3
. , . - .
Edit Object Properties ( ).
2.3
21
. CPU, () . SFC 55WR_PARM, SFC 56 WR_DPARM SFC 57 PARM_MOD.
2.3.4 MPI
MPI () (Module Properties). CPU MPI-, CPU , , Edit Object Properties ( ). - Interface () General () Properties (). , Parameter (), .
MPI-, CPU. , CPU S7-300 FM CP MPI- MPI- CPU.
MPI- MPI-, ( FM CP!). .
: CPU, CPU (). CPUxxx(1), MPI-. - , , , CPUxxx(1) CPUxxx(n), n - MPI-.
MPI- - MPI- (operator panel, OP) . - - MPI ; () MPI- () -. : 0 -, 1 2 CPU ( ).
2.3.5
Hardware Configuration - () . , () , CPU. . -
2 STEP 7
22
, PLC Monitor/Modify (PLC /) (Monitor) (Modify) .
Hardware Configuration Status Value ( ) - . Modify Value( ) , - Modify Value.
() I/O Display ( I/O) , / ( ) / - ( ). Enable Perif Outputs ( - ) , CPU - STOP () ( 2.7.5 ).
- 2.7.3 2.7.4 .
2.4
23
2.4
S7 SIMATIC-. . SIMATIC- - . HardwareConfiguration ( CPU CP); - . NetworkConfiguration ( ) .
Network Configuration . Network Configuration - ; - .
- , :
MPI ; , Insert Subnet ( ).
Network Configuration .
-.
.
, -.
Network Configuration - : MPI Options Define Global Data (- ) ( 20.5 - ).
Network Save ( ) NetworkConfiguration. Network Consistency Check ( ).Network Configuration Network Save and Compile ( ).
2 STEP 7
24
Network ( )
Network Configuration . SIMATIC- MPI.
Network Configuration. Network Configuration, Connections (-) CPU.
2.5 Network Configuration
Network Configuration () .
-, , CPU S7-400, -.
(Network Object Catalog) - SIMATIC, DP-. - View Catalog ( -), ( ).
2.4
25
View Zoom In ( ), View ZoomOut ( ) View Zoom Factor ( -) .
2.4.1
Network Configuration . , , , . - . .
, - . . Network Configuration, , , () . - Network Configuration.
NetworkConfiguration . , , , . .
.
. , .
-: Edit Object Properties ( ). , , General () ID () S7. ID , . ID S7 , - - . , -, , Network Settings ( ).
( ) Edit Object Properties ( -), , , , . Interfaces () , .
2 STEP 7
26
( - , Hardware Configuration).
2.4.2 DP- Network Configuration
Network Configuration - /. View With DP Slaves ( DP-), DP- .
DP-, :
PROFIBUS ( , PROFIBUS ).
DP- ( , , DP- - Hardware Configuration CPU, ).
DP- PROFIBUS ( Hardware Configuration, DP- Network Configuration, , PROFIBUS).
DP-, . - DP- PROFIBUS , .
DP- - Edit Open Object ( ). Hardware Configuration. - , , / ( 2.3 ).
DP- (I-slave) , ( 20.4.2 - /). DP- Already created stations ( ); , DP-, ( Hardware Configu-ration).
View Highlight Master System ( -) DP-; - .
2.4
27
2.4.3
. ,
SFB- SIMATICS7 ( )
SIMATIC S7.
: MPI . , - , , . PG/PC (- ) Stations (), PG/PC .
. -: , - , .
Connections () CPU -. Connections () Network Configuration, .
, Network Configuration CPU S7-400. ( 2.1; , ). - Insert New Connection ( ) .
CPU. , CPU S7-300; CPU S7-300 S7-.
Station() Module () New Connection ( )( 2.6); . .
ShowProperties Dialog ( ).
2 STEP 7
28
. View Display Columns( ) .
ID ()
CPU. STEP 7 ID - . - . ID (local ID, ID - ). , - - ID.
ID . , - :
S7-: 0001hex 0FFFhex
PtP-: 1000hex 1400hex
ID (partner ID) CPU- ( ) ID: Edit Object Properties ( ). STEP 7 ID , ( ).
2.1
Local ID /- ID
Partner ID/ ID -
Partner / Type /
Active connectionpartner / - -
Send operating modemessages /
1 1 416 /CPU416(5)S7-
2 2 416 /CPU416(5)S7-
3 315 /CPU315(7)S7-
4 1 417 /CPU414(4)S7-
2.4
29
. -, (Station) unspecified ().
(one-way connection) ; : SFB- CPU S7-400 S7-300. SFB- S7-300, CPU S7-400 SFB 14 GET SFB 15 PUT. S7-300 , - .
CPU. STEP 7 ID. .
(two-way connection) ; , CPU S7-400 - SFB 8 SEND SFB 9 BRCV.
- . STEP 7 ID ID . - .
STEP 7 Network Configuration :
PtP- ( ) ( 3964(R) RK 512) SFB-. PtP- (- point-to-point, ) . SIMATIC S7 CP SIMATIC ( Siemens), -, .
S7- MPI, PROFIBUS - Ethernet SFB-. S7- - SIMATIC S7 - -. S7-, .
S7- PROFIBUS - Ethernet SFB-. S7- SIMATIC S7, - PC.
2 STEP 7
30
NCM S7 for PROFIBUS NCM S7 for Industrial Ethernet CP. - NCM :FMS-, FDL-, ISO-, ISO-on-TCP-, TCP-, UDP- email-.
(-). , -, . - Active Connection Buildup ( ) ( , Edit Object Prop-erties, ).
- . , . CPU- SFB 23 USTATUS.
(connection path) , . , STEP 7 :
1) Ethernet;2) Ethernet/TCP-IP;3) MPI;4) PROFIBUS.
CPU, , . Interface (), . CPU - (, CPU S7-400 - ), PLC-internal (PLC-).
Types () , - . , , MPI PROFIBUS, Types () MPI. - PROFIBUS, STEP 7 . Address () MPI- PROFIBUS-.
2.4
31
2.6
2 STEP 7
32
S7, SI-MATIC-, un-specified () ( ).
, (STEP 7 - ). - .
, S7
, S7:
( Siemens, S7 - );
/PC;
SIMATIC S5.
, - , - . , Network Con-figuration, Edit Object Properties ( ) Interfaces ().
2.4.4
, . , S7, MPI.
, PROFIBUS, S7, - -. , , .
, (routing tables), .
S7- , .
2.4
33
- , . (placeholder), PG/PC- - . PG/PC- , - .
- PLC Assign PG/PC (PLC PG/PC). - . PLC Undo PG/PC Assignment (PLC PG/PC). , - , ID S7.ID S7 : . - ID Network Configuration Edit Object Properties ( ) General ().
2.4.5
, PLC ( CPU).
: , . - , .
. , - , STOP.
PLC Download (PLC ) . , , - :
Selected Stations ( ), Selected and Partner Stations ( -), Selected Connections ( ), Stations on Subnet ( ), Connections and Routers ( ).
2 STEP 7
34
System data ( ) Blocks (). - .
MPI . PC - Ethernet PROFIBUS, - . - Set PG/PC Interface ( PG/PC) Windows (Windows Control Panel).
2.5 S7
35
2.5 S7
2.5.1
S7 Program (S7-). - (CPU) CPU. Symbols (), Source Files ( ) Blocks () ( 2.7).
2.7
, -- (block-by-block). -. - Blocks (). CPU , -. .
, (), Source Files ( ). - ASCII, - , . -, Blocks (). STL; LAD FBD, , LAD FBD, - .
2 STEP 7
36
. -, , I 1.0 ( absolute addressing). - Symbols () - (- , , Switch motor on ) ( sym-bolic addressing). Blocks () -, - ( address priority).
2.5.2
; , , ,. (, I1.0) - (, Start signal). - . , .
(local) (global) -. , . - . - . (- Symbols () S7 Program (S7-)).
2.8
, 24 . , -, . 00hex, FFhex (). . - . 80 .
:
2.5 S7
37
I, Q, PI PQ;
, ;
OB, FB, FC, SFC, SFB DB;
UDT;
(variable table) VAT.
; - - .
S7 SIMATIC- Symbols (). , - ( 2.8). S7 .
. , . -, BOOL () , INT () , - 16- . 3.5 , , .
, - ; - . - , .
,
. - . , , . - ASCII- ( *.asc), - (*.seq), (System Data Format, *.sdf MicrosoftAccess) (Data Interchange Format, *.dif Microsoft Ex-cel). -. -.
2 STEP 7
38
Edit Special Object Properties ( - ) .
- (HMI-) - WinCC;
;
;
S7-PDIAG.
View Columns O, M, C, R ( O, M, C, R). Options Customize ( ) , , - .
2.5.3
STEP 7 (Program Editor) LAD, FBD STL. LAD FBD , ; 2.9 .
, ; , .
LAD/FBD , 7 ( CPU - ). , STL.
SIMATIC-, , 1 Windows, Start Si-matic STEP 7 LAD, STL, FBD Program S7 Blocks ( Simatic STEP 7 LAD, STL, FBD S7).
2.5 S7
39
2.9 LAD/FBD
Options Customize( ). Editor () Create Blocks (- ) , , , , , .
Blocks () ( , ), .
, -, , STL. ,
PG
CPU
-
()
()
PLC
PLC
2 STEP 7
40
, , 7 , .
, - : (KNOW_HOW_PROTECT), - ( - 24.1 ).
, -, Blocks (). - , (network). , .
Create Blocks ( ), Options Customize ( ), .
-, CPU, PLC. SIMATIC- - ; .
- PG. , - File Save ( ) CPU, PLC Download (PLC ). - , - CPU, - File Save As ( ). CPU, . - CPU , , , . CPU, - PLC Download (PLC ). CPU RUN (-), . , File Save ( ). 2.6.4 CPU 2.6.5 . 3.3 3.4 , LAD/FBD.
2.5 S7
41
2.5.4
Source Files ( ), Options Customize ( ), Generate source fileautomatically ( ) , - ( ) , .
. - .
Execute () - , .
SIMATIC- Edit Export Source File ( ). ASCII-, , . Source Files ( ) Insert ExternalSource File ( ). , LAD FBD, LAD- FBD-. SIMATIC- File Compile( ). Blocks () STL-. - , View LAD( LAD) View FBD ( FBD). .
Addresses Symbolic( ), . , , , -, , . - . ( -), , .
()
Rewire () - . , - I0.0 I0.7 I 16.0, , I 16.7.
, , , , FC FB.
2 STEP 7
42
SIMATIC- , - ; , , - Ctrl, Blocks () . Op-tions Rewire ( ), , . SIMATIC- .
, -, .
, .
:
Ad-dress priority ( );
, -, , .
2.5.5
Blocks (), Blocks () , , - () .
Absolute address has priority ( ) ( , STEP 7). -, , - , . Symbolhas priority ( ), , -.
:
:
I 1.0 Limit_switch_upI 1.1 Limit_switch_down
I1.0 :
I 1.0 Limit_switch_up
2.5 S7
43
I1.0 I1.1 :
I 1.0 Limit_switch_downI 1.1 Limit_switch_up
, :
I 1.1 Limit_switch_up
Symbol has priority ( ) Absolute address has priority ( ), :
I 1.0 Limit_switch_down
- , Absolute address haspriority ( ) (statement) - ( , ,, ). Symbol has priority ( ), (, - ).
Symbol has priority ( ), - . , .
, , - 7- - . , .
2.5.6
SIMATIC- - (reference data), - . :
(I, Q, M , )
2 STEP 7
44
, Blocks () Options Reference Data Display ( -). - View Filter ( ); - Save asStandard ( ). .
Options Customize ( ) Create Blocks ( ) , - - .
, ; , , .
, - . , ( ), , , ( ) . STL , ; SCL . - , .
, Edit Go To Line ( ) .
, View Filter ( ), , . , , -. STEP 7 , Standard (-), , .
: , . , , - ( ).
I/Q/M , I, Q . , . , , . / , . .
: , (-) .
2.5 S7
45
. - . : . - + -. - , , / . - , , .
/ . .
: ? ? -? ( )?
, , . , , - .
: ? , , ?
, . .
: ( - -)?
2.5.7
SIMATIC- - .
, . , , -, STEP 7 SIMATIC- Language () Options Customize ( ).
2 STEP 7
46
, , STEP 7 - . .
, , . , . *.csy, , , Microsoft Excel. . . . .
SIMATIC- , , , , , , . Options Manage Multilingual Texts Ex-port ( ). . , (2.2).
, , Sym-bolComment.csv .
() Microsoft Excel File Open ( ) ( ). - , .
Options Manage Multilingual Texts Import ( - ). (log-) , .
, , .
2.5 S7
47
2.2 ()
BlockTitle BlockComment NetworkTitle (, )NetworkComment (, )LineComment InterfaceComment
UDT
SymbolComment
SIMATIC- Options Manage Multilingual Texts Change Language ( ). - (, ), - . log-.
Options Man-age Multilingual Texts Delete Language ( ).
2 STEP 7
48
2.6 ()
- , (engineering system, ES). S7 , .
CPU, -. . () CPU , .
2.6.1 PLC
MPI- MPI- CPU. , CPU - . MPI CPU, (MPI-). MPI- - CPU. CPU , - CPU SystemData ( ) Blocks () - Hardware Configuration, - PLC Download (PLC ). CPU - MPI- ( ) .
MPI- CPU MPI- CPU , MPI-. , MPI- . , - , , MPI-.
MPI- CPU . , CPU . - CPU, .
, CPU - PLC Display Accessible Nodes (PLC ). - Accessible Nodes Module (MPI=n) Online User Program (Blocks) (MPI=n) - (). Module () , - . Blocks () CPU. (, ,) .
2.6 ()
49
CPU ,, - -. SIMATIC-, PLC Upload Station (PLC ). CPU .
CPU , - () . MPI- - CPU, S7- Edit Ob-ject Properties ( ) Addresses Module( ) CPU.
S7 Program (S7-), CPU . Blocks () , CPU. , - , ( , -).
CPU , - , CPU . , SIMATIC-, - CPU .
2.6.2
CPU - . , , - . , , . Hardware Configuration, Protection () CPU.
1:
( ). - , - . RUN-P (--P) STOP ; RUN -. , .
RUN Can be revoked with password ( ),
2 STEP 7
50
, CPU, - .
2:
, .
2: /
, .
2 3 2 Can be revoked withpassword, . 8.
, , . CPU PLC Access Rights (PLC ). CPU S7-.
Enter Password ( ) Use password for other protected modules ( - ) , , .
S7-.
, , - CPU, -.
2.6.3 CPU
CPU, . - ( -) S7 ( ).
PLC Diagnose Hardware (PLC ) 2.7.1 .
2.6 ()
51
PLC Module Information (PLC ) (, ), , (- , ), (- , ), ( CPU, , ), ( , , , SFC SFB), (- ), STOP(B-, I- L-).
PLC Operating Mode (PLC ) ( , RUN STOP), .
PLC Clear/Reset (PLC /) () CPU, STOP.
PLC Set Time and Date (PLC ) CPU.
PLC CPU Messages (PLC CPU) , SFC 52 WR_USMSG,SFC 18 ALARM_S SFC 17 ALARM_SQ.
PLC Display Force Values (PLC ),PLC Monitor/Modify Variables (PLC / -)( 2.7.3 2.7.4 ).
2.6.4 CPU
( - ) CPU CPU. - RAM -EPROM, CPU () .
-EPROM, . - CPU ; CPU. CPU -EPROM, CPU, .
RAM - CPU STOP, . -
2 STEP 7
52
. - RAM .
( CPU, - , GD-, ), System Data ( ) CPU (- PLC Download - PLC ). CPU ; CPU .
, PLC System Data ( ). PLC Download (PLC ) , , , - , .
: PLC Save Project onMemory Card (PLC ) ( 2.2.2, , ). - , CPU.
2.6.5
RAM - , - .
CPU - PLC Download (PLC ). - .
. , , CPU - STOP, -. , . . , , .
SIMATIC- SCL - Blocks () CPU. CPU , - SCL. - SCL- , , - .
2.6 ()
53
STL ( CPU), , . , , - ; ( , , , ).
, , - , (, - , , ).
RAM, - . -EPROM, , - RAM. -EPROM (invalid). , -EPROM .
-EPROM -.
CPU, - . , ( ), - . , .
, . - Compress (). RUN, ; - STOP.
- PLC Module Information (PLC ), Memory(). , , .
2 STEP 7
54
, , SFC 25 COMPRESS.
/
(initialvalue) (actual value) ( 3.4 - ). CPU, - , . - , , .
CPU , - . - View Data View ( ). CPU, .
-EPROM, -, , - CPU. , - . . S7-300 , -.
, UNLINKED (), ; . - SFC 20 BLKMOV.
2.7
55
2.7
CPU - () , , , -, . - , , , . CPU STOP , , , CPU.
. , , , CPU 1. 1 - , , , , , .
PLCSIM - CPU - .
2.7.1
- Diagnose Hardware ( ). - MPI SIMATIC-.
, - , View Online ( ). PLC DisplayAccessible Nodes (PLC ) CPU. PLC Diagnose Hardware (PLC ) ( ). - Hardware Configuration - ; SIMATIC- View () Options Customize ( ). , -, ( , - ), (, ) - ( ).
2 STEP 7
56
2.7.2 STOP
CPU - STOP, - STOP - . CPU , STOP , . - , PG , S7- Diagnostic Buffer ( ) PLC Module Information (PLC ). ( - 1) STOP, , STOP because program-ming error OB not loaded (STOP, -). , STOP, ,, FC not loaded ( FC). , . , - Open Block ( ) - .
STOP , , , - Stacks (). - Stacks () B- ( ), - , . I-stack (I-) , -, CPU (, , , ) - . L- ( ) , B-.
2.7.3
VAT. -. , - , - .
: , .
VAT, . - 255 ( VAT 1 VAT 255) . 1024 255 ( 2.10).
2.7
57
VAT , Blocks () Insert S7 Block Variable Table ( S7 ), VAT S7 Program (S7-) PLC Moni-tor/Modify Variables (PLC / ). , ( ), ( View DisplayFormat Display Format ).
, . , . , - . Table Save (- ) Blocks ().
2.10
, , - PLC Connect To (PLC ). VAT , PLC Disconnect (PLC ).
()
, Variable Trigger ( -), - . , CPU .
2 STEP 7
58
, -.
, - . Start of circle ( ), 1. - End of circle ( ), 1 .
Variable Monitor ( ). VAT - . - . , Display format ( ). ESC - .
Variable Update Monitor Values ( ) , - .
CPU, , - Variable Modify ( ). , , . // Variable Modify Values as comment ( -); . - , Display format ( -).
, -. ESC .
Variable Activate Modify Values ( ) , .
2.7.4 ( Force)
CPU - .
2.7
59
( ). - CPU .
: , - .
(VAT). VAT, - CPU. Variable Display Force Values ( ), , - .
CPU , . - - . VAT Table Save As ( ).
:
I ( )(S7-300 S7-400)
Q ( )(S7-300 S7-400)
PI( S7-400)
PQ(S7-300 S7-400)
( S7-400)
Variable Force ( ). CPU .
, :
- (, ) (-, ) - .
S7-400 (, ) - (, SFC )
2 STEP 7
60
. S7-300 - .
S7-300 : CPU - ; CPU - .
: - CPU! Variable Delete Force ( ). , , CPU . - , .
/, CPU. ( , ), .
, , , (, ), . ( ), , (error substitute value), - , CPU - STOP.
, , (, ), . , - .
- . , -, , , , () , - .
I , - PI, ;
2.7
61
. , .
PQ, Q ( ). - Q ; ( ). - , - .
0 - OD ( STOP, HOLD RESTART -, ) - (: OD ). OD , - .
STOP Enable PQ ( PQ), - STOP ( - OD). Enable PQ ( PQ) - (safe) ( 0 ); - RUN.
2.7.5
STOP OD; OD , , , CPU - STOP. . , CPU. -: STOP -.
: , !
(PQ) - . - PLC Connect To (PLC ), , , - CPU, , PLC Operating Mode (PLC ) STOP.
OD Variable EnablePeripheral Outputs ( ); 0, - .
2 STEP 7
62
Variable Activate Modify Values ( ). .
Variable Enable Pe-ripheral Outputs ( ) - ESC. OD , - 0, .
- STOP, (), OD - RESTART RUN.
2.7.6 LAD/FBD
Program status ( ) . - (network).
, , CPU, . , , SIMATIC-. - .
(network), . Debug Monitor ( ). -. ( , ) - LAD/FBD Options Customize ( ). , Debug Monitor ( ). , Debug Call Environment( ). , . , . , Nocondition ( ).
. Debug Modify Address ( - ).
. : . (debugmode) . , , , . (process mode) -
2.7
63
, , , ( ).
CPU, , - CPU Protection (). CPU, . . - Debug Operation ( ).
3 SIMATIC S7
3 3
3 SIMATIC S7 ............................................................................................................. 43.1 ........................................................................................................... 4
3.1.1 ..................................................................................... 43.1.2 .................................................................................................... 63.1.3 .................................................................. 8
3.2 ..................................................................................................................................... 103.2.1 .................................................................................................................. 103.2.2 ......................................................................................................... 123.2.3 ........................................................................................................... 143.2.4 ........................................................................................................ 17
3.3 .................................................................................. 213.3.1 ................................................................................................. 213.3.2 LAD................................................................................. 283.3.3 FBD ................................................................................. 31
3.4 .................................................................................... 353.4.1 ........................................................................................................... 353.4.2 .................................................................................................... 353.4.3 .................................................................................................................... 36
3.5 , ............................................................................ 383.5.1 ................................................................................ 383.5.2 ................................................................................................ 393.5.3 ..................................................................................................... 433.5.4 .................................................................................................. 443.5.5 ................................................................................................ 523.5.6 ................................................................................................ 573.5.7 ................................................................................. 57
3 SIMATIC S7
4
3 SIMATIC S7
CPU SI-MATIC S7-300/400, ( ), - () . - LAD FBD. .
- ; - , -. .
3.1
CPU (op-erating system) (user program).
, , - . , , . - CPU, . , , , .
, () .
3.1.1
, - CPU . , ( 3.1). , , - (priority classes), - ( mutual interruptibility), - .
(main program), CPU. , CPU
3.1
5
() () .
3.1
-
-
-
3 SIMATIC S7
6
(organizationblock OB). . CPU . -, .
CPU (startup routine). , - CPU - . , , S7-300 ( complete restart); S7-400 - , ( warmrestart).
1, . (, network) 1. 1( ) CPU , , , 1.
, , (interrupts) (errors).
( ), - CPU ( watchdog interrupts, time-of-day interrupts ).
, . - , , , - . . , , - .
- CPU; CPU - STEP 7.
3.1.2
3.1 SIMATIC S7 -. - CPU . ; CPU -; CPU.
3.1
7
3.1 SIMATIC S7
-
1 1
TOD- 10 17
(, ) 2 2 24
- 20 23
, 3 6 2 24
- 30 38
- (, 100 ) 7 15 2 24
- 40 47
I/O- (/) 16 23 2 24
- 60
- 25
- 70 72 73
- I/O- CPU
252825
2 262 282 26
80,8184,86,87 85
, (, time er-ror, SE-, , / , -/)
262)262)262)
262 26
24 26
90
29
1)
- 100,101, 102
27
- 121, 122
, - (, I/O)
,
1) . 2) : 28
90 ( ) 1, 1, .
100 (- ) 101 ( ); 27. , , 28. - .
CPU. (-
3 SIMATIC S7
8
) . ; CPU 85 (Program Processing Error - - ) STOP.
(L-). 18.1.5 .
3.1.3
CPU , -. CPU ( Hardware ()), - . .
CPU . - STEP 7 .
Startup ( ) ( , , -); Ready () ; - (- CPU ).
Cycle/Clock Memory (/ , )/ ; ; ; ; .
Retentive memory ( ) , ; .
Memory () ( ); L- .
Interrupts () , , ( ) .
Time-of-Day Interrupts ( ) , .
3.1
9
Cyclic Interrupts ( ) , .
Diagnostic/Clock (/ ) STOP; ; .
Protection () ; .
Multicomputing ( ) CPU.
Integrated I/O ( /) /.
CPU , - , .
3 SIMATIC S7
10
3.2
. STEP 7 . -. (Blocks). , , .
3.2.1
STL -:
(user blocks) .
(system blocks) .
(standard blocks) ( ) , (FM) - ().
- () . - -:
(Organization blocks - OB)
- . CPU , , - . - 1. , , .
3.2
11
(Function blocks - FB)
, - . (variable memory), . - , , (call) . , ( , ). - (instance data block), (call instance) (instance). ; (local instance).
(Functions - FC)
. . ( ) . - . . .
(Data blocks - DB)
. , - ( , ). :
1) (global data blocks),2) (instance data blocks).
, , - . , .
CPU. ; CPU. - . () .
3 SIMATIC S7
12
. - ( , SFC, , SFB) ( , SDB). - , - CPU .
SFC SFB, , . (usermemory); SFB - .
SDB , - . STEP 7 . , , , . , SDB (load memory). -.
( ). , - STEP 7 (, IEC- - S5/S7).
25 , - (Standard Library).
3.2.2
(code blocks) ( 3.2):
(block header), , , ;
() (declaration section), () ();
(program section), .
3.2
13
3.2
Declaration ()
, , , -
Block header ( )
Program ()
&
=&
Block type Address ( )Block header
Var_xxx
name: Data type := Initialization;name: Data type := Initialization;
END_VAR
BEGIN
Program
END_Block Type
Declaration
, , , -
Block header DATA_BLOCK Address ( )Block header
STRUCT
name: Data type := Initialization;name: Data type := Initialization;
END_STRUCT
BEGIN
name := Initialization;
END_DATA_BLOCK
3 SIMATIC S7
14
:
(block header) ;
() (declaration section) - , ;
(initialization section), .
. - (declaration view) - (data view) ( ).
3.2.3
. - File Prop-erties ( ) ( 3.3). General Part 2 ( 2) :
Local Data ( ): (- );
7: ( );
Load memory requirement: ;
Work memory requirement: .
KNOW HOW Protection ( -) . , , . () (declaration table) . - - KNOW_HOW_PROTECT. , , , (- !).
, Siemens, Standard Block ( ).
DB is write-protected in the PLC (DB PLC ) - . , .
3.2
15
. . , .
3.3
, Unlinked () ; . , , , SFC 20 BLKMOV.
General Part 2 ( 2).
Name () ; , . .
Family () . , (program elements catalog).
3 SIMATIC S7
16
Author () .
. , .
Version () 0 15.
General Part 1 ( 1) - (time stamps): , . - , , . - (time stamp conflict).
1 2. . - multi-instance capability ( , - DB ), -, 2. multi-instance capability, -, . 1 - - ( STL).
Calls () , , .
. Attributes () , , , SIMATIC PCS7.
,
. SIMATIC-, Edit ObjectProperties ( ) General Part 2 2. .
(Properties) Blocks (). Blocks () Edit Object Properties ( ). Blocks () Size in work memory ( ) Size in load memory ( ).
3.2
17
, ( ) . Blocks (), ( ). - SIMATIC- , Ctrl.
, ( ), SIMATIC- CPU Memory (), PLC ModuleInformation (PLC ).
(Checksum)
(Program Editor) Blocks (). , . . , Blocks () Edit Object Properties ( ).
3.2.4
(block interface) - . (, - ), - . . ( 19 ).
- . : ( ), , - . - , .
(Time stamp conflict) , - - . , . . , , , ,
3 SIMATIC S7
18
, .
, , - , . -, ( ), . , - , :
, ;
;
( , , -);
( - );
UDT , UDT; , , UDT.
UDT-. Edit BlockCall Update ( ). , ; . .
, . , Check block consistency ( ). , .
Blocks () - Edit Check Block Consistency ( - ). , , 5 SP3 STEP 7. , ( ,
3.2
19
Check block consistency ( ) - ), Program Com-pile ( ). - 1:Compile (1:). - .
- ( 3.4). -.
3.4
(reference tree) -: , .: DB 20/FB 20 1, FB 21 FB 22 FB 20.
3 SIMATIC S7
20
(dependency tree) , . , . : FB 32 DB20/FB 20, 1. DB 29, FB 20.
, , , - . - ( ) , - .
, - Edit Open Block ( ) - , , .
3.3
21
3.3
2.5 S7 - .
3.3.1
. SIMATIC-, File Open ( ). , - :
SIMATIC- Blocks(), Insert S7 Block ( S7 ) . (Properties) . General Part 1 ( 1) LAD FBD. .
File New ( ), ( -, , ). . , Create Block ( ), Options Customize ( ).
, , File Properties ( ).
, ( 3.5). :
() (variable decla-ration table). .
(program window). .
(program element catalog). STL .
3 SIMATIC S7
22
3.5 LAD
()
. - , , , - . . - ( 3.2).
3.2
Input parameters( ) in - FC FB
Output parameters( ) out - FC FB
In-out parameters(/ ) in_out - FC FB
Static local data( ) stat - - FB
Temporary local data( ) temp OB FC FB
3.3
23
(variable types) . - , - .
, , () ( ). (, - ). 19 .
( ), . , 8 16 , BYTE () - . () BOOL () BYTE (), - . ( ).
, (network), () , . - View Comment( ), View Symbolic Representation ( -) View Symbol Information ( ). - , View Zoom In( ), View Zoom Out ( ) View Zoom Factor ( ).
()
LAD/FBD- , - ( ). - , 1. 999 . (network title) (network comment). , Edit Go To ( - ). .
, Display with comments ( -), . - . . - (current path) LAD (logic operation) FBD.
3 SIMATIC S7
24
Insert Network ( ). .
, . , () - Block End ( ), (-, , ).
(Network templates)
, - , , , , .
, , , , S7- Source Files ( ).
, , () . , , %00 %99. .
, , , . , () ( -).
, . ; Ctrl - .
Create Network Template ( ). - . - ( SourceFiles ( ) ).
, (Program Elements Catalog) - ( -). , - . .
3.3
25
(Absolute addressing)
(ID) / . , . , -.
. . Type check for address ( ) LAD/FBD, Options Customize ( ).
(Symbol addressing)
- , - . - . Options Symbol Table ( ), .
View Display Symbolic Representation ( -). View Display Symbol Information ( ) ( ) .
, , Insert Symbol ( -), Insert Symbol ( ) , . -, View Display Symbol Selection ( ).
, LAD/FBD. - , , . - , .
, LAD/FBD, STL.
3 SIMATIC S7
26
(programoutput), , , , ( ), Edit Call Update ( -). - UDT.
Edit Call Change to Multi-Instance Call ( - ) Edit Call Change to FB/DBCall ( FB/DB) - -. - .
, - View Catalog ( ) Insert Program Elements (- ). , - ( ).
LAD FBD, , , Blocks (), ( 3.6).
3.3
27
3.6 LAD FBD
3 SIMATIC S7
28
3.3.2 LAD
LAD, . - . (current path) (rung) (power rail). , ,
(, F2 (normally open - NO) -),
,
( Insert Program Elements orView Catalog ( )).
(coil) (box). 3.3 -.
(-). - , (label).
(Contacts)
, (inputs), -. - .
(normally open contact), - 1 ( ); (normally closed contact), 0 ( -). , ( ) - ( NOT ()).
(Coils)
, (outputs). , , .
3.3
29
, , (Setcoil) (Reset coil), . - , -, .
(Boxes)
LAD . STEP 7 - :
EN/ENO, , , - , ;
EN/ENO, , MOVE (), , .
( FC, FB, SFC SFB), LAD EN/ENO. , LAD (Empty box), .
3.7 LAD
(Contacts)
NO
NC
(, -)
NOT
(Coils)
- (,, , -)
FP
JMP
(Boxes)
- EN/ENO (-, )
- (, - )
ADD_IEN ENOIN1 OUTIN2
- EN/ENO (-, )
S_PULSES QTV BI BCDR
DB m
FB nEN ENOin1 out1in2 out2in3 out3
3 SIMATIC S7
30
3.8 LAD
LAD . , ( ) . LAD. , ( ), .
: LAD , ( , ). , LAD, .
-
;
- , - ( );
- ENO EN ;
() ENO.
SRS Q
R
Ready_rem
Network 2: Parts ready to removeWhen the parts have reached the end of the belt, they are ready for removal.
Load
/Mfault1
NEM_Loa_N
RemoveP
EM_Rem_P
Basic_st
3.3
31
- ENO: ENO () , , , - ( 15.4 ).
3.3.3 FBD
, - (- , ) . -
( , F2 AND()),
(Insert FBD Element AND Box FBD AND)
Insert ProgramElements ( ) View Catalog ( -).
- (assign box). 3.3 .
(). : - , (labels).
() , , , - AND (),OR () Exclusive OR ( ). .
, 1 . - .
3 SIMATIC S7
32
3.9 FBD
, , . .
, (), , , .
. STEP 7 -:
EN/ENO ( , , )
EN/ENO ( MOVE, , - ).
-
, ,, ,
()
EN/ENO (, - )
(, - )
ADD_IENIN1 OUTIN2 ENO
EN/ENO (, - )
S_PULSES BITV BCDR Q
DB m
FB nEN out1in1 out2in2 ENO
AND, OR, OR
&
>=1
XOR
=
CU
JMP, ..
3.3
33
(FC, FB, SFC SFB), FBD EN/ENO.
, FBD (Empty box), .
3.10 FBD
FBD . , .
. .
- ( ). , - . , -. , FBD, - .
,
;
- , - ( );
ENO EN ;
Network 2: Parts ready to removeWhen the parts have reached the end of the belt, they are ready for removal.
SRS
R Q
Ready_rem
Load
/Mfault1
EM_Loa_N
Remove
EM_Rem_P
Basic_st
N
P >=1
3 SIMATIC S7
34
AND OR ENO.
, , - ( 15.4 ). - ENO: AND - ENO , , - OR ENO , ( ) .
3.4
35
3.4
2.5 S7 - . (data blocks) - LAD FBD.
3.4.1
. SIMATIC-, File Open ( ). , - :
SIMATIC-: Blocks(), Insert S7 Block Data Block ( S7 ) . (Properties) . General Part 1 ( 1) . DB. - .
: File New ( ), . Object Name ( ) . .
, . - , File Properties( ).
3.4.2
, New DataBlock ( ); , .
:
Data block ( ) ; () ;
Data block with assigned user-defined data type ( , UDT) ; UDT (User defineddata type);
3 SIMATIC S7
36
Data block with assigned function block ( - ) ; , .
3.4.3
3.11 . :
(declaration view), - , ;
(data view), .
3.11 ( )
3.4
37
. - , .
, , - - .
UDT - ( ) UDT.
: - .
(Declaration view), View Declaration View ( ), , , , (UDT) .
(Data view), View DataView ( ), - . - . , CPU. - .
: - . , ( - FB/DB) - . View Data View ( ) Actual value (). Edit Initialize Data Block ( - ) .
3 SIMATIC S7
38