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

-

681.5(07)
825

.. , .. , ..


2010

658.564(075.8) + 681.51(075.8)
825

- .
:
.. , ..

, ..
825
: /
.. , .. , .. . :
, 2010. 186 .
140604

.
, ,

, ,
. , PROFIBUS-DP.
, ,
.
658.564(075.8) + 681.51(075.8)

, 2010



,
.
, Siemens
(), Omron (), Automation Direct ().
() - .
,

- . ,

. ,
, ,
, ..
,
, ,

.
,
,

.

1. 1.
SIMATIC S7-300
1.1.
Siemens SIMATIC S7-300.
STEP7 v.5.3.
1.2.
) ,
Siemens SIMATIC S7-300.
) .
) :
;
.
) :
STEP 7 v. 5.3;
;
;
;
. (/) .
1.3.
. 1.1
Siemens SIMATIC S7-300.
:
1 IBM;
2 (CPU) ;
3 ;
4 ;
5 .
:
SITOP;
CPU314 ( 314-104-00);
4

SM321 DI32xDC24V (
321-1L00-00) 32
24 ;
SM322 DI32xDO32B/0,5 (
322-1L00-00) 32 24 c 0,5 ;
/ SM334 AI4/A02x8bit (
334-0E01-00) 4 2 ;
220 ,
50 ;
.

. 1.1.
, .
CPU314 48
8 . LAD/FBD/STL
(KOP/FUP/AWL ). ,
4- .
8. /
1024, 256, 256
10 9990 , 256 0 999,
() 256 .
. 1.1 .

PIW

Q
PQW

,
I0.0I127.7
PIW256PIW766
Q0.0Q127.7
PQW256PQW766

0255

0255
0.0255.7

1.1

,






:
, ,
, ,

()

SIMATIC S7300 .
() SM321
I0I3 (. 1.2). I0 I1.
. 1 24 7 .
() Q4Q7. Q4
Q5. (. 1.3) , .

- .
. 48
4 .


I0

I2

I1

I3

. 1.2. SM321 DI32xDC24V

Q6

Q4

Q 5 Q7

. 1.3.
SM322 DO32xDC24B/0,5
/ SM334 (. 1.4) . ( )
. 1.4.
,
. ,
7

/
/

.
.

. 1.4. /
SM334 AI4/A02x8bit

. 8 I0.0I0.7 8 I1.0I1.7. 16 Q4.0Q4.7
Q5.0Q5.7. .
1.4. STEP 7 v 5.3
SIMATIC Manager. SIMATIC Manager
Windows
SIMATIC Manager.
SIMATIC Manager [ SIMATIC] , STEP 7. STEP 7 (STEP 7 Wizard) (. 1.5),
STEP 7.
8

. (review)
. , Next [].

. 1.5. STEP 7 (STEP 7 Wizard)


CPU (. 1.6) ,
. MPI 2. Next,
.

. 1.6. STEP 7 Wizard


OB1 (. 1.7).
: (LAD), (STL) (FBD). Next.
Project name [ ] (. 1.8), , , Master S7-300.
Make [],
.
9

. 1.7.

