全自动电梯控制器实习报告范本_第1页
全自动电梯控制器实习报告范本_第2页
全自动电梯控制器实习报告范本_第3页
全自动电梯控制器实习报告范本_第4页
全自动电梯控制器实习报告范本_第5页
已阅读5页,还剩7页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、 WORD 12/12厦 门 大 学电子工程系FPGA生产实习报告题目全自动电梯控制器专业电子工程班级04电子学生a ka学生学号指导教师黄龙老师2007年7月26日目 录第一部分 摘要第二部分 设计要求第三部分 方案论证与系统分析第四部分 模块设计第五部分 系统仿真第六部分 总结一、摘要:本问从设计电梯控制器系统分析入手,并进行了电路设计、综合和仿真。主要分为5个模块,一是显示模块;一是门的开关控制模块;一个是电梯部的楼层选择模块,一是外部的选择模块,还有一个总的控制模块。用于协调各部分的工作。关键词:VHDL;控制器;FPGA;电梯二、设计要求:(1)每层门外有上、下请求按钮(第一层只有上

2、,第八层只有下),有选择到达楼层按钮。有升、降以与正运行到哪层的指示。(2)能记忆外所有请求信号。按照运行规则逐个响应,执行完毕清除该请求信号。(3)电梯运行规则:上升时,只响应电梯所在楼层以上的上楼请求,逐个响应完以后运行到下降请求的最高楼层,开始下降。下降时,只响应电梯所在楼层以下的下楼请求。逐个响应完以后运行到有上升请求的最低层。然后上升。执行完所有请求后停在最后响应的楼层。 (4)以外面光电传感器感应信号来判断电梯到达哪个楼层,到达某层数码管显示该层,一直等到到达新的层显示更新。如果要响应某层请求,到达该层1秒后开门,开门灯亮,默认开门10秒后关门,开门灯灭,然后继续运行。 如果部提前

3、按关门按钮则立即关门,若部一直按开门按钮则直到松开该按钮再关门。(5)开机时电梯停在一层,所有请求全清除。三、方案论证与系统分析:本实验可以采取多种方案,比如单片机实现,纯硬件打结等,但此次的方法采用可编程逻辑器件通过对器件部的设计来实现系统功能,是一种基于芯片的设计方法.设计者可以根据需要定义器件部逻辑和引出端,将电路板设计的大部分工作放在芯片的设计中进行,通过对芯片设计实现数字系统的逻辑功能.灵活的部功能块组合,引出端定义等,可大大减轻电路设计和电路板设计和电路板设计的工作量和难度,有效的增强设计的灵活性,提高工作效率1.同时采用可编程逻辑器件,设计人员在实验室可反复编程,修改错误,以期尽

4、快开发开发产品,迅速占领市场。基于芯片的设计方法可以减少芯片的数量,缩小系统体积,降低能源消耗,提高系统的性能和可靠性。 现在分析一下该系统的特点。该设计采用方向优先控制方式方案,方向优先控制是指电梯运行到某一楼层时先考虑这一楼层是否有请求:有,则停止;无,则继续前进。停下来后再启动时的步骤:考虑前方上方或下方是否有请求:有,则继续前进;无,则停止;检测后方是否有请求,有请求则转向运行,无请求则维持停止状态。这种运作方式下,电梯对用户的请求响应率为100%,且响应的时间较短。电梯在维修停止状态的时候可以进入省电模式,又能节省大量电能。电梯方向有限控制方式控制器系统方框图如图1所示,电路图如图2

5、所示。图1 电梯控制器系统方框图,图2 电梯控制器电路图。 图1顶层原理图:四、模块设计1.电梯部的楼层选择模块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,clear4,clear5,clear6,clear7

6、,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;elseif(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&start=0)floorto1=0;else ;end

7、always (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=1&start=0)floorto3=0;else ;endalways (rst or n5 or clear5)begin if(!rst) floorto4=0;

8、 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; else if(n7) floorto6=1;else if(clear7=1&start=0)floor

9、to6=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: begindup=8b11111110&floorto;ddown=8b00000000&floorto;end8b00000010: begindup=8b11111100&floorto;ddown=8b00000001&floor

