Mang Truyen Thong Cong Nghiep (4)

  • Published on
    14-Jun-2015

  • View
    1.153

  • Download
    0

Embed Size (px)

Transcript

<p>Chng 5. Thit lp d an trn nn SIMATIC PCS 7</p> <p>CHNG 5 THIT LP D N TRN NN SIMATIC PCS 75.1 Cc bc c bn thit lp mt d n: 5.1.1 Giai on lp k hoch: Xy dng cc bin da vo s lit k cc bin v m t y cc qu trnh (lp k hoch kh thi, s lng PLC, Trm vn hnh, cc thnh phn khc)</p> <p>Tnh chn s lng I/O v kiu module</p> <p>n nh cc knh tn hiu v t tn tng trng cho chng</p> <p>Lp bng k hoch i dy gia sensors/actualtors v cc trm PLC</p> <p>La chn v quyt nh kiu mng v cu trc mng. Cc kt ni gia cc trm SIMATIC vi nhau v gia cc trm SIMATIC vi cc trm iu khin qu trnh 5.1.2 Thc hin d n: Thit lp d n</p> <p>Thit lp cu hnh phn cng (tng trm)</p> <p>Thit lp cu hnh mng</p> <p>To h thng cc cp bc cho nh my</p> <p>Lp trnh cc khi chc nng ngi dng v cc khi trao i thng tin; kim tra v lp ti liuNguyn Kim Anh &amp; Nguyn Manh Ha - T ng hoa - BKN 68</p> <p>Chng 5. Thit lp d an trn nn SIMATIC PCS 7</p> <p>To CFC charts (charts module)</p> <p>S dng chc nng Import/Export Assistant (IEA) to module Template cho cc im o lng. Kim tra v lp ti liu cho cc module. t cc khi v cc module vo trong th vin to c</p> <p>To cc CFC chart vi vic s dng cc IEA model trn; Bin dch v download ti PLC</p> <p>To cc khi SFC chart (sequential control systems) v download chng ti PLC Cu hnh cho cc trm OS: To cc bc tranh qu trnh, cc bc tranh thng bo message, cc th (curve) v cc bng nht k (archive)</p> <p>Kt ni d liu gia OS v PLC</p> <p>Sao chp cc d liu cn thit t ES v a vo cc OS; Tin hnh khi ng OS</p> <p>Lp li qu trnh trn kim tra vi ln</p> <p>Tin hnh kim tra tn hiu v hiu chnh tng cm bin, chp hnh v cc qu trnh trn bc tranh qu trnh</p> <p>Nguyn Kim Anh &amp; Nguyn Manh Ha - T ng hoa - BKN</p> <p>69</p> <p>Chng 5. Thit lp d an trn nn SIMATIC PCS 7</p> <p>5.2 Thit lp d n: Trong phn ny gii thch cc ng dng c bn trn ES vi nhng phn mm thnh phn mang tnh cht cp bc (HP: Plant Hierarchy) v cc vn v IEA (Import/Export Assistant) v mi quan h gia nhng thnh phn trong ES . 5.2.1 Phn mm ES trong SIMATIC PCS 7: Vi nhng phn mm cn thit trn h thng ES thuc gi phn mm SIMATIC PCS 7, bn c nhng cng c (tool), vi nhng cng c y bn c th to cu hnh nh my mt cch ton din. l nhng phn mm sau y: - Phn mm STEP 7: Bao gm SIMATIC Manager, phn mm ny lm nn tn v l trung tm qun l cho tt c cc thnh phn ca ES. y l hnh nh sinh ng ca ngi s dng trn giao din ca Windows NT thng c s dng qun l cc d n ca nh my. - Bn cu hnh tt cc thit b s dng trong h thng nh: Cc rack ca cc PLC, cc m un vo/ra, cc m un giao din, cc trm PC bng Hardware Configuration (HW Config.). - PH v IEA: PH v IEA l nhng gi thuc PCS 7, chng khng phi tch bit vi cc ng dng trn m chi m rng hn trong phm vi ca SIMATIC Manager. PH v IEA h tr cu hnh din rng ca qu trnh iu khin v qun l d liu ca nh my. - CFC (Continuous Function Chart): CFC l gi phn mm nh hng cho nh my, cu hnh cc ha ca tc v t ng ha. S dng CFC thng qua cc khi c to sn (y l gi phn mm lp trnh c cu trc). Cc khi c qun l theo nhm ty theo chc nng ca chng trong th vin, thc hin lp trnh bng cc ng t ko/th. - SFC (Sequential Function Chart): L gi phn mm c cu hnh cho h thng iu khin tun t. vi h thng iu khin tun t, chc nng t ng ha tiu c s l c iu khin trn s thay i trng thi v cng c th chn lc t qu trnh. - Phn mm cu hnh cho OS: WinCC c s dng cho vic cu hnh cho h thng iu khin v gim st nh my trn nn PCS 7. Vi phn mm ny, bn c th to ra bc tranh qu trnh, cc bo co, cc thng bo v h thng, th tn hiu, nht k vn hnh. - SCL (Structured Control Language): y l ngn ng lp trnh ging v Pascal lp trnh cho nhng tc v phc tp. Trn ES, n c s dng to ra cc khi v bin dch cc yu cu ca CFC/SFC chart. 5.2.2 S tc ng qua li gia cc thnh phn: Phn ny cung cp cho bn mt cch nhn tng th v s tc ng qua liNguyn Kim Anh &amp; Nguyn Manh Ha - T ng hoa - BKN 70</p> <p>Chng 5. Thit lp d an trn nn SIMATIC PCS 7</p> <p>gia cu hnh ca h thng cp bc ca nh my, CFC chart, IEA v SFC chart trn OS. - H thng cp bc ca nh my (PH): ng dn ca PH vi tn ca th v tn khi l c chuyn i ti nhng text block "origin" (khi ngun di dng text) vi s chuyn i ca vic kt ni d liu gia PLC-PC. T y s xut hin cc dng thng bo (message) trn OS run-time. Tn tag trn trnh qun l tag ca WinCC Explorer lm cho chng ta d dng qun l v quan st PH, tn th, tn khi, tn cc gi tr khc. Nu bn mun kt ni mt i tng vi mt tag qu trnh trn bc tranh qu trnh hoc nht k vn hnh, bn phi ch r tn tag t trnh qun l tag. - CFC (Continuous Function Chart): Ring mi kiu khi (v d khi CTRL_PID) l c lu tr trong th vin hoc chng trnh ca STEP 7. Mi khi bn sao chp nhiu khi ra t nt khi ban u th bn phi t cho cc khi y c cc tn hnh thc khc nhau. Thuc tnh ca mt i tng trong CFC chart, bn ch r cc message ca khi v kch chut vo cc biu tng message . Vic kt ni d liu c hin th cc message trn OS trong sut qu trnh OS hot ng (run time). Trong sut qu trnh lm vic, mt tag c iu khin v gim st lin tc thng qua th tc chuyn i (transfer) d liu lin tc gia OS v PLC. Cc gi tr nhn c t qu trnh c th c lu tr trong cc tag ni (internal tag) trn trnh qun l tag ca OS, iu ny s ng ngha vi vic cc dng text s c gim bi tr nhng text ang chuyn i v hin th trn bc tranh qu trnh. - IEA (Import/Export Assistant): Vi IEA, bn to t ng cc chart v cc khi thuc tnh. Bn c th ty chn nhng message c c im k thut ph hp to d liu cho vic import (nhp ni dung). Nhng message sau khi xut hin ti nhng im thch hp trn i tng ca khi v c chuyn i (transfer) ti OS m t cho CFC. - SFC (sequential control system ): Trn SFC chart, bn xem xt cc thng s ca ca cu hnh CFC trc y trn SFC chart. Nhng cng trnh s (nhng ngi xy dng nn mt cu hnh tng th) to ra nhng yu cu theo tng bc, chuyn i v n nh cng ngh v nh hng cho tn ca cc i tng. Vi cu trc ca CFC chart theo tng bc v cc im chuyn i (xem phn 4.2.6) trong s trn OS c chuyn i (transfer) d liu kt ni gia OS v PLC (s hot ng chng ta c th quan st c s chuyn i trng thi thng qua s chuyn i mu sc trn CFC). - Chuyn i d liu kt ni gia PLC v OS (Transferring PLC-OS Connection Data): Khi nim ny tng i phc tp, mt h thng lm viu gn kt thnh mt khi thng nht v ng b th cn phi c vic chuyn i d liu cu hnh lin tc mi khi cu hnh hay thng s ca h thng c s thay i, c bit lNguyn Kim Anh &amp; Nguyn Manh Ha - T ng hoa - BKN 71</p> <p>Chng 5. Thit lp d an trn nn SIMATIC PCS 7</p> <p>gia h thng cc PLC v h thng cc OS. D liu kt ni gia PLC v OS phi c chuyn i trong nhng tnh hung sau: Sau mi khi thay i h thng cp bc ca nh my (PH) Sau mi khi thm cc chart mi v ch nh tn cc CFC chart Sau mi khi thm nhng khi i tng mi v thay i tn khi Sau mi khi thay i cc n v text thuc v bn cht ca qu trnh vn hnh Sau mi khi thay i thuc tnh ca cc i tng c iu khin v gim st Sau mi khi thay i cc message Sau mi khi thay i hoc l thm cc SFC chart - c lng cc thnh phn yu cu ca mt nh my: iu quan trng u tin trc khi bt tay vo thit k mt h thng t ng cho mt nh my, bn phi t ra cc k hoch hay cc phng n m cc phng n da trn c s l qu trnh vn hnh nh th no, da vo y bn c th c lng c s OS; mc , tc , khong cch v s trm tham gia kt ni t bn c th c lng c bus h thng s dng l nhng bus no; xc nh s lng v v tr t cc b iu khin trung tm, s lng cc m un vo ra tp trung v vo ra phn tn hay yu cu iu khin xc nh loi m un phi c tnh ton rt k. Ngoi ra bn cn phi da vo kch c ca d n, yu cu ca khch hng, tnh sn sn hay ni cch khc l h thng c tin cy cao, iu kin v v tr ( cao) v mi trng xung quanh v tr d nh lp t, tnh nng p ng hay tnh nng thi gian thc. Ni chung cng vic tch hp mt mng truyn thng cho mt nh my l mt cng vic kh khn v phc tp, i hi ngi thit k khng nhng am hiu su sc v mt k thut trong cc h thng t ng, am hiu v cng ngh m cn phi ty chn da trn nhiu phng n v tiu ch khc nhau a ra mt cu hnh va ti u v ch cc tiu k tht v kinh t. - Nhng yu cu cho mt d n: Khi bn mi bt u cu hnh cho mt d n, iu u tin bn nn phn tch nhng yu cu c bit ca d n, bn chc chn rng tt c nhng kha cnh v nhng iu kin c suy xt n trn nhng c s trit l v hiu qu v mt cu hnh. Trong sut qu trnh cu hnh, c rt nhiu khi v kiu khi khc nhau trong th vin ca bn. V vy bn phi chc chn rng ch c mt version ca phn mm s dng cu hnh cho h thng trong sut qu trnh xy dng d n. Nhng kiu khi lp trnh khc nhau s dn n s xung t nu chng trnh ca bn c iu khin v gim st trn cng mt OS. 5.3 Cu hnh phn cng (Hardware Configuring): Cu hnh mt trm l vic th hin ton b cu trc ca trm . Vi cu hnh phn cng, bn ch nh r s ca cc rack, s lng rack v n nh a ch ca cc khe cm (slot) ty theo cu trc thc t ca trm. Bn cu hnh tham s cho cc m un vo ra tp trung v cc m un vo ra phn tn. Khi b iu khin kh lp trnh bt u khi ng th vic u tin l CPU phi thc hinn so snh cu hnh qun l bn trong h iu hnh ca CPU vi cu hnh thc t caNguyn Kim Anh &amp; Nguyn Manh Ha - T ng hoa - BKN 72</p> <p>Chng 5. Thit lp d an trn nn SIMATIC PCS 7</p> <p>phn cng c lp t cho trm. Nu c s tng phn th CPU s tm ngay lp tc v thng bo s c bo hiu v ng nhin l h thng s khng th tip tc hot ng thm na. 5.3.1 Gii thiu phn mm NetPro - Configuring Networks: Phn mm ny c gii thiu s lc chng 4.2.11. Trn phn mm ny, chng ta c th cu hnh cho tng trm n l nh S7-300, S7-400, OS, ES v lin kt cc phng t trn li vi nhau thng qua cc bus truyn thng l Ethernte, Profibus, MPI hay AS-i</p> <p>- Khi ng phn mm: Start &gt; Simatic &gt; STEP 7 &gt; NetPro - Configuring</p> <p>Hnh 5.1 Khi ng phn mm NetPro - Configuring Networks Networks. - To mi mt d n: Vic to mi mt d n khng th tin hnh trc tip trn phn mm ny c, v vy bn phi tin hnh theo cch sau:</p> <p>Nguyn Kim Anh &amp; Nguyn Manh Ha - T ng hoa - BKN</p> <p>73</p> <p>Chng 5. Thit lp d an trn nn SIMATIC PCS 7</p> <p>+ Khi ng phn mm SIMATIC Manager: Start &gt; Simatic &gt; SIMATIC</p> <p>Hnh 5.2 Khi ng phn mm SIMATIC Manager Manager + To Project mi: File &gt; New, mt hp thoi xut hin, trn hp thoi ny bn c th chn cc kiu Project sau: User Project (d n n), Libraries (th vin) hay Multi-Project</p> <p>Hnh 5.3 To mi mt User ProjectNguyn Kim Anh &amp; Nguyn Manh Ha - T ng hoa - BKN 74</p> <p>Chng 5. Thit lp d an trn nn SIMATIC PCS 7</p> <p>(nhiu d n). Nu bn chn User Project th kiu ca d n trong hp thoi s hin th tng ng l Project, t tn cho d n ca bn vo Name, v d SAMPLE, sau chn OK. Project s xut hin cc biu tng hnh 5.4. Nh vy SAMPLE chnh l d n c s dng cho vic lu tr d liu v chng trnh c to ra khi bn to m gii php t ng trong gii hn cho php. D liu ca bn lu tr trong SAMPLE bao gm: D liu cu hnh cho phn cng v d liu n nh cc tham s cho cc m un. D liu cu hnh mng truyn thng. Chng trnh ngi dng (cc m un chng trnh tng ng trong cc khi chng trnh). Nhim v chnh khi to mt Project l chun b nhng khi d liu v khi chng trnh. Vic bn cn lm tip theo l thit lp cu hnh cho d n ca bn trn phn mm NetPro - Configuring Networks. C hai cch khi ng phn mm ny: T trnh Start (xem hnh 5.1). Kch p chut tri vo biu tng MPI(1) trn hnh 5.4 (y l biu tng lin kt n phn mm cu hnh). Di y l giao din ca phn mm cu hnh cho mng truyn thng mi cp</p> <p>Hnh 5.4</p> <p>Hnh 5.5 Giao din ca phn mm cu hnh mngNguyn Kim Anh &amp; Nguyn Manh Ha - T ng hoa - BKN 75</p> <p>Chng 5. Thit lp d an trn nn SIMATIC PCS 7</p> <p> cng nh cu hnh cho tng thnh phn trong mng . Phn bn tri chnh l bc tranh cu hnh m bn mun to, phn bn phi l th vin cc thit b thnh phn v cc mng thnh phn (hay cn gi l subnet), thng thng phn th vin c mc nh, nu khng c bn m n bng cch View &gt; Catalog. Khi d n ca bn va c to, phn mm mc nh mt subnet MPI c tn l MPI(1) phn bit vi cc MPI tip theo m bn s to. Cng ni thm rng, bn c th dng subnet MPI, Ethernet hay Profibus lm bus h thng nhng mi subnet c to ra s dng cho nhng ng dng ring bit tn dng ti a hiu sut ca ng truyn cng nh chi ph lp t v bo dng, trong : Industrial Ethernet l chun quc t (IEEE 802-3) s dng cho truyn thng cng nghip thit b cp iu khin trong phm vi nh nh mng LAN hay mng din rng WAN. MPI (Multi-Point-Interface) l chun c Siemens to ra kim tra v chun on h thng v lp trnh cho cc PLC S7. PROFIBUS l chun quc t (EN 50170) kt ni mng thit b cp hin trng v mng din hp, t trm tham gia. Mng PTP (Point-To-Point) l chun c Siemens to ra theo mt giao thc c bit truyn gia hai nt (node) vi nhau. Ngoi ra cn c AS-i nhng khng hin th trong ny v n l mt subnet con m ch (master) ca n l cc m un gn vo cc PLC S7 hay b chuyn mng Profibus-DP sang AS-i. T y bn c th t nhng trm thnh phn hay cc subnet theo cch no l ty vo d nh ca bn. V d bn cu hnh cho mt trm PLC S7-300 loi CPU 313 v m un ngun PS 307 10A:</p> <p>Nguyn Kim Anh &amp; Nguyn Manh Ha - T ng hoa - BKN</p> <p>76</p> <p>Chng 5. Thit lp d an trn nn SIMATIC PCS 7</p> <p>Kch chut tri vo biu tng SIMATIC 300 trong th vin, ko v th vo trong phn nn tri, xem hnh bn di.</p> <p>Hnh 5.6 y mi ch mc nh cho trm S7-300 nhng cha c th l CPU loi no, bao nhiu rack, m un ngun, m un m rng, m un giao din, m un truyn thng cu hnh cho trm ny bn tip tc kch p chut tri vo biu tng SIMATIC 300(1) s xut hin giao din cu hnh ring cho trm ny, xem hnh 5.7. Giao din ny cng tng t nh giao din thit lp mng nhng n c s dng thit lp cu hnh cho tng tthnh phn trong mng nh: OS, ES, Server, PG, PLC S7-200, S7-300, S7-400, cc m un phn tn ET200</p> <p>Nguyn Kim Anh &amp; Nguyn Manh Ha - T ng hoa - BKN</p> <p>77</p> <p>Chng 5. Thit lp d an trn nn SIMATIC PCS 7</p> <p>Bn tri l bc tranh cu hnh m bn mun to, phn bn phi l th vin cc thit b thnh phn c thit k sn, thng thng phn th vin c mc nh, nu khng c bn m n bng cch View &gt; Catalog. Trong mc Profile,</p> <p>Hnh 5.7 Giao din cu hnh cho tng thnh phn ca mng</p> <p>Hnh 5.8 bn c th chn 3 dng th vin khc nhau m trong c th b i hoc b sung thm nhng thnh phn tng ng ty theo ng dng ca bn, trong th vin Standar l th vin c y cc thnh phn nht.Nguyn Kim Anh &amp; Nguyn Manh Ha - T ng hoa - BKN 78</p> <p>Chng 5. Thit lp d an trn nn SIMATIC PCS 7</p> <p> y bn ch rng, bn chn cu hnh cho trm S7-300 nn bn phi chn cc thnh phn thuc th muc SIMATIC 300 trn cy th mc ca th</p> <p>Hnh 5.10 Thit lp cu hnh cho trm PLC CPU 313 vin. u tin bn phi t rack trong tm (mc nh (1) UR) trong th mc RACK 3, kch chut vo biu tng Rail v ko th vo phn giao din bn tri, xem hnh 5.8. Mi rack c ti a 11 slot, slot s 1 l v tr duy nht cho m un ngun PS, slot 2 cng l v tr duy nht dnh cho m un CPU, xem hnh 5.9. Phn cu hnh c th cho trm S7-300 s ni k hn phn 5.3.2. n y d n ca bn c cu hnh, trc khi thot khi chng trnh ny bn phi thc hin lu v bin dch (save and complie) kim tra li trc khi thot. Lc ny, d n t ng thm vo th mc d n SAMPLE ca bn nh hnh sau: SAMPLE Project lc ny bao gm mt trm SIMATIC 300 vi CPU 313 v mt subnet MPI. Bn trong SIMTIAC 300 cha ng cu hnh phn cng ca trm (Hardware) v S7 Program. Nh vy phn mm NetPro - Configuring Networks c s dng to ra tt c cc cu hnh lin quan n phn cng ca h thng mng tryn thng. i su vo vic cu hnh cho tng thnh phn i hi ngi tch hp h thng phi nm bt c nguyn tc cu hnh cho tng thnh phn (v d nguyn tc cu hnh cho S7-300, S7-400,). Cc vn ny s c trnh by mc 5.3.2. 5.3.2 Cu hnh ca mt trm: Nhng vic u tin khi bt tay vo xy dng cu hnh cho mt trm i hi bn phi n nh a ch cho trm v cc a ch thnh phn nh mng MPI, Profibus hay Ethernet v mt iu na l phi ch ti a ch cao nht cho phpNguyn Kim Anh &amp; Nguyn Manh Ha - T ng hoa - BKN 79</p> <p>Chng 5. Thit lp d an trn nn SIMATIC PCS 7</p> <p> cu hnh cho cc trm trong mt mng con (subnet) no . S bn di s cho thy mt cch quan v vic cu hnh cho mt d n:</p> <p>Hnh 5.12 Cu hnh (v d) cho mt h thng Bn cu hnh cho bt c trm S7-300, S7-400 no i hi vic u tin bn phi thit lp cc rack trc. S7-300 s rack ti a cho mt trm l 4 v c a ch ha t (0)UR n (3)UR. S7-400 th phc tp hn, c vi loi rack v s lng cng nhiu hn ty loi CPU. Nh vy rack l thnh phn lp t cc m un ln , xem hnh v d sau:</p> <p>Hnh 5.11Nguyn Kim Anh &amp; Nguyn Manh Ha - T ng hoa - BKN 80</p> <p>Chng 5. Thit lp d an trn nn SIMATIC PCS 7</p> <p>Hnh 5.13 Mi quan h gia rack v cc m un thnh phn...</p>