. 1.8.
S7 CPU
(. 1.9). + .
Master`a S7-300
Master S7-300 . :
[]. ,
HW Config.
Catalog, SIMATIC.
10

. 1.9. SIMATIC Manager


SIMATIC 300/RACK-300
( ) Rail. , Drag&Drop,
. .

Rail .
(. 1.10) CPU :
1) Slot (3- );
2) Module CPU;
3) I address ;
11

4) Q address ;
5) Comment .

. 1.10. HW Config
PS ( )
(, CPU) Hardware Catalog. ,
.
(Order number), . , Drag&Drop, ( ).
STEP 7 , (CPU S7-300, , 2).
.
, , - (
) Insert Object [ ] Replace Object [ ].
.
,
.
!!! , , ,
.

Station [] Consistency Check
[ ]. , .

Station Save Station Save and Compile.
12

1.5.
(
) STEP7 v5.3.
, ,
,
. ,
() .
OB1. OB1 SIMATIC Meneger (. 1.9) CPU, S7 Program , Bloks.
OB1. OB1.
(. 1.11).

. 1.11.
13

View []
LAD/STL/FBD. LAD ( ) , STL ( )
() , , FBD ( ) -. STEP7 v5.3 .
LAD.
(LAD) . , .
( ).

New network.
:
Q4.0 = I1.1 I1.3 + I1.2
1) () () (. 1.12).

Coil []

. 1.12.
2) ( ) , ( ) (. 1.13).

. 1.13.
3) ,
Normally Open Contact [ ] (. 1.14).

. 1.14.

14

4) .
, ( ),
Open Branch [ ] (. 1.15).

. 1.15.
5) ,

Close Branch [ ] (. 1.16).

. 1.16.
6) , () (. 1.17).

. 1.17.
7) ,
Normally Closed Contact [ ] (. 1.18).

. 1.18.
15

8) . ??.?
( ENTER)
(. 1.19).

. 1.19.
STEP7 , .
I1.1 Key1 [ 1], I1.3 Key2 [ 2], I1.2 Switch
[], Q4.0 Lamp [].
, Ctrl-Alt-T OptionsSymbol Table ( Options Symbol Table). (. 1.20).

. 1.20.
:
1) (Symbol) : Key1;
2) (Address) : I1.0 (
BOOL ;
3) (Comment) 1.
(. . 1.21).

16

. 1.21.
(Symbol TableSave).
. (. 1.22).

. 1.22.
-
: EditDelete. :
EditUndo.

.
:
Key1, Lamp ( Q4.0), Key2, Lamp ( Q4.2)
. SR :
1)
;
2) Lamp Q4.2;
3)
Program Elements ;
4) : Bit logic
(SR )
;
5) SR (. 1.23) ??.?
;

17

. 1.23.
6) S
Key1, R Key2 (. 1.24).

. 1.24.
, , Delete.
1.6.

CPU. 256
16- . 0 11 , 12 13
( ), 14 15 .
, - (BCD) .
BCD
:
S5T#aH_bbM_ccS_dddMS,
=, bb=, = ddd= .
0 9990 , 2H_46M_30S.

.
. 10 , 10 . (. . 1.3).
1.3

18

RUN , , ,
, .
STEP 7 5 .
(. 1.25).

S , TV ( ),
R , Q ( ),
BI ,
BCD -

. 1.25. /
R. 1 R , , .
, R BI BCD.
. 1.26 30
, .

R (RESET) (. 1.31).

. 1.26.

19

. 1.27.

. 1.28.

. 1.29.

. 1.30.

. 1.31. 5
1.7.

CPU. 256
16 ,
0 11. 999, 20

0999. , , 127
: #127, # BCD .
3 :
( );
( );
(/ ).
. 1.32 3- .

. 1.32. : ) , ) , )
. 1.32 : C10
, S_CU, C_CD, S_CUD , CU , CD
, S , PV () ,
R , Q () , CV
, CV_BCD BCD.
#<>,
(I, Q, M, D). S
PV. CU
1, , 999. CD 1,
, 0.
R ( 0).
,
, .
Q 0,
0, 1, 0.
1.8.

CPU . .
SM334, , , , .
21

, .
.
:
1.4

0
1
2
3


+ 2
+ 4
+ 6

:
1.5

0
1


+ 2


/ .
, . 1.33.
MOV Network 1 , PIW288
QW5. + SM334
QW5 SM322
, .
MOV Network 2
IB1 ( )
() PQW288.
/ , IB1,
.

22

.1.33.

1.9.

STEP7 ,

. , ,
. ,
(, ) .
FB, 1.
FB (DB),
.
, FB1, .
Bkl [] Bkl_on
[].
Fakt Zadanie
Est. Otkl []
Neispr []. ,
FB .
, (. 1.6). 1 . 1.6
23

, .
1.6
1
Simbol
Address
Data type
Comment
BD_Bkl
I0.0
BOOL

BD_Otkl
I0.1
BOOL

BD_Neispr
I0.2
BOOL

BD_Fakt
MW0
INT

BD_Bkl_on
Q4.0
BOOL

BD_Est
Q4.1
BOOL

BD_Bent_on
Q4.2
BOOL

BD_Timer_Bent
T1
TIMER
DD_Bkl
I1.0
BOOL

DD_Otkl
I1.1
BOOL

DD_Neispr
I1.2
BOOL

DD_Fakt
MW2
INT

DD_Bkl_on
Q5.0
BOOL

DD_Est
Q5.1
BOOL

DD_Bent_on
Q5.2
BOOL

DD_Timer_Bent
T2
TIMER
FB1 Blocks,
, Insert New Object > Function Block FB1 . FB1.
FB1.
Properties-Function Block , , Multiple instance FB [ FB]
, OK. FB1
Blocks.
FB1 FB1. . (. 1.34). (Bool, Int ..) Elementary Types [ ],
.

24

. 1.34. FB1
, .
( # ). # .
, . 1.35.

. 1.35. FB1
FB1 1 .
(DB) .
FB1 . .
25

Blocks
.
, Insert New Object > Data Block. DB1
, Instance DB [ ]
FB1. ,
Properties [], OK. DB1 . DB1, . FB1 OK.
1500 Actual
Value [ ] Zadanie. . DB1 .
, DB1, DB2
FB1. 1200 .

1. . 1.36.

. 1.36. FB1 1
SIMATIC Manager .
Blocks 1. .
, . FB1 1.
Bkl, Otkl Neispr.
??? , ,
, ,
Insert Symbol. .
.
, ,
. 1.4.
(FB1)
.
26

, . 1.37.

. 1.37. FB1 1
1.
, ,
. ,
.
, .
,
Blocks . .
Insert New Object > Function.
Properties Function [ ] FC1,
, . OK. FC1
Blocks.
,
, . 27

4 .
FC1.
FC1, .
. (. 1.38).

. 1.38.
. ( # ). ,
. 1.39.

. 1.39. FC1
FC1 1 . 1 , . 1.4.
SIMATIC Manager. Blocks 1.
. , FC Blocks. FC1
28

1. Bkl_on. FC1, . 1.4


.

FC1, .
, . 1.40.
.

. 1.40. FC1 1
1.10. SIMATIC S7-300

SIMATIC S7-300
.
. 0 1. 0.

1, 1 5
0. 0 .
1, 5 0. 0 1 ..
10 1
0 .

29

()
10, () 1 .
= ( + )
() 0, ,
1.
= ( 0 + ) 1
() 5
1 0.
= ( 1 + ) 0
() 0
10 1 .
.
= ( 0 + )
(. 1.41) . 10. 1, .
.
, 0.

= ( 0 + ) 1
= ( 0 + )
.
. 1.7 SIMATIC S7-300.

1.7
,

I0.0 I0.1 I0.2


Q4.0
Q4.1 Q4.2 M0.0 M0.1
M0.2
0 1

30

. 1.41.
31

1.11.

CPU. :
MRES. , STOP
( 3 );
3
MRES. STOP CPU . STOP , ,
CPU .
, ,
CPU SIMATIC
(MMC) .2.6 2
PROFIBUS-DP.
:
SIMATIC 300 Station CPU314 S7 Program. SIMATIC Manager Blocks [] .
STOP;
PLC () Download [], PU. Yes
.
RUN.
. RUN
.
, , .
1.12.


. 1.8 .


1
1

15
2
2

3
3

1
4

26
2
5

32

3
6

1
7

37
2
8

3
9

1.8
48
1
2
3
10 11 12

. .
. SIMATIC S7-300.
.
.
/
. ,

,
, QW5.
1.
. ,
. , .
.
0 ,
.
, .
. 2 , . 1 ,
. . 2
0. .
.
2. . 1 , 2 .
. 10 1, 10
2, 3 4. 4 (..
40 )
. .
3. .
() .
0 ,
1 , 33

, 0. 2 . 10 , 10 .
0.
4. - .
0 1. 0. 0 1, 2 ,
0, . .

0.
5. ( ).

, , .

, .
.
6. () /
.
() .
5
. , 2 .
: , 5 .
, 2 .
7.
(), 13. 1 34

, 0 . , , . 1.9.

1
2
3

0
0
0

1
1
0
0

2
0
1
0

3
0
0
1

4
1
0
1

5
1
1
0

6
0
1
1

7
1
0
0

1.9
8 9
0 0
1 0
0 1

.
6 . . .

. .
.
8. ( )
. /
,
. / .
( 3
, ).
.
, 2 ( ) . .
( ) 2 ,
( ).
, ,
( 5 ).
. .
9.
1.
1 0, 0. 1
, 1,
2 3.
1 .
0 1, 1 -

35

1.
1 1 , 2 1 . - 3, 1
, 3. 2 3 1.
.
10. -
.
= 0 0 = 120 0 . ()
, = 180 0 . 3
= 0 0 . 3 ,
= 120 0 = 180 0 .. 5
( - = 0 0 ) .

.
= 0 0 .
11. , 3 0, 1 2. .

0.
1, 3 , 2, 4 , 0, 5 , 1,
3 .. .
0
.
12. .
, . ,
. ( ), ( ).
,
, . 36


( ), ( ). .
.
.
1.13.

:
) ;
) , , ,
;
) ;
) ;
) ;
) -
SM 334;
) .
1.14.

1. ?
2. ,
?
3. ?
4. ?
5. ?
6. CPU?
7. SIMATIC S7-300
0,07 ?
8.
0 1?
9. - ?
10. - ?
11. (FB) ?
12. (FC)
?
37

2. 2. PROFIBUS-DP
2.1.
PROFIBUS-DP
.
2.2.
)
PROFIBUS-DP, .
) ,
.
) :
, ,
;
Master' Slave'.
) :
Master Slave, ;
,
, Simatic
Manager ;

;
, () ,

, .
2.3.
. 2.1 .
, PROFIBUS-DP.
:
PS 307
5 ;
38

39
. 2.1.

SIMATIC S7-300 (Master S7-300), CPU 315-2DP ( 315-2G10-OABO), / SM323 DI8/DO8xDC24V ( 323-1BH01-OAAO)
SM322 DO8xDC24V/2A ( 322-1BF01-OAAO);
SIMATIC S7-300 (Slave S7-300),
CPU 315-2DP ( 315-2G10-),
DI16xDC24V ( 321-1BH50-OAAO)
SM322 DO16xDC24V/0,5A ( 322-1BH10-OAAO);
200 (Slave 200), IM153-2F O ( 153-2BBOOOXBO) / SM323 DI16/DO16xDC24V ( 3231BL00-OAAO);
;
;
IBM ( , , , );
;
.

RS485, . OBT
- . . 2.1 :
24 ;
( ) PROFIBUS-DP;
- ;

200 .

DP CPU, .
2.4. STEP7 v 5.3

SIMATIC Manager. SIMATIC Manager
Windows :
SIMATIC Manager (. 2.2).
!!!
( ), ,
Cancel [].
File
[] New. .
.
40

. 2.2. SIMATIC Manager


:
, Insert new
object [ ]. SIMATIC 300 Station. . , ,
. , , Master S7-300. SIMATIC 300
Station PROFIBUS, Slave S7-300 Profibus (1) .
Master`a S7-300
Master S7-300 . :
[].

