全自動(dòng)電梯控制器實(shí)習(xí)報(bào)告.doc_第1頁(yè)
全自動(dòng)電梯控制器實(shí)習(xí)報(bào)告.doc_第2頁(yè)
全自動(dòng)電梯控制器實(shí)習(xí)報(bào)告.doc_第3頁(yè)
全自動(dòng)電梯控制器實(shí)習(xí)報(bào)告.doc_第4頁(yè)
全自動(dòng)電梯控制器實(shí)習(xí)報(bào)告.doc_第5頁(yè)
已閱讀5頁(yè),還剩7頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、廈 門 大 學(xué) 電子 工 程 系FPGA生產(chǎn)實(shí)習(xí)報(bào)告 題 目 全自動(dòng)電梯控制器專 業(yè) 電子工程 班 級(jí) 04電子 學(xué)生姓名 a ka 學(xué)生學(xué)號(hào) 指導(dǎo)教師 黃龍楊老師2007年7月26日 目 錄第一部分 摘要第二部分 設(shè)計(jì)要求第三部分 方案論證與系統(tǒng)分析第四部分 模塊設(shè)計(jì)第五部分 系統(tǒng)仿真第六部分 總結(jié)一、摘要:本問(wèn)從設(shè)計(jì)電梯控制器系統(tǒng)分析入手,并進(jìn)行了電路設(shè)計(jì)、綜合和仿真。主要分為5個(gè)模塊,一是顯示模塊;一是門的開(kāi)關(guān)控制模塊;一個(gè)是電梯內(nèi)部的樓層選擇模塊,一是外部的選擇模塊,還有一個(gè)總的控制模塊。用于協(xié)調(diào)各部分的工作。關(guān)鍵詞:VHDL;控制器;FPGA;電梯 二、設(shè)計(jì)要求:(1)每層門外有上、

2、下請(qǐng)求按鈕(第一層只有上,第八層只有下),內(nèi)有選擇到達(dá)樓層按鈕。有升、降以及正運(yùn)行到哪層的指示。 (2)能記憶內(nèi)外所有請(qǐng)求信號(hào).按照運(yùn)行規(guī)則逐個(gè)響應(yīng),執(zhí)行完畢清除該請(qǐng)求信號(hào)。 (3)電梯運(yùn)行規(guī)則:上升時(shí),只響應(yīng)電梯所在樓層以上的上樓請(qǐng)求,逐個(gè)響應(yīng)完以后運(yùn)行到下降請(qǐng)求的最高樓層,開(kāi)始下降.下降時(shí),只響應(yīng)電梯所在樓層以下的下樓請(qǐng)求。逐個(gè)響應(yīng)完以后運(yùn)行到有上升請(qǐng)求的最低層。然后上升。執(zhí)行完所有請(qǐng)求后停在最后響應(yīng)的樓層。 (4)以外面光電傳感器感應(yīng)信號(hào)來(lái)判斷電梯到達(dá)哪個(gè)樓層,到達(dá)某層數(shù)碼管顯示該層,一直等到到達(dá)新的層顯示更新。如果要響應(yīng)某層請(qǐng)求,到達(dá)該層1秒后開(kāi)門,開(kāi)門燈亮,默認(rèn)開(kāi)門10秒后關(guān)門,開(kāi)門

3、燈滅,然后繼續(xù)運(yùn)行。 如果內(nèi)部提前按關(guān)門按鈕則立即關(guān)門,若內(nèi)部一直按開(kāi)門按鈕則直到松開(kāi)該按鈕再關(guān)門.(5)開(kāi)機(jī)時(shí)電梯停在一層,所有請(qǐng)求全清除.三、方案論證與系統(tǒng)分析:本實(shí)驗(yàn)可以采取多種方案,比如單片機(jī)實(shí)現(xiàn),純硬件打結(jié)等,但此次的方法-采用可編程邏輯器件通過(guò)對(duì)器件內(nèi)部的設(shè)計(jì)來(lái)實(shí)現(xiàn)系統(tǒng)功能,是一種基于芯片的設(shè)計(jì)方法。設(shè)計(jì)者可以根據(jù)需要定義器件內(nèi)部邏輯和引出端,將電路板設(shè)計(jì)的大部分工作放在芯片的設(shè)計(jì)中進(jìn)行,通過(guò)對(duì)芯片設(shè)計(jì)實(shí)現(xiàn)數(shù)字系統(tǒng)的邏輯功能。靈活的內(nèi)部功能塊組合,引出端定義等,可大大減輕電路設(shè)計(jì)和電路板設(shè)計(jì)和電路板設(shè)計(jì)的工作量和難度,有效的增強(qiáng)設(shè)計(jì)的靈活性,提高工作效率1。同時(shí)采用可編程邏輯器件,