10、to;end8b00000100:begindup=8b11111000&floorto; ddown=8b00000011&floorto;end8b00001000:begindup=8b11110000&floorto;ddown=8b00000111&floorto;end8b00010000:begin dup=8b11100000&floorto;ddown=8b00001111&floorto;end8b00100000: begin dup=8b11000000&floorto; ddown=8b00011111&floorto;end8b01000000: begin dup

11、=8b10000000&floorto; ddown=8b00111111&floorto;end8b10000000:begindup=8b00000000&floorto;ddown=8b01111111&floorto;enddefault:;endcaseendendmodule2.电梯外部的选择模块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,upc

12、lear5,upclear6,upclear7,downclear7,downclear2,downclear3,downclear4,downclear5,downclear6,downclear8,rest,start);inputup_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,do

13、wnclear4,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 or rest)begin if(rest)begin if(up_1)up0=1;else if(start=0&upclear1=1) up0=0;end else up0=0;end always (up_2 or upclear2 or rest)begin if(rest)begin if(up

14、_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&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=0&upclear4=1) up3=0;end else up3=0;enda

15、lways (up_5 or upclear5 or rest)begin if(rest)begin if(up_5)up4=1;else if(start=0&upclear5=1) up4=0;end else up4=0;endalways (up_6 or upclear6 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)up

16、6=1;else if(start=0&upclear7=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(downclear2=1&start=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)do

17、wn2=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&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 dow

18、n4=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;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 o

19、r downclear8 or rest)begin if(rest)begin if(down_8)down7=1;else if(downclear8=1&start=0)down7=0;else ;end else down7=0;endendmodule3.显示模块:电梯和电梯外的有关当前所在楼层和电梯上升或下降的显示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

20、,up;always (floor)begindisfloor=7b0000000;case(floor)8b00000001:disfloor=7b0110000; 8b00000010:disfloor=7b1101101; 8b00000100:disfloor=7b1111001; 8b00001000:disfloor=7b0110011; 8b00010000:disfloor=7b1011011; 8b00100000:disfloor=7b1011111; 8b01000000:disfloor=7b1110000; 8b10000000:disfloor=7b1111111;

21、 default: disfloor=7b0000000; endcase endalways (direc or stop)beginif(stop=1)begindown=0;up=0;endelse if(direc=1)beginup=1;down=0;endelse begindown=1;up=0;endendendmodule4.门控制模块;module door(start,autoclose,clk,stop,enclose,enopen,rst);output autoclose,start;input clk,enclose,stop,enopen,rst;reg aut

22、oclose,start,stop1;reg1:0 tcount;reg7:0 count;always (posedge rst or posedge stop or posedge clk)beginif(rst=1)begin start=0;count=7d0;stop1=1;endelse beginif(stop=1)stop17d5)stop1=0;else ; if(stop1=1) begin count=count+1;if(count=7d2)begin autoclose=1;start=0;endelse if(count=7d5) begin autoclose=0

23、;start=0;if(enopen) count=7d4;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;endendendendmodule 5主控制模块module main(dir,stop,clear,clearup,cleardown,rst,floor,up_s,down_s,up_f,down_f);

24、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_s|up_f);down=(down_s|down_f);testup=up&floor;testdown=down&floo

25、r;endalways (floor or rst or up or down)beginif(!rst)begin stop=0;dir=1;clear=8b00000000;clearup=8b00000000;cleardown=8b00000000;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)begin case(floor)8b00000001:if(testup0=0)begin stop=0;clearup0=0;end el

26、se begin stop=1;clearup0=1;end8b00000010:if(testup1=0)begin stop=0;clearup1=0;end else begin stop=1;clearup1=1;end8b00000100:if(testup2=0)begin stop=0;clearup2=0;end else begin stop=1;clearup2=1;end8b00001000:if(testup3=0)begin stop=0;clearup3=0;end else begin stop=1;clearup3=1;end8b00010000:if(test

27、up4=0)begin stop=0;clearup4=0;end else begin stop=1;clearup4=1;end8b00100000:if(testup5=0)begin stop=0;clearup5=0;end else begin stop=1;clearup5=1;end8b01000000:if(testup6=0)begin stop=0;clearup6=0;end else begin stop=1;clearup6=1;end8b10000000:if(testup7=0)begin stop=0;clearup7=0;end else begin sto

28、p=1;clearup7=1;enddefault:begin clearup=8b00000000;stop=0;endendcase endelse if(down!=0&dir=0)begin case(floor)8b00000001: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 else begi

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论