HW Config.
Hardware Catalog [ ]. ,
SIMATIC.
SIMATIC 300/RACK-300
Rail [ ].
, Drag&Drop, . .
.

, .
(. 2.3) CPU :
1) Slot (3- );
2) Module CPU;
3) I address CPU;
4) Q address CPU;
5) Comment .
(. 2.3) PS ( )
(, CPU) Hardware Catalog. , . , Drag&Drop , ( ).
!!! ,
, .
41

, , , , .

. 2.3. HW Config
STEP 7 , , CPU S7300 2.
.
!!!

Hardware Catalog . ,
.
!!! , , - (
) Insert Object [ ] Replace Object [
]. . ,
.
!!! , , , .
CPU Master'
Profibus (1). DP
Properties PROFIBUS interface DP (RO/S2.1)
Profibus (1) OK. ( ), .
/ STEP7
. .
Profibus (1) Slave 200. PROFIBUS-DP 200
Drag&Drop
42

( 153-2BB00-0XB0) DI/DO300 SM323 ( - ).



Station [] Consistency Check
[ ]. , .

Station Save Station Save and Compile.
Slave S7-300 SIMATIC S7300 Slave' (I-Slave). DP-Master .
, Master' (. 2.4).
CPU Slave' Master- DP.

. 2.4. CPU 315-DP, I-Slave


