全自动电梯控制电路.docx

上传人:b****1 文档编号:13377097 上传时间:2023-06-13 格式:DOCX 页数:13 大小:227.86KB
下载 相关 举报
全自动电梯控制电路.docx_第1页
第1页 / 共13页
全自动电梯控制电路.docx_第2页
第2页 / 共13页
全自动电梯控制电路.docx_第3页
第3页 / 共13页
全自动电梯控制电路.docx_第4页
第4页 / 共13页
全自动电梯控制电路.docx_第5页
第5页 / 共13页
全自动电梯控制电路.docx_第6页
第6页 / 共13页
全自动电梯控制电路.docx_第7页
第7页 / 共13页
全自动电梯控制电路.docx_第8页
第8页 / 共13页
全自动电梯控制电路.docx_第9页
第9页 / 共13页
全自动电梯控制电路.docx_第10页
第10页 / 共13页
全自动电梯控制电路.docx_第11页
第11页 / 共13页
全自动电梯控制电路.docx_第12页
第12页 / 共13页
全自动电梯控制电路.docx_第13页
第13页 / 共13页
亲,该文档总共13页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

全自动电梯控制电路.docx

《全自动电梯控制电路.docx》由会员分享,可在线阅读,更多相关《全自动电梯控制电路.docx(13页珍藏版)》请在冰点文库上搜索。

全自动电梯控制电路.docx

全自动电梯控制电路

全自动电梯控制电路

1.选题目的

随着我国经济持续增长、城镇化建设的加速和房地产行业的进一步发展,对电梯的需求越来越大。

所以电梯控制器就需要大强度的发展,来满足社会的需求。

电梯的发展更加的智能化,节约化。

对社会的发展,人民生活水平的提高具有很大的意义。

所以加大对电梯控制器的发展,和技术上的研究是很重要的。

随着EDA技术发展和应用领域的扩大与深入,EDA技术在电子信息、通讯、自动控制及计算机应用等领域的重要性突出。

随着技术市场与人才市场对EDA的需求不断提高,产品的市场需求和技术市场的要求也必然会反映到教学领域和科研领域中来。

EDA技术的提高,促进了电梯控制器的发展。

电梯行业也随着科技的发展,不断地出现在人们生活的各个场所,因此,对电梯控制器的设计是一个很实用的例子,对掌握EDA技术的应用也有很大的帮助。

二.设计目标

掌握EDA设计的一般方法;熟悉Quartus9.0软件,利用其设计一个符合以下设计要求的全自动电梯控制电路。

·设计要求

设计一个4层楼房全自动电梯控制电路,其功能如下:

◆每层楼电梯入口处设有上,下请求开关各1,电梯内设有乘客到达层次的停站要求开关。

◆有电梯所处位置指示装置和电梯上行,下行状态批示装置。

◆电梯每秒升(降)一层楼。

到达某一层楼时,指示该层次的灯发光,并一直保持到电梯到达新一层为止。

◆电梯到达有停站请求的楼层后,该层次的指示灯亮,经过0.5S,电梯门自动打开,开门指示灯亮,开门5S后,电梯门自动关闭(开门指示灯灭),电梯继续运行。

◆能记忆电梯内外的所有请求信号,并按照电梯运行规则次第响应,每个请求信号保留至执行后撤除。

◆电梯运行规则,电梯处于上升模式时,只响应比电梯所在位置高的层次的上楼请求信号,由下而上逐个执行,直到最后一个请示执行完毕。

如更高层次有下楼请求,则直接升到有下楼请求的楼层接客,然后便进入下降模式。

电梯处于下降模式时与之相反,仅响应比电梯所在位置低的楼层的下楼请求。

电梯执行完所有的请求后,应停在最后所在的位置不变,等待新的请求。

◆开机(接通电源)时,电梯应停留在一楼,而各种上,下请求皆被清除。

3.实现方案

3.1控制器的控制模块

控制器包括主控制器、楼层选择器、状态显示器、译码器和楼层显示器等6个模块。

乘客在电梯中选择所要到达的楼层,通过主控制器的处理,电梯开始运行,状态显示器显示电梯的运行状态,电梯所在楼层数通过译码器译码从而在楼层显示器中显示。

分控制器把有效的请求传给主控制器进行处理,同时显示电梯的运行状态和电梯所在楼层数。

 

3.2控制器的流程图

 

总流程图

 

电梯控制主流程图

3.3控制器的VHDL描述模块流程

四层电梯控制器的设计主要是对实体和结构体的设计,它的VHDL描述模块流程如图:

 

四层电梯控制器的VHDL描述模块流程

4.设计过程

4.1设计程序

libraryieee;

useieee.std_logic_1164.all;

useieee.std_logic_unsigned.all;

entityyxhis