4、設(shè)計(jì)人員在實(shí)驗(yàn)室可反復(fù)編程,修改錯(cuò)誤,以期盡快開(kāi)發(fā)開(kāi)發(fā)產(chǎn)品,迅速占領(lǐng)市場(chǎng)。基于芯片的設(shè)計(jì)方法可以減少芯片的數(shù)量,縮小系統(tǒng)體積,降低能源消耗,提高系統(tǒng)的性能和可靠性。 現(xiàn)在分析一下該系統(tǒng)的特點(diǎn)。該設(shè)計(jì)采用方向優(yōu)先控制方式方案,方向優(yōu)先控制是指電梯運(yùn)行到某一樓層時(shí)先考慮這一樓層是否有請(qǐng)求:有 ,則停止;無(wú),則繼續(xù)前進(jìn)。停下來(lái)后再啟動(dòng)時(shí)的步驟:考慮前方上方或下方是否有請(qǐng)求:有,則繼續(xù)前進(jìn);無(wú),則停止;檢測(cè)后方是否有請(qǐng)求,有請(qǐng)求則轉(zhuǎn)向運(yùn)行,無(wú)請(qǐng)求則維持停止?fàn)顟B(tài)。這種運(yùn)作方式下,電梯對(duì)用戶的請(qǐng)求響應(yīng)率為100,且響應(yīng)的時(shí)間較短。電梯在維修停止?fàn)顟B(tài)的時(shí)候可以進(jìn)入省電模式,又能節(jié)省大量電能.電梯方向有限控制

5、方式控制器系統(tǒng)方框圖如圖1所示,電路圖如圖2所示. 圖1 電梯控制器系統(tǒng)方框圖,圖2 電梯控制器電路圖。 圖1頂層原理圖:四、模塊設(shè)計(jì)1。電梯內(nèi)部的樓層選擇模塊modulefloorselect( rst,n1,n2,n3,n4,n5,n6,n7,n8,clear1,clear2,clear3,clear4,clear5,clear6,clear7,clear8,floor,floorto,dup,ddown,start) output7:0 floorto,ddown,dup;input rst,n1,n2,n3,n4,n5,n6,n7,n8,clear1,clear2,clear3,cle

6、ar4,clear5,clear6,clear7,clear8,start;input 7:0 floor;reg7:0 floorto,dup,ddown;always (rst or n1 or clear1)begin if(!rst) floorto0=0; else if(n1) floorto0=1;else if(clear1=1&start=0)floorto0=0;else ;endalways (rst or n2 or clear2)begin if(!rst) floorto1=0; else if(n2) floorto1=1;else if(clear2=1

7、&start=0)floorto1=0;else ;endalways (rst or n3 or clear3)begin if(!rst) floorto2=0; else if(n3) floorto2=1;else if(clear3=1&&start=0)floorto2=0;else ;endalways (rst or n4 or clear4)begin if(!rst) floorto3=0; else if(n4) floorto3=1;else if(clear4=1start=0)floorto3=0;else ;endalways (rst o

8、r n5 or clear5)begin if(!rst) floorto4=0; else if(n5) floorto4=1;else if(clear5=1&&start=0)floorto4=0;else ;endalways (rst or n6 or clear6)begin if(!rst) floorto5=0; else if(n6) floorto5=1;else if(clear6=1&start=0)floorto5=0;else ;endalways (rst or n7 or clear7)begin if(!rst) floorto6=0;