(I) (Q). STEP7 PROFIBUS :
32 ;
()
32 ;
244 244 .
(. 2.1) . I Q .
2.1
1
2

Master-
I100
Q100

Slave-
Q100
I100
43

2
2

. 2.1 CPU Master- DP


CPU I-Slave- DP .
I Q, . , CPU315-2DP /
2048 /2048 .
S7-300/CPU 315-2DP Slave
. DP ,
DP-Master' ( ) DP-Slave. DP CPU315-2DP. Properties-DP Master. Operating Mode [ ] DP-Slave.
DP-Master DP-Slave.
Configuration []. New
Properties-DP (Ro/S2.1) Configuration Row1
, , Input 100,
Length: 2, Unit: Byte. OK
, New , , Output 100, Length: 2, Unit:
Byte.
OK HW Config.
HW Config Station,
Check Consistency, ,
. Save Save and Compile SIMATIC Manager.
Slave S7-300
Profibus (1). HW Config
Master' S7-300. PROFIBUS-DP,
Configured Stations, CPU31-2DP () DP-Master' Drag&Drop. DP
slave properties Connection, Slave'. Connect. Slave . Configuration
Edit Master'
. 2.5.
Row Mode Partner DP a Partner addr Local addr Length Consiste
1
MS
2
Q100
I100
2 Byte
Unit
2
MS
2
I100
Q100
2 Byte
Unit
. 2.5. Configuration, DP slave properities,
HW-Config
-. . ,
44