port(clk:

instd_logic;

clkout:

outstd_logic);

endyxh;

architectureoneofyxhis

signalcount:

std_logic_vector(8downto0);

begin

process

begin

waituntilclk'eventandclk='1';

ifcount<500thencount<=count+1;clkout<='0';

elsecount<=(others=>'0');clkout<='1';

endif;

endprocess;

endarchitectureone;

Elevator模块(控制器):

libraryieee;

useieee.std_logic_1164.all;

useieee.std_logic_unsigned.all;

entityelevatoris

port(clk:

instd_logic;

up1,up2,up3,stop1,stop2,stop3,stop4,down4,down3,down2:

instd_logic;

ddelay,dclose:

instd_logic;

upled,downled:

outstd_logic;

floorled,nowfloor:

outstd_logic_vector(3downto0);

dopenled:

outstd_logic_vector(5downto0));

endelevator;

architecturebhvofelevatoris

typestate_typeis(start,run,opendoor,dopenwait2,dopenwait3,dopenwait4,dopenwait5,dopenwait6,dopenwait7,dopenwait8,

dopenwait9,dopenwait10,dclse,up,down,upwait1,upwait2,downwait1,downwait2,stop);

signalstate:

state_type;

signalupm,downm,stopm,dat:

std_logic_vector(3downto0);

signaldclosem,ddelaym:

std_logic;

begin

state_trans:

process(clk,up1,up2,up3,down4,down3,down2,stop1,stop2,stop3,stop4,upm,downm,stopm,dat,ddelay,dclose)

variableposition:

integerrange0to4;

begin

ifrising_edge(clk)then

ifup1='1'thenupm(0)<='1';endif;

ifup2='1'thenupm

(1)<='1';endif;

ifup3='1'thenupm

(2)<='1';endif;

upm(3)<='0';

ifdown4='1'thendownm(3)<='1';endif;

ifdown3='1'thendownm

(2)<='1';endif;

ifdown2='1'thendownm

(1)<='1';endif;

downm(0)<='0';

ifstop1='1'thenstopm(0)<='1';endif;

ifstop2='1'thenstopm

(1)<='1';endif;

ifstop3='1'thenstopm

(2)<='1';endif;

ifstop4='1'thenstopm(3)<='1';endif;

ifdclose='1'thendclosem<='1';endif;

ifddelay='1'thenddelaym<='1';endif;

dat<=upmordownmorstopm;

casestateis

whenstart=>

ifdat="0000"thenstate<=start;

elsifposition=0thenposition:

=position+1;state<=run;

endif;

whenrun=>

ifstopm(0)='1'orupm(0)='1'then

stopm(0)<='0';upm(0)<='0';state<=opendoor;

elsifdat>"0001"thenstate<=up;

endif;

elsifposition=2then

ifstopm

(1)='1'orupm

(1)='1'ordownm

(1)='1'then

stopm

(1)<='0';upm

(1)<='0';downm

(1)<='0';state<=opendoor;

elsifdat>"0011"thenstate<=up;

elsifdat<"0010"thenstate<=down;

endif;

elsifposition=3then

ifstopm

(2)='1'orupm

(2)='1'ordownm

(2)='1'then

stopm

(2)<='0';upm

(2)<='0';downm

(2)<='0';state<=opendoor;

elsifdat>"0111"thenstate<=up;

elsifdat<"0100"thenstate<=down;

endif;

elsifposition=4then

ifstopm(3)='1'ordownm(3)='1'then

stopm(3)<='0';downm(3)<='0';state<=opendoor;

elsifdat<"1000"thenstate<=down;

endif;

endif;

whenup=>upled<='1';state<=upwait1;

whenupwait1=>state<=upwait2;

whenupwait2=>

upled<='0';position:

=position+1;

ifposition=2and(upm>"0011"orstopm>"0011")andstopm

(1)='0'andupm

(1)='0'thenstate<=up;

elsifposition=3anddat>"0111"andstopm

(2)='0'andupm

(2)='0'thenstate<=up;

elsestate<=opendoor;

endif;

whendown=>downled<='1';state<=downwait1;

whendownwait1=>state<=downwait2;

whendownwait2=>

downled<='0';position:

=position-1;

ifposition=3and(downm<"0100"orstopm<"0100")andstopm

(2)='0'anddownm

(2)='0'thenstate<=down;

elsifposition=2anddat<"0010"andstopm

(1)='0'anddownm

(1)='0'thenstate<=down;

elsestate<=opendoor;

endif;

whenopendoor=>

ifposition=1thenstopm(0)<='0';upm(0)<='0';

elsifposition=2thenstopm

(1)<='0';upm

(1)<='0';downm

(1)<='0';

elsifposition=3thenstopm

(2)<='0';upm