9、 else if(n7) floorto6=1;else if(clear7=1start=0)floorto6=0;else ;endalways (rst or n8 or clear8)begin if(!rst) floorto7=0; else if(n8) floorto7=1;else if(clear8=1&start=0)floorto7=0;else ;endalways (floorto)begincase(floor)8b00000001: begin dup=8'b11111110floorto; ddown=8'b00000000&f

10、loorto;end8'b00000010: begin dup=8'b11111100floorto; ddown=8'b00000001&floorto;end8b00000100: begin dup=8b11111000floorto; ddown=8'b00000011floorto;end8b00001000: begin dup=8'b11110000floorto; ddown=8'b00000111&floorto;end8b00010000: begin dup=8b11100000floorto; ddown

11、=8b00001111&floorto;end8b00100000: begin dup=8'b11000000floorto; ddown=8b00011111&floorto;end8b01000000: begin dup=8b10000000&floorto; ddown=8b00111111floorto;end8'b10000000: begin dup=8'b00000000floorto;ddown=8'b01111111&floorto;enddefault:;endcase endendmodule2。電梯外部

12、的選擇模塊module slavec(up,down,up_1,up_2,up_3,up_4,up_5,up_6,up_7,down_2,down_3,down_4,down_5,down_6,down_7,down_8,upclear1,upclear2,upclear3,upclear4,upclear5,upclear6,upclear7,downclear7,downclear2,downclear3,downclear4,downclear5,downclear6,downclear8,rest,start);input up_1,up_2,up_3,up_4,up_5,up_6,u

13、p_7,down_2,down_3,down_4,down_5,down_6,down_7,down_8,upclear1,upclear2,upclear3,upclear4,upclear5,upclear6,upclear7,downclear7,downclear2,downclear3,downclear4,downclear5,downclear6,downclear8,rest,start;output7:0 up,down; reg7:0 up,down;always (rest)begin up7=0;down0=0;endalways (up_1 or upclear1 o

14、r rest)begin if(rest)begin if(up_1)up0=1;else if(start=0upclear1=1) up0=0;end else up0=0;end always (up_2 or upclear2 or rest)begin if(rest)begin if(up_2)up1=1;else if(start=0&upclear2=1) up1=0;end else up1=0;endalways (up_3 or upclear3 or rest)begin if(rest)begin if(up_3)up2=1;else if(start=0&a

15、mp;upclear3=1) up2=0;end else up2=0;endalways (up_4 or upclear4 or rest)begin if(rest)begin if(up_4)up3=1;else if(start=0upclear4=1) up3=0;end else up3=0;endalways (up_5 or upclear5 or rest)begin if(rest)begin if(up_5)up4=1;else if(start=0upclear5=1) up4=0;end else up4=0;endalways (up_6 or upclear6

16、or rest)begin if(rest)begin if(up_6)up5=1;else if(start=0&upclear6=1) up5=0;end else up5=0;endalways (up_7 or upclear7 or rest)begin if(rest)begin if(up_7)up6=1;else if(start=0upclear7=1) up6=0;end else up6=0;endalways (down_2 or downclear2 or rest)begin if(rest)begin if(down_2)down1=1;else if(d

17、ownclear2=1start=0)down1=0;else ;end else down1=0;endalways (down_3 or downclear3 or rest)begin if(rest)begin if(down_3)down2=1;else if(downclear3=1&&start=0)down2=0;else ;end else down2=0;endalways (down_4 or downclear4 or rest)begin if(rest)begin if(down_4)down3=1;else if(downclear4=1&

18、start=0)down3=0;else ;end else down3=0;endalways (down_5 or downclear5 or rest)begin if(rest)begin if(down_5)down4=1;else if(downclear5=1&start=0)down4=0;else ;end else down4=0;endalways (down_6 or downclear6 or rest)begin if(rest)begin if(down_6)down5=1;else if(downclear6=1&start=0)down5=0;

19、else ;end else down5=0;endalways (down_7 or downclear7 or rest)begin if(rest)begin if(down_7)down6=1;else if(downclear7=1&&start=0)down6=0;else ;end else down6=0;endalways (down_8 or downclear8 or rest)begin if(rest)begin if(down_8)down7=1;else if(downclear8=1&start=0)down7=0;else ;end e