DP-Master'
DP-Slave .
HW Config [Master (Configuration)]
OK. Slave PROFIBUS-. . STEP7 , .

. ,
.
Master S7-300 Slave S7-300
. .
2.5.
. 1 Simatic S7300 .
Master' Slave' CPU /.


.
IB0 QB4.
, IB0 Master' QB4 Slave' .
. 2.6
1 Master' (. 2.6) Slave' (. 2.6) MOVE.
Master' Slave'
( ) SFC14 SFC15
(SFC System Function Call).
SFC14
() (. 2.7).

45

. 2.6.
MOVE: ) 1 Master', ) 1 I-Slave'

46

LADDER (. 2.7) ( ) , w#16#64.


RECORD . 2.7) , , P#M40.0 BYTE8.
RET_VAL (. 2.7) ,
, MW60.

. 2.7. SFC14
SFC15 () (. 2.8).

. 2.8. SFC15
LADDER (. . 2.8)
( ) , , w#16#64.
RECORD (. . 2.8) , , , P#M80.0 BYTE8.
RET_VAL (. . 2.8) ,
, MW70.
. 2.9 Master'
Slave' SFC14 SFC15.

. 2.9. / SFC14 SFC15


47

. 2.10 ,
. 2.6, SFC14 SFC15.

. 2.10.
SFC14 SFC15:
) 1 Master', ) 1 I-Slave'
48

, SFC14 SFC15 .
Slave' , , ET200M Master c /, ,
.
- , . I-Slave' ,
SIMATIC S7-300/CPU 315-2DP,
Master'.
I-Slave' Master', Slave' OB82 ( ) OB86 ( ). Master' Slave' .
2.6.


CPU.
CPU:
STOP;
MRES. , STOP .
. STOP;
3
MRES , STOP (
2 ). . CPU , STOP .
,
CPU
CPU ( STOP). CPU
, MRES,
CPU. CPU
,
SIMATIC ().
:
MRES ( 9 ), STOP
;
49

3
MRES. STOP .

, ,
.
Master Slave .
Master I-Slave.
SIMATIC Manager, , DP-Master DP-Slave.
.
, , .
, :
DP CPU DPMaster';
;
.
:
SIMATIC Manager Option, Set PG/PC
Interface, PC Adapter (Auto);
Master S7-300, CPU 315-2DP, S7 Program (1)
Blocks [].
STOP;
PLC [] Download [] CPU. Yes
.
Master' ;
Slave S7-300,
Slave S7-300, CPU 315-2DP, S7 Program (2) .
Run.

