Sei sulla pagina 1di 24

PLC

S5

S5

:

www.MRKakavand.tk

3

4

#$%

& !"

4

* % +, -1

 

5

./+ -2

5

%12 3$4 -3

5

5 6 78 -4

6

+9 %# $ -5

7

PLC

- !"

7

7 <"

 

8

PII

8

PIO

8

% ?@ % ? A %>4

 

9

S5

B @ !"

9

(Operation)

D4?*

9

(Operand)

4?*

10

% 4?* % H G

 

11

STL

! ? J

11

8 KD$

11

14

PLC

%K?LM

22

?$?N

24

+

O

www.MRKakavand.tk

& P D$ PD Q PL/R P8 P PD$ DM Q L/R & @

P P@ PLC .<VP W P+ #9#9 $S$T Q U % 4 A

L+P\ P%Z$PG [9 9 4$ < GA $$XA B$?% YG

. +9 ?] !

Q P*2^ P 4?8 . @ U +$ &4 " L PLC

P8BP PS P` .< & % $ V$ 9 $ _ /

P P9 Q PL/R P 5 6 c T7 a 9 < % b < 5

BP . P% +9 <GA L+\ % T _ / c % K$Y&A

P9 . P@ P Programmable Logic Controller Q P,* d&" e 6

. % fT /+ % ++9 +9 +L

P8 <P i P P P9 < A $h 9 g PLC

B $ R & <L+\ Q @ 9B 8 A . +9

<PGA S @ j / 4\ #] #$% & M ?8 Q \ @ L @

P@ P k PA P% DP@ P 6 + J 79 +* B

9 < $M \ _ #$% & * K ,A + * K? V

.< @ 5 e \ < + +@ l^ " 8 A 8B

Q P] P 6 Q P] VP" m P <P A 78 B

^ P < PN P$ 9 . $ R & A 6 +

7 7* 9 nV c 5 l6 \ c $A ?% . +9 l 9 ?@

VPP PP 7PP8 BPP lPPM / PP PP 62PP\ PP5 <PP +?VPP%

. fb 8 B MRK@MRKakavand.tk

9 9 N `?G

1385 B?]

www.MRKakavand.tk

$% & - !"

.#$P+9 & 9-0 * * Q , G : * % +, -1

P% b A $h 9 .( % ) #$ 10 +, * B N

. @ 1 0 K @ 9 @ & 2 +, * M $n

aP J P &\ 9 .< <$ a ( ) +, #R %