20、lse down7=0;endendmodule3。顯示模塊:電梯內(nèi)和電梯外的有關(guān)當(dāng)前所在樓層和電梯上升或下降的顯示module dis(floor,direc,stop,disfloor,down,up);input7:0 floor; input direc,stop;output6:0 disfloor; output down,up;reg6:0 disfloor; reg down,up;always (floor)begin disfloor=7b0000000;case(floor) 8'b00000001:disfloor=7b0110000; 8'b00000

21、010:disfloor=7b1101101; 8b00000100:disfloor=7b1111001; 8'b00001000:disfloor=7b0110011; 8b00010000:disfloor=7b1011011; 8'b00100000:disfloor=7'b1011111; 8'b01000000:disfloor=7'b1110000; 8'b10000000:disfloor=7b1111111; default: disfloor=7'b0000000; endcase endalways (direc o

22、r stop) begin if(stop=1)begin down=0; up=0; end else if(direc=1) begin up=1;down=0; end else begin down=1; up=0;endendendmodule4。門控制模塊;module door(start,autoclose,clk,stop,enclose,enopen,rst);output autoclose,start;input clk,enclose,stop,enopen,rst;reg autoclose,start,stop1;reg1:0 tcount;reg7:0 coun

23、t;always (posedge rst or posedge stop or posedge clk)beginif(rst=1)begin start=0;count<=7'd0;stop1=1;endelse beginif(stop=1)stop1<=1;else if(count7'd5)stop1=0;else ; if(stop1=1) begin count<=count+1;if(count<=7'd2)begin autoclose<=1;start<=0;endelse if(count<=7'd

24、5) begin autoclose<=0;start<=0;if(enopen) count<=7'd4;else if(enclose) count=7d4; end else begin if(stop=0)begin autoclose=1;start<=1;end else begin autoclose<=1;start=0;end endendelse begin autoclose=1;count<=7d0;start=1;end end end endmodule 5主控制模塊module main(dir,stop,clear,c

25、learup,cleardown,rst,floor,up_s,down_s,up_f,down_f);input rst;input7:0 floor,up_s,down_s,up_f,down_f;output stop,dir;output7:0 clearup,cleardown,clear;reg stop,dir;reg7:0 clear,up,down,testup,testdown,clearup,cleardown;always (up_s or up_f or down_s or down_f or floor or rst)begin up=(up_sup_f);down

26、=(down_sdown_f);testup=upfloor;testdown=downfloor;endalways (floor or rst or up or down)beginif(!rst)begin stop=0;dir=1;clear=8'b00000000;clearup=8'b00000000;cleardown=8'b00000000;endelse begin if(up!=0|down!=0)begin if(dir)if(up=0)dir=0;else if(down=0)dir=1;else ;if(up!=0&dir=1) beg

27、in case(floor)8'b00000001:if(testup0=0)begin stop=0;clearup0=0;end else begin stop=1;clearup0=1;end8b00000010:if(testup1=0)begin stop=0;clearup1=0;end else begin stop=1;clearup1=1;end8'b00000100:if(testup2=0)begin stop=0;clearup2=0;end else begin stop=1;clearup2=1;end8b00001000:if(testup3=0)

28、begin stop=0;clearup3=0;end else begin stop=1;clearup3=1;end8b00010000:if(testup4=0)begin stop=0;clearup4=0;end else begin stop=1;clearup4=1;end8'b00100000:if(testup5=0)begin stop=0;clearup5=0;end else begin stop=1;clearup5=1;end8'b01000000:if(testup6=0)begin stop=0;clearup6=0;end else begin

29、 stop=1;clearup6=1;end8'b10000000:if(testup7=0)begin stop=0;clearup7=0;end else begin stop=1;clearup7=1;enddefault:begin clearup=8'b00000000;stop=0;end endcase endelse if(down!=0&dir=0)begin case(floor)8'b00000001:if(testdown0=0)begin stop=0;cleardown0=0;end else begin stop=1;cleardown0=1;end8b00000010:if(testdown1=0)begin stop=0;cleardown1=0;end else begin stop=1;cleardown1=1;end8b00000100:if(testdown2=0)begin stop=0;cleardown2=0;end els

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論