. Run
Monitor (on/off) [ (/].
, .
50

2.7.

. .
:
, . ( ) RS485 ;
, SIMATIC Manager [ SIMATIC];
, ,
Station > Consistency Check,
HW Config Save and Compile [
];
OB1 Master' S7-300 Slave' S7-300 , . 2.6 . 2.10 (
)
. 82 86;
;
CPU ;
Master' S7-300 Slave' S7-300;
: / I0 Master' S7-300 / Q4 Slave' S7-300 ;
, .
. 2.2.


15
1
2
3
1
2
3

26
1
2
3
4
5
6

37
1
2
3
7
8
9

2.2
48
1
2
3
10 11 12


. DP-Slave' 1,
(/) / DP-Master' , Slave' ET200M.
51

, 1 2
(. 2.11).
2

1
2

. 2.11. : ) ;
) /
1.
.
2, .
. 1, . , 2.
.. 1 2 .
.
, ,
1. .
.
.

. 1 .
:

= ( 1 + )
:
52

= ( + )
1 2. 2.
:

= ( 1 + ) + + ( + ) 2
2 1.

.

1. :

= ( 2 + ) + + ( + ) 1

. :

= ( 1 + ) + ( + ) 2
= ( 2 + ) + + ( + ) 1
, .. :

, /
(, ) Master S7300, , Slave 200.
Slave S7-300 (. 2.12).

Master S7-300

I0, Q0, Q4

Slave S7-300

I0, I1, Q4, Q5

Slave 200

I1, I2, Q1, Q2

. 2.12. /
53

I Q . . 2.12. ,
/ Slave ET200M Master S7-300 / , ( , , IM153-2 ET200M).

.
, Master I0, Q4.
Slave ET200M I1.
Slave S7-300 1, 2 I0,
= Q4 .
Simatic. ,
. . 2.3
Master S7-300.
2.3
Master S7-300
,

I0.0

I0.1

I0.2

I0.3

I1.0

I1.1


I1.2

Q4.0

Slave S7-300, Master S7-300,


Slave S7-300 Master S7300. , . 2.1,
Master Slave IB100 QB100.
Master S7-300 ,
. 2.13.
, Master S7-300,
IB100 IB101 Slave S7-300. Slave S7300 QB100 Slave S7-300
IB100 Master S7-300.
Slave S7-300
(. 2.4).

54

. 2.13. Master S7-300


2.4
Slave S7-300
,

M0.0 M0.1 M0.2

M0.3

M2.0

I0.0

I0.1

Q4.0

M1.0 M1.1 M1.2

Q4.1 M3.0 M3.1

. 2.4 , Slave S7-300 Master


S7-300 MB0
MB1, MB2 Master.
55

. 2.14 Slave S7-300


.

. 2.14. Slave S7-300


56

1. .
. , , .
. 5 .
, . 5
. , 5 . 3 /, , , .

.
2. ,
, .
=1 =1 1. 0. =1 =1
1 ,
. .
=1 =1
.
3. .
: , , , , ,
. 5 .
()
.
4. ( ) 1 2 (. 2.15).

. 2.15.
57

1 3 4. , , 2,
5 , , ,
. 2
1.
/.
5. .
1 (. 2.16) , 5
1, 2. ( ) 1, 2 3.
4, 2 .
. 5

.

. 2.16.
4
1. 1 1 1. 2
10 , , 2 3.
1 3 2.
.
.

58

6. .
1 (. . 2.16) 1 ,
. 2
1, 3 2. 4,
.
1 1
1. 1 2
4
. 2 , , 2 3. 2
5, 3 7 . 1 3 2.
. 3 3 .
3 3 .
/.
7. -
0.
0
. , 0 . 3 ,
, 0, 3 , . 5 0
.
.
8. .
0, 1.
. 1 3 , 0. 0 3 ,
, 1 3
0. 0 .

.
9. . 3 02.
1. 1
59

3 2. 2
3 1. 1 3 , , 2 3
0,
.

.
10.
(, ).
,
.
.
. . 5 , . ,
5 . 5 , .
/
, .
11. 2 : ,
. ,
. . .
(/) ,
.
.
.
CPU SIMATIC S7-300. () . .
. , 10 , .
.
10 .
12. .
-
. , .
60

, , . ,
. ,
.
, . .
2.8.
:
) ;
) , , , , ,

;
) ,
Master S7-300
Slave S7-300 ;
)
;
) .
2.9.
1. PROFIBUS?
2. Slave I-Slave?
3. PROFIBUS?
4.
PROFIBUS?
5. Master' Slave'
PROFIBUS?
6. I-Slave?
7.
PROFIBUS?
8. SFC14?
9. SFC15?

61