n PA P d4 " <M 6 2 <$ n .< & <$ B@ :
n
PA P d4 " <M 6 2 <$ n .< & <$ B@
: (binary) +, (decimal) % * . V
5 (10) = 0101 (2)
9 (10) = 1001 (2)
8 (10) = 1000 (2)
(Hexadecimal) 7 P@ P (Octal) A<V% o b , ,M
P9 d LA * i +, A * % ,M . 8 #%
2 P+, P@ P9 P* . P9 p " 2 +, + ?% _ Z
. + BCD
PA +$ T +, * AB$q T +, Ar +, *
P R P B$PM <? <? Rp B kh c #$+9 #$ A BD? 8
:
[ +* .< AB$q T +, * B .#$ l$A A *
41÷2 = 20 + 1
20
÷2 = 10 + 0
10
÷2 = 5 + 0
41 = (101001) 2
5
÷2 = 2 + 1
2
÷2 = 1 + 0
#PR % D J c * +, 8 A Ar +, *
PR KP9 OP?8 #PR s N kh B$L D A +,
:
[ +* . @ % t 10 +, #R @ K\ 6

(101001) 2 = 2 0 ×1 + 2 1 ×0 + 2 2 ×0 + 2 3 ×1 + 2 4 ×0 + 2 5 ×1 = 41

www.MRKakavand.tk

P /+ Q P$4?* g P P +, * % : ./+ -2 : 8 4\ .< M s N 9 AND (dM

0 1 0 0 0 1 1 1 .< M O?8 9 OR (s 0
0
1
0 0
0
1 1
1
.< M O?8 9 OR (s
0
1
0
0
1
1
1
1
&PP\ aPP aPP &PP\ PP9 NOT(1
.
+9
x
0
1
x
1
0

. P+9 $ u Q *2^ <$ 1 Z 9 % 4 : %12 3$4 -3 . @ Q Q 8 R S 12 3$4 % # P$ aP 1 P 0 aP (binary digit) Bit P% : P5 6 7P8 -4 (Byte) <P a <$ 8 % .< Q *2^ 6 B Do 9 <$ .< $n lP$A A B$P?% . +% K$DVA < 4$9 a < 1024 % . +% K$DVA P P,&M e 6 a A < % . 9 , G A #% < A b$ c b . % q (9-0)#R a . ]* Q *2^ 4$ 9 7 <" * ?n :Bus P9 P Q P*2^ P$ u c &4 " g 9 5 6 :Memory

.

www.MRKakavand.tk

P% Q *2^ A 5GM % ( YA 5 6) :RAM

(RMM) P lP4v c(ROM) Z g +o . 8

. @ #$ A (RWM) + @ l4v

& P P +9 P%# P$ b a +9 : +9 %# $ -5

e P\ $ $ w [9 +9 %# $ @f . @ c PD$ DM
e
P\ $ $ w [9 +9 %# $ @f . @
c PD$ DM P% c 9 P +9 P P$49 fP P .<P P@ r P x
. + % yG 8B 9 PLC n % T D$
: $ '% (
P # P$ g B :(Open Loop) 46 +9 %# $ (dM
B$P?"A H P w ?* 9 @ +9 8 +b$ a Z A +9 <GA
. V ,M B$@ a %H ,M 7$?A 7$ K[ < 9 z$8 A
P +9 # $ g B :(Closed Loop) 46 +9 %# $ (s
. fT n b@ T % b % + Z A A.$R
: $ '% * +
& P P P9 + % A K @ : 7 <" +9 %# $ (dM
6 %# $ B +9 . @ % 7 A c % c % M
. @ ? $$XA K R
P +9 $ u 5 6 K @ : 7 +9 %# $ (s
P P$ +9 G 9 < B % < 7 B ?] . + %
. 9 { * A # $ 7 <" $$XA

www.MRKakavand.tk

PLC ( , - !" Q P*2^ P9 < 7 ++9 +9 PLC A P+9 J T 5 6 9 .,^ ? < Binary Q \ P5+ B . h % ++9 8 8 . ^ n$ ./+ & A 8 CPU 6 PLC khP P+9 J PT khP P +9 % @ d LA

(Central Processing Unit) CPU 79 b@ T -2
(Central Processing Unit) CPU
79 b@ T -2

.< 5 6 -5 (Communication Processor) CP % b@ T _ ,A -6 (Interface Module) IM Z -7

. ? L $v L % 8 P%J P 74 P P$ <PR $ P PLC 8 A $h 9 & P%<9 P@ Z A PLC . ? BD? w2?* 9 < | % b i

P% < @

LG, OMRON, AEG, SIEMENS o &4 "

#P% P4 g P .<P P? dP LA i 9 @ k+P? <9 @ %PLC 9 n . A a$ +9 <9 @ PLC P @ , <9 @ _ 9 Step 5 (S5) c V$ $ S7 8 %PLC +9 #% 9 < 9u r . @ s " J

.< $ K R S5 49 #$% & } GM 9 < ] : "

24V DC or 110-220V AC :(Power Supply) PS fXA O,+ -1

~ M P P $n g P 9 Input Module % +$ A -3 .< ~ M $n g 9 Output Module 8 % +$ A -4

www.MRKakavand.tk

? PR P+9 P P P% ?A CPU 8 K,R :PII P P8 B$6 . +9 $ u Process Image Input (PII) 5 6 . +9 L8 5 6 B % 8 CPU 8 a B$6 % (Process Image Output) :PIO CPU P 8 b+% . @ ]b 5 6 <? R B c < . +9 L8 5 6 B % 8 8 P]b <P]8 9 < 5 6 4G Flag >4 : 0 1 2 ./ Counter P% ?@ J ?@ <]8 . @ & % 8 ÄL VP$ lPM / P+ . @ & Timer % ? A n+ <]8 . #$% s B

ÄL VP$ lPM / P+ . @ & Timer % ? A n+ <]8 . #$%

www.MRKakavand.tk

S5 3 4 5 0+ ,+ !" :<@ A Q \ (Statement List) STL A ,* -1 (Ladder) LAD -2 (Control System Flowchart) CSF A o 4 -3

. @ ? +* 8B 9 8 #% GRAPH5 b J ,M P P%Å$PT #$P
. @ ? +* 8B 9 8 #% GRAPH5 b J ,M
P P%Å$PT #$P YPA ? Q \ ! ?
. P@ P PM P % $,@ fM @ V M
! P? ^ B . @ & (m 4 ) KD@ K$/ % ? A o 4 ! ?
VP P /+ KP?* m 4 % . @ & 6 ^ b+% V$
P] P B P@ P @ Q2?8 Q A ,* J . @
:< !" statement Q ,* % . $
Q P\ Q P,* P9 P /+ KP?* P :(Operation) PD4?* -dM
.< @ ! ?
8 #] % D4?* . @ & D4?* $
-
3 4 -
' + 3 4 -
&/* l$9 A
AND
« »
A
4Y l$9 A
OR
« »
O
&/*l$9 A Ñ$
AND NOT
« » Ñ$
AN
4Y l$9 A Ñ$
OR NOT
« » Ñ$
ON
#% l$9 A
ASSIGN TO
=
P /+ KP?* a 9 Q ,* ? R :(Operand) 4?* -s
P% H PG P9
F P%>P4 c Q % 8 c I % + . @ n

:< S5 & % 4?* . @ $ + %

www.MRKakavand.tk

PLC +9 <GA T c % Inputs I +9 <GA T PLC c % 8
PLC +9 <GA T c %
Inputs
I
+9 <GA T PLC c % 8
Outputs
Q
P P]b <P]8 P5 6 c %>4
+ Q $4?* K\ 6 $
Flags
F
P$ ]b <]8 5 6 c
M $n Q $4?* K\ 6
Data
D
Ö$YPP"A <PP]8 PP5 6 c PP% +PP PP
% +
Timers
T
Ö$YPP"A <PP]8 PP5 6 c PP% ?PP@
Counters
C
%
J ?@
%< Ü
Constants
K
P%>4 % 8 c % 9 % : +/ 8 -6 -7 +
H P P % H . @ % ( aA) $ 8 %
P@ s B % [ . @ B$$LA <$ H kh _ <
:<
: @ Q \ (IB 8) # V% <
0
0
1
0
1
1
0
1
7
6
5
4
3
2
1
0
.<@ % 1 ( # V% < #n+T <$ +L ) I 8.5 kT
: @ Q \ (FY 6) >4 #V@ <
0
1
1
0
0
1
1
1
7
6
5
4
3
2
1
0

. 0 ( #V@ < <$ +L ) F 6.1 . @ fb 7$ (QB) 8 %< Q \ B$?%

www.MRKakavand.tk

Statement P P (ZP ) P@ a % :STL! 9

PN P /+ P%lP$9 A PD wr P?L P Z % . @ &

3P$4 P%>P4 P +9 B$+S?% . ( AND , OR , NOT , =)

P9 P Z +o % STL J . ]* 7$ %12

a K @ A a . + Segment a % n \ K?* . @
a K @ A a . + Segment a % n \ K?*
. @ V$ Segment
. P P P?A Block End «BE» P P@ g @ « ; » a %
P P . P? K P,A STL P A LAD CSF @ @
. 9 K ,A CSF LAD A ? w 7M STL @ @
P / T 7 :(Cycle time) : 4 ;%
r P Q . BE A . +9 Q 8 g @
P P8 O PA . + 8 KD$ 9B
P P . P P9 P r P <* T A KD$ B !% 9
.(Structure Programming) 9 %
r P^ wr P?L P9 $S$T % B @ : 3 4 ' +
P% khP + P P P 8 P%!" * % . + %
. + m 4 a %<? R B 9 % . 9 4\
aP P +9 P +% K$DVA :(Program Block)PB %m 4 -1
P P 9 . @ f ?@ 255-0 ?@ 9 +@ +
. + BE #$ PB m 4 % Ö$"VA
K[ ,$A A % +9 :(Sequence Block)SB ,$A A %m 4 -2
. @ & c $M A Z %!"

www.MRKakavand.tk

P% P P^ P9 L A :(Function Block)FB O A %m 4 -3

á + P P* s N K[ V d LA + % &

. @ f ?@ 255-0 ?@ 9

:< @ K$DVA !" FB %

FB Q Y"V K @ :(Block Header)m 4 Z (dM FB P P9 A O
FB Q Y"V K @ :(Block Header)m 4 Z (dM
FB P P9 A O A K @ :(Block Body)m 4 (s
i YPP" Q PP PP aPP S5 Q PP PP 2PP* . PP@ PP8
. @ 8 %FB ]+A 9 < 8 7$ Supplementary
: 8 FB g
d
LA
#$ A s N $5 /+ ?* % 9 :Standard FB(1
. $ R 9 $ 7 % Q \ % < @
P% % P 4?* PA P FB g B 8 :Assignable FB(2
. $$XA c 9 d LA c ? B$$LA T
. + % K R STL ^ Z %FB 9 < 9u r
P9 A P*2^ $ u m 4 256 :(Data Block)DB A *2^ %m 4 -4
P P5
% V% c % X$T S?% & 8 b+%
. @
: 8 DB %m 4 Q *2^ g
DATA Q *2^ -1
TEXT B -2
P Q \ 9 1 0 <$ LA :BIT PATTERN <$ bM -3
P8 P9 J B@ >+$M +b$ K?* < ?49
. ]*

/ . ? %DB Q *2^ 9 4 % A

:#$+9 K?* Q \ DB 50 \

www.MRKakavand.tk

C

DB 50

m 4

L

DW 100

/

: + % %< D % DB @ $ u Q *2^

( 16Bits: 0000

(H) FFFF (H)

) 16 +, * :KH -1

(16Bits: -32768 3278) 10 +, * :KF-2 (14Bits: 001.0 999.3)( )TV < Ü * :KT -3 (12Bits: 000 999) % ?@ :KC -4

16Bits: (00 0) 1) :KM -6 (16Bits) (11 (16Bits)
16Bits: (00
0)
1)
:KM -6
(16Bits) (11
(16Bits)

(32Bits:Dmord)

w2 P9 9 DR DL. @ #$ A < 3o < <$ 16:KY -5 . + % #% 7n

aPPPo 9 $ PPP ~ 7PPP $ PPP PPP* VPPP* PPP* :KG -7

. :KM -8 Ö"VP P P :(Organization Block)OB % P m 4 -5 : @ Ö"V i ?@ a OB %. ++9 P8 m 4 B / B$M K * # $ c KD$ % g @ :OB 1 P++9 Ö"VP OPR .<P P !P" T / B . +9 .< BP c P@ P Å$q P START STOP PLC 9 b+% :OB 21 . % W m 4 . % W B @ On cPower 9 b+% :OB 22 P d$LÄPA Q P\ P9 .< A <$LN +% V :OB 34 . @ % DA w D D@ O A c g R

.<@ OB 1 A / 500 ?9 % : D

www.MRKakavand.tk

: PLC <= + - OP?8 $X . + % 8 K R %m 4 ?A 9 L A :(Basic) 4\ -1 P8 P+* P P+ A P % P ?A (-F) . &A (+F) . 9 CSF LAD c STL %J OP A c Pn 8 Q $5 ,$9 A O A :(Supplemental) 4$?DA -2 KP R STL <PM 6 FB Z 9 . +@ 4 ,A Q 7$ Shift . + % 8 PA PLC KP * # P$ w ?$ 9 A :(System)# $ -3 .< 6 i Y"

. CSF . .#$+9 v S5
. CSF
.
.#$+9 v S5

0 P* P P :(Scanning for zero) &> 3 +( (0 P 1) Q P\ (1 0) 9 . 9 & AN (AND NOT)

LAD .

(Push Button) VP P?9 R :(NO)4 - 8 = ? -

) VP P?9 R :( NO ) 4 - 8 = ? - . kD* @

.kD* @ % t 1 B@ $49 V

(Push Button) VP ?9 R :(NC) ' - 8 = ? - P P9) kPD* P @ % t 0 B@ $49 V

( #$+9 & AN

[ +o 9u r 6

#P% P P Q P\ P P9 B A $49 9 $ + : [

. ? J B@ 8 +4\

:K6

www.MRKakavand.tk

A

I 0.1

A

I 0.2

=

Q 0.0

BE

#$% P P P@ KP\ #% Q Y 9 B A $49 : [

:<@ :K6 O I 0.0 O I 0.5 = Q 0.0 BE :<@ A KD@
:<@
:K6
O
I 0.0
O
I 0.5
=
Q 0.0
BE
:<@ A KD@ % : [
A
I 0.0
1
AN
I 0.1
=
Q 0.2
BE
O
I 0.1
2
ON
I 0.2
O
I 0.0
=
Q 0.1
BE

www.MRKakavand.tk

AN I 0.0 3 A I 0.2 AN I 0.3 A I 1.1 4 A
AN
I 0.0
3
A
I 0.2
AN
I 0.3
A
I 1.1
4
A
I 1.2
O
A
I 1.0
A
I 1.3
=
Q 3.1
A(
5
O
I 1.4
O
I 1.5
)
A(
O
I 2.0
O
I 2.1
)
=
Q 3.0
BE

www.MRKakavand.tk

O I 0.0 6 O A I 0.1 A( O I 1.4 O I 1.4
O
I 0.0
6
O
A
I 0.1
A(
O
I 1.4
O
I 1.4
)
=
Q 2.1
BE
9 . @ Ö"V (a ?9) 7 T 9 [
,M .< $ $ OR K,R AND ` .< r AND K,R OR
.< B @ K R %>4 & 7 T Q B
9 < PLC 5 6 <$ a >4 % :$B C (Flag) ./
A 5 6 <$ % + <$ B .< n 8 L A
. + % R % 5 6 %>4 9 Q &A B . $b 1 0
K$Y&A 9 < % 8 % + ?% %>4 % H
.< &\ < # V% <$ F 8.0 [ +* . @ @
ef6 . AND K,R OR 9 < % %>4 9
. @ A r ^ < BD? % ,M . 9 & >4 A %7 T
:#$+9 %>4 r [ w2[
: [
O I 1.4
O
I 1.5
=
F 6.0
O
I 2.0
O
I 2.1
=
F 6.1
17

www.MRKakavand.tk

A

F 6.0

A

F 6.1

=

Q 3.0

BE

Z % 8 PLC:(Result of Logic Operation) RLO %

8 % R RLO $ /+ ?* K\ 6

. @ 8 fT < RLO b+% B : 8 12 3$4 g . @
. @ 8 fT < RLO b+% B
: 8 12 3$4 g . @ Reset Set
SR 12 3$4 -1
RS 12 3$4 -2
:< <à <à % <`$G8 % Q &A 9
A
I 1.1
S
Q 2.0
A
I 1.2
R
Q 2.0
BE
A
I 1.2
R
Q 2.0
A
I 1.1
S
Q 2.0
BE

RLO K\ 6 l$9 A .,^ L 4?* B L /

. +9 $T (=) #% Z $ A K?* B . @ B 7b 8

K @ 12 3$4 : % 8 %>4 (reset) D (set) D

a < 9 @ 0 <M 6 R 9 b+% SR %12 3$4

B . @ 1 T Q Y 8 A $b R 1 <M 6 S 5GM

www.MRKakavand.tk

% 12 3$4 B . % R < 0 Q Y R 9 <$LN

ÑR 9 o .< <$G8 @ 1

A $ B . +9 8 / / Q PLC <

@ a 7 BE T Z 9 %» :< n$ 49 K\

«.< Az8 8 5 3$4 a 8 #$% " % :(STL J )NOP 0 +
«.< Az8 8 5
3$4 a 8 #$% " % :(STL J )NOP 0 + -
.#$+9 & NOP 0 .#$+D & Å$% ? R 12
.< k+? %PLC Ö " B 9 @ 9f
: [
A
I 2.3
S
Q 3.4
A
I 2.4
R
Q 3.5
NOP 0
. R >4 a 12 3$4 a 8 A
: [
A
I 0.1
S
F 2.7
A
I 0.7
R
F 2.7
A
F 2.7
=
Q 3.4
BE
D4?* n$ @ & 9 ^ ?% :(JU) F 0 %E 9 C + -
+ A Q . @ $ u RLO \ <$ Z % Q

JU . +% ^ @ $v +@ , 9 . +@ , +@ RLO <$

< BD? J T B . % n J T c ^ @ % 8

www.MRKakavand.tk

. $ n m 4 ?% b / m 4 / a c b m 4 m 4 a

. @ 8 1 RLO 8 9 < +L B

+ ?% .< RLO <$ B :(JC) F 0 9 C + -

. RLO <$ Q Y . % n J T K?* JU PB 18 (
. RLO <$ Q Y . % n J T K?* JU
PB 18 ( $49 a ? L ) $49 a V 9 $ + : [
. ? 8 PB 19 $49 ?% ? L $v Q \
.<@ OB 1 B$+o 9 #$ D&A 9 :K6
B$+S?% . $ KD@ m 4 B # $ 49 @ & 9 / ?%
Q
\ @ & $49 #$+9 { . 9 & ^ @ J T
: @ I 0.0
A
I 0.0
JC
PB 18
AN
I 0.0
JC
PB 19
BE
% 8 c % M , <]8 : GH + -
Ar 9 9 ? R 9 . @ / 5 6 a $ %>4
5 6 B . 8 c + (m , ) , (Accumulator)
J
< <$ 16 K @ wr ?L 9 . + % $ 16 Registerg
. @ (Low)B$ T J (High)r
ACCUM 1
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
16 Registerg . @ (Low)B$ T J (High)r ACCUM 1 15 14 13 12 11 10

High

16 Registerg . @ (Low)B$ T J (High)r ACCUM 1 15 14 13 12 11 10

Low

www.MRKakavand.tk

ACCUM 2

15 14 13 12 11 10 9 8
15
14
13
12
11
10
9
8
7 6 5 4 3 2 1 0
7
6
5
4
3
2
1
0
High Low .#$+9 & B Q *2^ f :(Load)L + - B 7b 8 m
High
Low
.#$+9 & B Q *2^ f :(Load)L + -
B 7b 8 m , * ?49 #* < a Q G l$A A B
.
@
L
IB 4
,
L
KD 5
,
L
KH 3
,
L
FY 5
, …
8 <$ 7 @ L IW 4 c @ @ m , PLC
. ACCUME 1 (5 4 < +L ) 4 ?@ ?49
ACCUME 1 Q *2^ @ 8 L IW 6 <M 6 B$?%
. @ K + ACCUME 1 IW 6 ACCUME 2
@ " ACCUME 2 Q G @ 8 IW 12 <M 6 B$?%
B 7b 8 IW 12 c ACCUME 1 . @ B 7b 8 ACCUME 1
.
@
< 8 %m , 9 A *2^ :(Transfer) T + -
. @ & B %>4 % 8
T QW 8
,
T
FW 52
8 8 ?49 ACCUME 1 Q G T
QW 8 8
RLO T L Q .( ? B$ V K + ) @ h9
. +% ^ @ $v fM + $

www.MRKakavand.tk

%

PLC # $ a 7 7 <" s5w-demo , < @ $ u T2 * 7 B . +9 $,@ k+? . 9 & V j M " T2 8 A

9 & V j M " T2 8 A ?+% ?8 A D < $ 7
9 & V j M " T2 8 A ?+% ?8 A D < $ 7

?+% ?8 A D < $ 7 B & : % $M % ! .< %m 4 D % + 7 K @ Block + A Presentation + . +9 $$XA U n+T n kT m 4 (cLAD cCSF cSTL) 9 s " 5 m 4 ! ? $@

$$XA U n+T n kT m 4 ( … c LAD c CSF c STL )

www.MRKakavand.tk

PLC $,@ n+T

www.MRKakavand.tk PLC $,@ n+T ?9 V r Q $$XA B @ kT A @ % V

?9 V r Q $$XA B @ kT

A @ % V %>4 % 8 % 8B @

. PLC @ @ D4?*

% 8 % 8B @ . PLC @ @ D4?* PLC 9 9 i Y" 7
% 8 % 8B @ . PLC @ @ D4?* PLC 9 9 i Y" 7

PLC 9 9 i Y" 7 B & . @ $\ A $ wr ? 6 & %Q ] $ U 7 & V B$?% + .<@ $% 7 Help ?+% . @ % t F1 $49

www.MRKakavand.tk

I

.> Q V . PLC K 9 O8 .1385 . c R .1

. ]A , Q V . PLC O8 .1384 . c .2

. Q V .1384 . $h 9 ?8 A ck c .3