Tailieus7 200 Coban

download Tailieus7 200 Coban

of 34

  • date post

    26-Nov-2015
  • Category

    Documents

  • view

    155
  • download

    1

Embed Size (px)

Transcript of Tailieus7 200 Coban

  • Ti liu S7 200 c bn TT CT HD vtc

    Ks. L Vit Anh Mr.anhlv@gmail.com

    CU HNH H THNG

    I. CU TRC PHN CNG

    1. B iu khin lp trnh PLC

    PLC l b iu khin lp trnh v c xem l my tnh cng nghip.

    Do cng ngh ngy cng cao v vy lp trnh PLC cng ngy cng thay i,

    ch yu l s thay i v cu hnh h thng m quan trng l b x l trung

    tm (CPU). S thay i ny nhm ci thin 1 s tnh nng, s lnh, b nh, s

    u vo/ ra(I/O), tc qut, v vy xut hin rt nhiu loi PLC.

    PLC ca Siemens hin c cc loi sau: S7- 200, S7- 300, S7- 400.

    Ring S7- 200 c cc loi CPU sau: CPU 210, CPU 214, CPU 221, CPU 222,

    CPU 224, CPU 226, . Mi nht c CPU 224 xp, CPU 226 xp c tch hp

    analog. Trong ti liu ny trnh by cu trc chung h S7 200, CPU 224.

    Tng s I/O max tng i ln, ti 256 I/O. S module m rng

    ty theo CPU c th ln n ti a 7 module. Tch hp nhiu chc nng c

    bit trn CPU nh ng ra xung, high speed counter (HSC), ng h thi gian

    thc (RTC), . .v.v.

    Module m rng a dng, nhiu chng loi nh analog, x l nhit ,

    iu khin v tr, module mng ..v.v.

    2. Cc thnh phn ca CPU

  • Ti liu S7 200 c bn TT CT HD vtc

    Ks. L Vit Anh Mr.anhlv@gmail.com

    a, c im ca CPU 224

    - Kch tht: 120.5mm x 80mm x 62mm

    - Dung lng b nh chng trnh: 4096 words

    - Dung lng b nh d liu: 2560 words

    - B nh loi EEFROM

    - C 14 cng vo, 10 cng ra.

    - C th thm vo 14 modul m rng k c modul Analog.

    - Tc x l mt lnh logic Boole 0.37s

    - C 256 Timer, 256 Counter, cc hm s hc trn s nguyn v s thc.

    - C 6 b m tc cao (HSC) ,tn s m 20 KHz

    - C 2 b pht xung nhanh kiu PTO v PWM, tn s 20 KHz ch

    cc CPU DC.

    - C 2 b iu chnh tng t.

    - Cc ngt: phn cng, theo thi gian, truyn thng,

    - ng h thi gian thc.

    - Chng trnh c bo v bng Password.

    - Ton b dung lng nh khng b mt d liu 190 gi khi PLC b

    mt in.

    b, Cc n bo trn PLC

    - SF: n bo hiu h thng b hng (n ).

    - RUN: PLC ang ch lm vic (n xanh).

    - STOP: PLC ang ch dng (n vng).

    - I x.x, Q x.x: ch nh trng thi tc thi cng

    (n xanh).

  • Ti liu S7 200 c bn TT CT HD vtc

    Ks. L Vit Anh Mr.anhlv@gmail.com

    c. Cng tc chn ch lm vic

    - RUN: cho php PLC thc hin chng

    trnh trong b nh, PLC s chuyn t RUN qua

    STOP nu gp s c.

    - STOP: PLC dng cng vic thc hin

    chng trnh ngay lp tc.

    - TERM: cho php my lp trnh quyt nh

    ch lm vic ca PLC. Dng phn mm iu khin RUN,

    STOP.

    3. Kt ni iu khin

    Cho cc model ca S7 200 sau:

    Xc nh c im PLC ca Siemmen

  • Ti liu S7 200 c bn TT CT HD vtc

    Ks. L Vit Anh Mr.anhlv@gmail.com

    Kt ni dy cho PLC hot ng

    Cp ngun:

    V d trn l 2 kiu cu ngun nui cho PLC S7 200. Ngun DC k hiu l M v

    L+. Ngun AC k hiu l N v L1.

  • Ti liu S7 200 c bn TT CT HD vtc

    Ks. L Vit Anh Mr.anhlv@gmail.com

    Ng vo:

    Trong trng hp cn kt ni mt nt bm v mt cng tc vo ng vo

    ca PLC

    Chn 1M, 2M ni chung vi chn M.

    Chn L+ ni vo 1 u ca tip im, u cn li ca tip im ni vo

    cc ng vo I trn PLC.

  • Ti liu S7 200 c bn TT CT HD vtc

    Ks. L Vit Anh Mr.anhlv@gmail.com

    Ng ra:

    Kt ni PLC iu khin n Light, iu khin Relay, cc c cu chp

    hnh khc

    Chn 1L, 2L ni vo ngun dng.

    Tng ng ra t PLC ni vo 1 u ca ti, u cn li ca ti ni vo

    ngun m.

  • Ti liu S7 200 c bn TT CT HD vtc

    Ks. L Vit Anh Mr.anhlv@gmail.com

  • Ti liu S7 200 c bn TT CT HD vtc

    Ks. L Vit Anh Mr.anhlv@gmail.com

    Cc ng vo thng dng l:

    - Nt nhn, cng tc gt, ba chu,

    - Cc loi cm bin: quang in, tim cn, in dung, t, kim loi, siu

    m, phn bit mu sc, cm bin p sut,

    - Cng tc hnh trnh, cng tc thng.

    - Rorary Encoder.

    - Rle in t.

    - Sensor nhit .

    - B kim tra mc

    Cc thit b c iu khin ng ra:

    - ng c DC .

    - ng c AC 1 pha v 3 pha.

    - Van kh nn.

    - Van thu lc.

    - Van solenoid.

    - n bo, n chiu sng.

    - Chung bo gi.

    - ng c Step Servo.

    - Bin tn.

    - Qut thng gi.

    - My lnh.

    - ng c pht in.

    4. Truyn thng gia PC v PLC

    S7-200 s dng cng truyn thng ni tip RS 485 vi jack ni 9 chn

    phc v cho vic ghp ni vi thit b lp trnh hoc vi cc trm khc ca

    PLC. Tc truyn cho my lp trnh kiu PPI (Point To Point Interface) l

    9600 baud.

  • Ti liu S7 200 c bn TT CT HD vtc

    Ks. L Vit Anh Mr.anhlv@gmail.com

    Cng truyn thng

    Chn Chc nng

    1 Ni t

    2 24V DC

    3 Truyn v nhn d liu

    4 Khng s dng

    5 Ni t

    6 5V DC

    7 24V DC

    8 Truyn v nhn d liu

    9 Khng s dng

  • Ti liu S7 200 c bn TT CT HD vtc

    Ks. L Vit Anh Mr.anhlv@gmail.com

    - Ghp ni S7 200 vi my tnh PC qua cng RS 232 cn c cp

    kt ni PC / PPI vi b chuyn i RS 232 / RS 485.

    - Gn 1 u cp PC / PPI vi cng truyn thng 9 chn ca PLC cn

    u kia vi cng truyn thng ni tip RS 232 ca my PC. Nu cng truyn

    thng ni tip RS 232 vi 25 chn th phi ghp ni qua b chuyn i 25

    chn / 9 chn c th ni vi cp truyn thng PC / PPI.

    - Chn cc thng s truyn thng.

    - Tc truyn 9600 bound

    - D liu truyn 11 bits.

    5. Ci t phn mm

    tin hnh ci t nhn enter hoc click kp chut tri vo file setup.exe

  • Ti liu S7 200 c bn TT CT HD vtc

    Ks. L Vit Anh Mr.anhlv@gmail.com

    7. Kt ni vi terminal

    Dng vt dp thc hin nh hnh v, kh cy v ly khi kt ni terminal

    ra. Khi lp vo th k ngay Terminal c cht v n ng vo rnh c sn.

  • Ti liu S7 200 c bn TT CT HD vtc

    Ks. L Vit Anh Mr.anhlv@gmail.com

    II. Cu trc b nh

    1. H thng s:

    Trong x l cc phn t nh, cc ng vo / ra, thi gian, s m, PLC

    s dng h thng nh phn.

    a. H thp phn

    H thp phn vi c s 10 gm cc ch s l: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.

    Gi tr cc ch s trong h thp phn ph thuc vo gi tr ca tng ch s v

    v tr ca n. Trong h thp phn v tr u tin bn phi l 0; v tr th 2 l 1;

    v tr th 3 l 2; tip tc cho n v tr cui cng bn tri.

    b. H nh phn

    H nh phn l h s dng c s 2, gm 2 ch s l 0 v 1. Gi tr thp

    phn ca s nh phn cng c tnh tng t nh s thp phn. Nhng c s

    tnh lu tha l c s 2.

    c. H bt phn

    H m ny c 8 ch s t 0 n 7. Cng nh cc h m khc, mi

    ch s trong h c s 8 c gi tr thp phn tng ng vi v tr ca n.

    d. H m thp lc phn

    H m thp lc phn s dng c s 16, gm 16 ch s l: 0, 1, 2, 3, 4,

    5, 6, 7, 8, 9, A, B, C, D, E, F. Trong A tng ng 10; B tng ng 11; C

    tng ng 12; D tng ng 13; E tng ng 14; F tng ng 15. Gi tr thp

    phn ca s thp lc phn c tnh tng t nh cc h m khc nhng c

    s tnh l 16.

  • Ti liu S7 200 c bn TT CT HD vtc

    Ks. L Vit Anh Mr.anhlv@gmail.com

    e. Bng m

    Bng m nh phn 4 bits tng ng cho cc ch s thp phn t 0

    n 15 v cc ch s thp lc phn t 0 n F.

    Nh phn Thp phn Thp lc phn

    0000 0 0

    0001 1 1

    0010 2 2

    0011 3 3

    0100 4 4

    0101 5 5

    0110 6 6

    0111 7 7

    1000 8 8

    1001 9 9

    1010 10 A

    1011 11 B

    1100 12 C

    1101 13 D

    1110 14 E

    1111 15 F

    2. Cc khi nim x l thng tin

    Trong PLC, hu ht cc khi nim x l thng tin cng nh d liu u

    c s dng nh: Bit, Byte, Word, Double Word.

    Bit: l 1 nh c gi tr logic l 0 hoc 1.

    Byte gm 8 bit

  • Ti liu S7 200 c bn TT CT HD vtc

    Ks. L Vit Anh Mr.anhlv@gmail.com

    Word(t n): 1 t gm c 2 byte.

    Double word: gm c 4 byte.

    - 1 Kb(Kilobyte) = 210 bits

    - 1Mb(Megabyte) = 220 bits

    3. Phn chia b nh

    B nh S7 200 chia lm 4 vng nh:

    - Vng chng trnh c dung lng 4 Kwords c s dng lu gi

    cc lnh chng trnh.

    - Vng tham s: min lu gi cc t kha, a ch trm.

    - Vng d liu: lu gi d liu chng trnh: kt qu php tnh, hng s

    c nh ngha trong chng trnh. L 1 vng nh ng. N c th

    truy nhp theo tng bit, byte, word hoc double word.

    + Min V (Variable): V0.x V5119.7 (x = 0 - 7)

    + Vng m cng vo (I): I 0.x > I 15.x (x = 0 - 7)

    + Vng m cng ra (Q): Q 0.x > Q15.x (x = 0 - 7)

    + Vng nh ni (M): M 0.x > M 31.x (x = 0 - 7)

    + Vng nh c bit (SM): SM 0.x > SM 179.x (x = 0 7)

  • Ti liu S7 200 c bn TT CT HD vtc

    Ks. L Vit Anh Mr.anhlv@gmail.com

    - Vng i tng:

    + Timer: T0 -> T255

    + Counter: C0 > C255

    + B m cng vo tng t: AIW0 AIW30

    + B m cng ra tng t: AQW0 AQW30

    + Thanh ghi (Accumulater): AC0, AC1, AC2, AC3

    + B m tc cao: HSC0 -> HSC5

    4. Cc phng php truy cp d liu

    a. Truy nh