逢甲大學自動控制工程學系畢業專題報告智慧型電梯控制系統TheControlSystemofIntelligentElevator指導教授:洪三山學生:白嘉雄吳建源許龍泰中華民國九十年六月i中文摘要而本研究的主要有二個目標,其一為讓電梯在耗電方面的節省,其二為節省搭載人等待的時間。省時的功能主要應用在大樓上下班時,必須快速載運人潮的尖峰時段,而省電的功能只應用在人潮較為稀少的離峰時段,利用下降電梯比上升電梯所節省位能的原理,來達到省時、省電的智慧型電梯控制。本研究是利用BorlandC++Builder(BCB4.0)這套程式語言軟體,以及8255這顆單晶片的實驗介面卡,透過PC強大的功能,我們可以經由8255卡的I/O介面來控制直流馬達的正反轉以及感應器、按鈕的輸入,以達到基本的電梯控制。而我們之所以選擇透過PC來做電梯的控制,是因有感於當前的傳統電梯是利用繼電器來控制,較缺乏智慧性的判別,而只能夠做順序的控制,而透過PC則可經由程式的撰寫,來達到各種狀況的需要。iiABSTRACTInthisreport,therearetwosignificantfunctionswillbeimproved.Oneistosavemoreelectricity.Theotheristosavethetimeofwaitingfortheelevator.Thefunctionofsavingthewaitingtimecanbeappliedtotherushhourwhenlotsofpeoplearegettingtoworkoroutofwork.Onthecontrary,thefunctionofsavingelectricitywillbehelpful.Weknowthego-downelevatorcansavepotentialenergythango-upelevator.That’sthereasonwhywedesignthisintelligentelevator.Inthisreport,weusesingle8255AinterfacecardwithBorlandC++Builder(BCB4.0)tocontroltheelevator.BythepowerfulfunctionofPC,wecanuse8255A’sI/Oporttocontrolthecircuitandtoreadthesignalfromthebuttonsorthesensors.ThereasonwhywechoosePCtobethecontrollersincethetraditionalelevatorwhicharecontrolledbytherelayarelackforintelligentprogramseverydemandofanysituationcanbeattainedeasily.iii謝誌本專題研究承蒙恩師洪副教授三山的指導與啟迪始得順利進行,在此敬上十二萬分謝意。在多次的討論下決定了研究的方針,在校期間老師不因寒暑照常指導我們,細心的探討問題,讓我們對於研究的問題能徹底的了解。另外也感謝學長、同學的幫忙與賴奕千助教的協助指導,讓這專題能順利成功的發表出來。iv目錄中文摘要........................................................IABSTRACT..........................................................II謝誌.........................................................III目錄..............................................................IV圖目錄............................................................VI表格目錄........................................................VIII第1章前言......................................................11-1電梯自動控制之問題..................................................................................11-2本文之研究動機、方法與內容..................................................................11-3本文之研究目標..........................................................................................1第2章硬體介面的設計............................................32-18255A的應用..............................................................................................32-1-18255A的特色及使用方法..........................................................................32-1-28255的腳位及說明.....................................................................................32-1-38255內部結構.............................................................................................52-1-48255四個方塊圖的說明.............................................................................52-1-58255A的操作命令......................................................................................72-1-68255控制字組(ControlWord)....................................................................72-1-7操作模式的特性.........................................................................................82-2外部電路....................................................................................................122-2-1第一顆8255A與外部介面電路.........................................................122-2-2第二顆8255A與外部介面電路.........................................................182-2-3電源電路..............................................................................................19第3章軟體的設計與流程.........................................223-1省電電梯動作流程圖................................................................................223-2軟體............................................................................................................273-2-1C++Builder介紹......................................................................................273-2-1-1分散式應用系統的開發.....................................................................28v3-2-1-2運用既有C++資源............................................................................283-2-1-3資料庫存取........................................................................................283-2-1-4完整支援MicrosoftTransactionServer.............................................293-2-1-5運用MIDAS開發多層分散式應用系統..........................................293-2-2軟體設計...................................................................................................293-2-2-1軟體執行之外觀................................................................................293-2-2-2設計表單............................................................................................33第4章專題結果及討論...........................................404-1專題結果...........................................................................................................404-1-1實驗設備及儀器........................................................................................404-1-2舒適感的考慮............................................................................................404-1-3電梯硬(軟)體架構.....................................................................................404-2討論.........................................................................