Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 56 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
56
Dung lượng
4,09 MB
Nội dung
UY BAN NHAN DAN TP.HCM SO' KHOA HOC VA CONG NGHE CONG HOA XA HOI CHU NGHIA VIET NAM Diic lap - Ty' - Hanh phuo BAO CAO NGHIEM THU DE TAI NGHIEN CCM KHOA HOC VA PHAT TRIEN CONG NGHE Thui)c hu•o•ng: Ong Ilea Ten cue tai NOlien dm -angdung realtime he diL hanh Linux cho dieu khien tix diOng cac qua trinh ChU nhi"Orn cue tai: Nguyen Xuan Hoang quan cht:i tri: Vien nghien cCpu va phat trien cong ngh'e' mai 05-2006 UY BAN NHAN DAN TP.HCM SO' KHOA HOC VA CONG NGHE CONG HOA XA HOI CHU NGHTA VIET NAM D'Oc lap - Ty, - Hanh phiic BAO CAO NGHIEM THU DE TAI NGHIEN COU KHOA HOC VA PHAT TRIEN CONG NGHE Thu(lc htarng: dOng hoa Ten c16' tai Nghien ciru u•ng dung realtime he dieu hanh Linux cho diL khi6n tu• Qng cac qua trinh Ch6 nhiOm cue tai: Nguy6n Xuan Hoang quan cht:, tri: Vin nghien alpu va phat trien cong ngh0 mai 05-2006 L en NOI DAU Toi xin duvc b5t dAu bAng mot not dung thao luan tren tap chi Thiet ke Ira Dieu khien (CONTROL DESIGN magazine), dO la "co phai thol dal cua Linux dieu khien fix dOng hoa da den?" (Is time for Linux yet?) Di nhien la chu'a the co mot cau tra lai co va khOng mot cach r6 rang,, m0t s6 quan diem thi cho rang Linux van chua san sang, mot so lac quan thi lai cho rang can song d6ng hoa veri,cac tieu than "Linux" da bat dau d6 b0 vao linh vtyc cong nghiep chi& rat khat khe Tuy nhien neu nhin vao cac th6ng tin tren internet bang cach g6 vao tir kh6a tim kiern "PLC Linux" thi chCing ta CO the thay so luvng cac nh6m nghien ciru phat trien, cac di,P an ma nguOn ma va cac cong ty da phat then va dang ban cac san pharn tax d6ng hoa sir Ong Linux 115 tang mot cach clang ke so vai theyi diem cach day mot nam chCing toi bat dau nghien ciru de tai De giai thich ve khuynh huang mot chuyen gia d5 nhan dinh : "COng nghe Gang phat trien, yeu ceu veyi he thong di& khien cang cao, se khOng xa la mot nha may co the crvac yen hanh mot cach hOan tOan tir Ong va ducyc kiem s6at qua internet vai cac ket n6i kh6ng day chOng ta se nhanh chOng they xuet hien tren thi twang cac he th6ng dieu khien toc cao; On crinh (redundant) va de mo' rOng (scability), kha nang ket not va lien lac (la dang va gia Gang He dieu hanh ma ngu6n ma Linux vai kha nang chay tier) nhieu loai vi X CP 1)% 8/16 bit, DSP cho tai cac IBM mainframe, kha nang ket n6i mang cia dang, clap (mg thai gian thyv, cong vai mot cong citing ciOng ciao cac lap trinh vien, 1(2 thuet vien va cac nha nghien ciru se la clOng Arc manh me de thay clOi dien mao caa nganh clOng h6a ma nhuchang ta clang thay hien nay' MUC LUC Cac qui u,ac Giai thieu tong quan 2.1 Tinh hinh nghien COU ngoai wen 2.2 Tinh hinh nghien CCPU ruck Tom tat ket qua de tai 3.1 Kien truc he thong 3.2 Bang m6 to th6ng so kjr thuat cua he thong M6 to chi tie't he thong 4.1 BUS he thOng (Common Bus) 4.2 Module Loadcell 4.3 Module Analog 4.4 Module Digital 4.5 He dieu hanh thai gian thtyc Linux 4.5.1 Nguyen ljt 4.5.2 ling dung RTLinux dieu khien tty d6ng h6a 4.5.3 TO chtk source chvang trinh 4.5.4 Qui trinh phat trier) mot Ong dung ty' d6ng hoa 4.5.5 Phan tich cac thong so hoat d6ng dm he thOng Bac) cao ket qua thtyc to tren he thong can dinh luang Ket luan Lai cam an Phu luc (tO cht:rc tai lieu ya ma chtyung trinh) Phu Luc (ban ye thiet ke phan cOng) 9.1 Module Analog 9.2 Module Loadcell 9.3 Module Digital IN 9.4 Digital Out 9.5 Digital IN/OUT 9.6 PCB Layout 8 11 11 11 13 15 17 17 18 21 22 24 24 28 29 30 31 31 35 39 41 43 45 Cac qui mfYc De de dang cho viec tham khao tai lieu, dual day la m6 to cac tCY kh6a thtyoing duvc dung : PC104 : Board mach CPU 486DX nhOng theo chuan PC104 Realtime Linux: h0 (lieu hanh Linux vai tinh nang ma rOng cho phep chay cac tang dgng thol gian thtyc Module I/O: cac module giao tip I/O Wifi: mang lien lac kh6ng day PC: may tinh PLC: WO dieu khien lap trinh logic (programable logic controller) Linux PLC: la san pham cua dty an bao Om board PC104 chay he dieu hanh linux thol gian thyc va cac module I/O WCT: thol gian tre cua h0 thong truVng hgp xau nhat BUS: mang truy'en du, lieu HMI (human-machine interface): giao tip ngty6i va may Gidei thiOu tong quan Khai niem PLC &vac phat then Ur nhCvng nam 1960 de thay the cac mach relay duvc sir dung rat phi bien cac may di& khien congCu Ngirai lap trinh dung PLC de dinh nghia mot loat cac thao tac may diet., khien, PLC se lam viec bang cach doc cac tin hieu dau vao tip thiet bi nhu' cam 'Dien, hay cong tac hanh trinh va Oa tren cac gia tri de dOng hay ngat thiet bi dau 6' clang dan gi5n nh5t thi PLC co nhiem vu thay the cac relay, thay vi mot may ca vai cac relay va cac IDO dinh thai duvc ket not de di6u khien hoat dOng cua may, thi PLC la mot Nip den dun gian lam cac chin Wang twang tty, va bevi vi kh5 nang lap trinh bang ng6n ngir may tinh nen de thay han nhieu so vai he th6ng relay vat 19, ngoai PLC cO s kha nang thkrc hien cac phep tinh toan so hoc va cac hoat Ong khac nhu'dieu khien servo va cac th6ng so analog Tuy nhion theo thai gian cong nghe PLC da phat then manh me, kha va anh hu,ang cua no kh6ng chi giai han 0' M VC tieu ban dau la thay the the cac he thong relay Val cac the he PLC hien nay, chimg to CO the xay dkrng cac he thong dieu khien theo cac giai thuat neural, adaptive control phivc tap, thai gian dap Ong co the dat den vai micro giay: Ngivai sir dung c6 the theo dOi mot cach try,c quan hoat Ong dm he thOng dieu khien qua cac giao dien HMI va Web DOi vai rival lap trinh PLC thi cong viec tra nen de clang han vai cac cong Cy lap trinh trtyc quan theo clang LADDER, IEC-61131 A neu muon ca the dung cac ng6n ngir cap cao nhu' C, Basic Nhu'ng sty tien hoa van chu'a dung lai, cong vai sty tham gia cua he dieu hanh Linux, vai sty dai dm cac thiet ke ph5n cirng mai, mot dat song cong nghe mai lai bat clAu Co the tom tat cac huang phat trien chinh viec phat then cac he thong PLC mai dual clay: D Cai thien tic dO dap irng thai‘ gian thkrc (realtime improvement): thai gian clap ivng la ket qua dm sty ket hap giCfa phan cirng va ph5n mem Song song vai sty dai dm cac IDO vi xir 19 vai tic d6 cang cao hurl, cac kien truc phivc tap han nhu' cac vi x0, 19 lai giCva ARM + DSP, MIP + DSP, he da xiv 19 thi cac he dieu hanh cung ph5i lien tuc thay d6i, nhCvng gi5i thuat dinh thai (scheduling) mai, nhuing m6 hinh dap ivng lu,61 (Grid) cho phep he th6ng clap ivng nhanh va On dinh (redundant) ➢ Phat then cac giao tiep phAn cirng va driver cho cac module PLC: tinh Wang de cal dat, de ma Ring va thay nOng (hot-swap), to clOng cau hinh va to chuAn dOan (self diagnostic) la, yeu cau ca ban cac he th6ng PLC Ng6ai de dap Ong cac you cat khac cac Ong dung khac thi cac mo hinh bus mai duvc phat then nhu' PCI-express, CAN 2.0, LIN Bus Sy tuang thich giipa cac module dieu khien dm cac hang phat then khac (nhu' giCra Siemens va AB) cung cluac dat fr Cac Gong cu phat then: cac cong cu lap trinh trkic quan han,d6 clang hen, cho phep ngudi lap trinh mO phong he thong trirac chay ten he thong thu,c su', tinh kha chuyen (portibility — cho phep mot chuang trinh chay ten cac he th6ng khac nhau) cung la mot tinh nang dang duvc nghien Ngoai cac giai thuat dieu khien mai duvc b6 xung lien tuc diyai dang cac thu, vien u'ng dung fr Cac img dung tuung tac ngiyai may (HMI — Human Machine Interface): cac Gong cu thiet ke cho phep nhanh chong tao cac giao dien d6 hoa, cho phep theo d6i hoat dOng dia he thong dieu khien theo cac thong s6 thai gian thcrc dud' dang tru'c quan Cac tinh nang thu th'ap du, lieu (SCADA), dieu khien tiy xa qua internet cung dang duvc phat then 2.1 Tinh hinh nghien Cl:FU ngOai nutec CO rot nhieu cac vien nghien ciru, car-19 nhu' cac cong ty ten the giai dang tap trung phat then cac he th6ng dieu khien sCr dung Linux; Nhieu san pham van can a phong thi nghiem va cung co nhieu san pham da cong ten thi truang Dual day la mot s6 thOng tin: • Honeywell dua Linux vao he th6ng dOng hOa building: theo SYSGO mot cong ty phhn mem a chau au \Ara cong b6 hoan he thOng dieu khien Building cho Honeywell ten nen Linux San phan du' kien se du,a thi twang vao dOu nam 2004 De biet them thOng tin ye chi tiet ve san pham co the tham khao website dual day http://linuxdevices.com/news/NS8512023233.html Hinh He thong Building Automation cua Honeywell • Module dieu khien PLC cCia hang Kontron: day la thiet bi tuang d61 hoan chinh du'ac ding b6 vao 10/2005 veil cac tinh nang co nhieu diem tuang dOng vai muc tieu aim de tai He th6ng bao g6m mot module dieu khien dung b6 vi X1.1' lcf Geode 1200SC, va chay he dieu hanh Linux, cac module I/O theo chuen FieldBus Xem http://www.linuxdevices.com/articles/AT8507873630.html de biet them chi tiet Hinh Module ThinklO cda hang Kontron SCADA IAD3 ERP WNW bik Ira MIL/Begolloh PROR BUS, DeviceRot, 111% =FL= Nuersetest t Hinh So' d6 ket n6i c,ac module cua hang Kontron • Module dieu khien cong nghiep co }(6t not mang sir dung Linux: xem website dual Clay 86 biet them thong tin http://www.linuxdevices.com/news/NS5147390086.html • Robot di6u khien bang he dieu hanh Linux: xem website dual day de biet them thong tin http://www.linuxdevices.com/articles/AT2717739661.html http://www.linuxdevices.com/news/NS2044443521.html • Module dieu khien six dung Linux iing dung automation: xem website clued day 86 biet them thong tin http://www.linuxdevices.com/news/NS2629019236.html 2.2 'Tinh hinh nghien CiPU nutec Hien tai nuac dang bo ngo linh V1,FC nay, mac du co mot sO vion nghien cu'u hay truang dai hoc co nhCing 86 tai ve phat trien he thOng nhOng cho robot, hay he th6ng thu thep s6 lieu (sir dung Windows hay DOS), nhien cac de tai chi diyng a linh vuic hoc thuet chua phu hop cho viec ap dung moi twang cong nghiep thkyc to Tom tat ket qu6 de tai DOn dau xu the phat then dm ding nohe, myc tieu cua de tai la nhArn phat trien m6t san phem vai chi phi phat then phhn mem va phhn arng khong qua cao, phi) hgp cong nghe the tpo tpi Viet Nam, nhArn dap Ong m6t phan (loan thi trueyng rinh vvc tv d6'ng h6a ma cy the 16 link vvc can dinh luvng (Batching Automation) Dva ten nhOng you ceu ye dap Crng he thong, yeu ceu ye tuang tac ngvgi va may (HMI) He dieu hanh Linux la chon Iva va dike' day la ceu hinh he thong cua san phAm 3.1 Kik trim hg thOng He thong duvc m6 to nhu' Hinh 4, bao gam m6t board mach PC104486DX (PC104) chpy he dieu hanh nhung Linux thoi gian thvc (realtime embedded Linux) va cac module I/O nhu' module Digital, Loadcell Board PC104 va cac module duvc ket not qua he thong bus chung day (xem dinh nghia Bus he thong) He thong co the ket not v6i may tinh va cac thiet bi dieu khien khac qua he thong mang Ethernet hoc mpg khOng day Wifi LC D M ain C PU a il R ealtlm e Display Analog M odule I ii 'glint M odula ° A a it I II Common 111 I' Llnux C ontroller Loaticell M odula el iI • 11 1i Bus Ethernet r W irelesa I Is • n Il• r r c Hinh Sc da ceu hinh cua he thong a 2.- ‹ 11 "TT 9.3 Module Digital IN 39 n te F=5 i§ t4 11— 411-71 ;X U ti ri4 ix U iO A 172 11 EEEE EEEE -4 AĐ -N Al gs ã LU 9.4 Digital Out 41 FRI4- i I !: e -000c== ; 0;1 p292222 0v1 !aormroor iii F frI1i111-7 r susi t, 5;4 ; E535 :33E p39 flt 41 vl ; 1-1j 11 re p ir Zle 41 11 , r „.r _L -L T1 '11 III II of -, - 9.5 Digital IN/OUT 43 It 11 a 11 9.6 PCB Layout 45 SIGNAL IN/OUT Li U C LI_ a LJ I z U _J \_ U D a CD Z D I-C NI U a N., CD z F- (WW) CG CD z KE U D a F- U Z D .CE E