(2)<='0';downm

(2)<='0';

elsifposition=4thenstopm(3)<='0';downm(3)<='0';

endif;

dopenled<="001100";

ifdclosem='1'thenstate<=dopenwait9;dclosem<='0';

elsifddelaym='1'thenstate<=opendoor;ddelaym<='0';

elsestate<=dopenwait2;

endif;

whendopenwait2=>

ifdclosem='1'thenstate<=dopenwait9;dclosem<='0';

elsifddelaym='1'thenstate<=opendoor;ddelaym<='0';

elsestate<=dopenwait3;

endif;

whendopenwait3=>dopenled<="011110";state<=dopenwait4;

whendopenwait4=>

ifdclosem='1'thenstate<=dopenwait9;dclosem<='0';

elsifddelaym='1'thenstate<=opendoor;ddelaym<='0';

elsestate<=dopenwait5;

endif;

whendopenwait5=>dopenled<="111111";state<=dopenwait6;

whendopenwait6=>

ifdclosem='1'thenstate<=dopenwait9;dclosem<='0';

elsifddelaym='1'thenstate<=opendoor;ddelaym<='0';

elsestate<=dopenwait7;

endif;

whendopenwait7=>dopenled<="011110";state<=dopenwait8;

whendopenwait8=>

ifdclosem='1'thenstate<=dopenwait9;dclosem<='0';

elsifddelaym='1'thenstate<=opendoor;ddelaym<='0';

elsestate<=dopenwait9;

endif;

whendopenwait9=>dopenled<="001100";state<=dopenwait10;

whendopenwait10=>

ifdclosem='1'thenstate<=dopenwait9;dclosem<='0';

elsifddelaym='1'thenstate<=opendoor;ddelaym<='0';

elsestate<=dclse;

endif;

whendclse=>

dopenled<="000000";

ifdat>"0000"thenstate<=run;

elsestate<=stop;

endif;

whenstop=>ifdat>"0000"thenstate<=run;

elsifddelaym='1'thenstate<=opendoor;ddelaym<='0';

elsestate<=stop;

endif;

endcase;

endif;

ifposition=1thennowfloor<="0001";floorled<="0001";

elsifposition=2thennowfloor<="0010";floorled<="0010";

elsifposition=3thennowfloor<="0011";floorled<="0100";

elsifposition=4thennowfloor<="0100";floorled<="1000";

elsenowfloor<="0000";floorled<="0000";

endif;

endprocessstate_trans;

endbhv;

综合实现模块:

libraryieee;

useieee.std_logic_1164.all;

useieee.std_logic_unsigned.all;

entityfinalctrolis

port(clk:

instd_logic;

up1,up2,up3,stop1,stop2,stop3,stop4,down4,down3,down2:

instd_logic;

ddelay,dclose:

instd_logic;

upled,downled:

outstd_logic;

floorled,nowfloor:

outstd_logic_vector(3downto0);

dopenled:

outstd_logic_vector(5downto0));

endfinalctrol;

architecturearcoffinalctrolis

componentyxh

port(clk:

instd_logic;

clkout:

outstd_logic);

endcomponent;

componentelevator

port(clk:

instd_logic;

up1,up2,up3,stop1,stop2,stop3,stop4,down4,down3,down2:

instd_logic;

ddelay,dclose:

instd_logic;

upled,downled:

outstd_logic;

floorled,nowfloor:

outstd_logic_vector(3downto0);

dopenled:

outstd_logic_vector(5downto0));

endcomponent;

signalclkwire:

std_logic;

begin

U1:

yxhportmap(clk,clkwire);

U2:

elevatorportmap(clkwire,up1,up2,up3,stop1,stop2,stop3,stop4,down4,down3,down2,

ddelay,dclose,upled,downled,floorled,nowfloor,dopenled);          

endarchitecture;

4.2输入输出端口图

5.遇到问题及解决方法

遇到问题:

由于电梯内的人可能会出现部分人须要上楼,部分人需要下楼的情况,所以需要先响应电梯运行方向上最近楼层的指令,待该方向上所有指令运行结束后再运行反方向时的指令。

解决方法:

用if或when语句,使得当电梯运行方向上的楼层输入端的所有输入都为0时,才运行反方向最近的楼层的指令。

不足:

未考虑到电梯可能会出现的未知不可自行解决的异常情况。

解决方法:

应设置reset端,使电梯出现异常情况时回到初始状态。

6.实现结果

时序仿真波形

7.对该课程的实施意见及建议

建议学校适当增加理论课的课程学时,同学们想对该课程有更深入的学习和理解,但囿于课时太短,很多内容得课下自己看书学习。

另外建议学校整修一下上机教室的电脑,人多机少不够用。

 

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 幼儿教育 > 幼儿读物

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2