VHDL项目设计“三层电梯控制系统”

合集下载

基于PLD的三层电梯的控制设计

基于PLD的三层电梯的控制设计

基于PLD的三层电梯的控制设计【摘要】电梯作为现代化的产物在咱们的生活当中已必不可少。

随着经济建设的高速进展,我国电梯需求量愈来愈大。

由此,一个更为庞大的电梯市场已经在国内轰然形成。

本设计是基于可编程逻辑器件(PLD)技术中的甚高速集成电路硬件描述语言(VHDL)语言所开发的三层电梯控制程序。

本程序具有VHDL语言设计里最为常常利用的三个模块:实体entity、结构体architecture、进程执行单元process。

通进程序调试及运行仿真,结果表明,本程序能够完成:电梯运行所在楼层指示、电梯运行方向指示、关门延时设置、看门狗报警、超载报警、故障报警等。

本设计对更高层的电梯控制设计具有必然的拓展性。

【关键词】:电梯控制,程序设计,PLD,VHDLABSTRACTThe product as a modern elevator in our lives has been the sustained and rapid development of economic construction, China's increasing demand for a result, a much larger domestic elevator market has formed a bang. This design is based on Programmable Logic Devices (PLD)in a Very High speed of the integrated hardware Describe Language (VHDL)in developing the third floor of the lift of control procedures. this program has vhdl language designed for the best of three modules :entity, architecture, process. Through the program run, debug and simulation results show that the application can finish:the floor, in the direction, the delay, the guard dog the police, and failure the police, etc. this design with higher the control of the design.【KEY WORD】:lift control, programmer, PLD, VHDL目录引言 (2)一、设计的基础依据 (2)(一)EDA技术介绍 (2)(二)VHDL语言介绍 (2)(三)MAX+plusII软件介绍 (3)二、方案论证 (3)(一)基于PLC技术的电梯控制设计方案 (3)(二)基于PLD技术的电梯控制设计方案 (4)(三)方案选择 (4)三、程序设计 (5)(一)算法分析 (5)(二)程序设计 (7)四、程序调试 (14)五、程序仿真 (16)(一)波形输入成立 (16)(二)电梯运行情形仿真 (18)(三)电梯功能仿真 (20)总结 (21)附录一三层电梯控制的源程序 (22)附录二引脚锁定情形 (26)参考文献 (27)引言我国部份地域人口高度密集,人和土地资源欠缺的矛盾日趋激化,这就要求人们合理地利用土地去解决人与土地的矛盾。

3层电梯VHDL报告

3层电梯VHDL报告

一.实验题目简易二层电梯控制器模拟真实电梯的运行情况,设计制作一个简易电梯控制器控制二层电梯的运行。

基本要求:1、电梯设有一层、二层外部呼叫按钮和内部一层、二层指定按钮(BTN)。

2、利用数码管显示电梯所在楼层,用LED显示电梯运行状态如上行、下行、开门、关门等。

提高要求:1、点阵显示楼层;2、用点阵显示楼层的上下滚动移出移入表示电梯的上行或下行运行方向3、增加为三层电梯控制器二.设计方案及思路设计思路:根据题目要求,我在程序中设计了需要用到的8个外部按钮:f1up,f2up ,f2dn,f3dn,warning,stop1,stop2,stop3,reset,另外还有相应的显示信号,程序利用状态机实现总体的控制,状态中用到了7个状态:(stopon1,dooropen,doorclose,doorwait,up1,down1,stop),状态的主要转换如下:设定复位后初始状态是stopon1,然后状态跳转到doorclose,在接收到相应的请求信号时,做出判断,若请求信号的楼层大于当前所在的楼层,则程序跳转到up1状态,小于则跳转到down1状态,如果请求信号的楼层与当前楼层相同时,则开门进入dooropen 状态,然后到开门延迟状态doorwait,然后再到doorclose状态,上升和下降的过程中判断电梯是否到达指定的楼层,若到达,则程序进入stop状态,然后到开门->延时->关门,进而做判断。

状态转移图如下:各个状态线表示的内容如下: 1初始化2 初始化后电梯进入工作状态,起始是关门状态3 没有任何信号输入时,电梯始终工作在关门状态4 电梯接收到信号,且请求信号大于当前楼层5 电梯上升后到达指定楼层时停止1161092stopon1 dooropenup1stopdoorwait1doorclosedown1 345876 电梯停止后便开门7 延时等待乘客搭乘电梯或者走出电梯 8 等待时间结束后电梯关门9 电梯接收到信号,且请求信号小于当前楼层 10 电梯下降到指定楼层后停止11 电梯接受的信号与当前楼层相同则开门控制原理图:分块设计:程序中主要分了3个模块:分频模块,状态控制,状态显示,其中状态显示分成了信号灯显示部分和点阵显示部分,因为一开始对点阵的显示比较生疏,所以点阵显示模块是后来才在总的程序中加入的。

基于VHDL的电梯控制系统设计

基于VHDL的电梯控制系统设计

VHDL数字系统设计与测试实验报告基于VHDL的电梯控制系统设计一、设计背景及说明随着高层建筑的不断涌现,对电梯的需求也与日俱增,电梯已经成为我们日常生活中不可缺少的部分,稳定可靠性高的电梯系统成为了电梯领域的新需求。

现在基于VHDL硬件描述语言,用FPGA为控制芯片控制完成一个简单的6层楼的电梯控制系统设计。

我们常见的电梯控制系统功能都包括:上升请求、下降请求、电梯门控、楼层显示灯、电梯运动方向显示、超载、报警、电梯内请求信号等。

根据这些常用的信号设计一个电梯系统,实现所要求的功能。

控制方式的选择:1)内部请求优先控制方式内部请求控制方式类似于出租车的工作方式,先将车上的人送至目地,再去载客。

作为通用型电梯应该服务于大多数人,必须考虑电梯对内外请求的响应。

在内部请求优先控制方式中,当电梯外部人的请求和电梯内部人的请求冲突时,外部人的请求信号可能被长时间忽略,因为它不能作为通用型电梯的设计方案。

2)单层层停控制方案单层层停控制方式等同于火车运行方式,遇到站即停止、开门。

这种方案保证所有的人的请求都能得到响应。

然而这样对电梯的效率产生了消极的影响:不必要的等待消耗了大量时间,而且电梯的运作与用户的请求无关,当无请求时电梯也照常跑空车,浪费了大量的电能。

对于用户而言这种控制方式的请求响应时间也不是很快,因而也不是理想的电梯控制设计方案。

3)方向优先控制式方式方案方向优先控制是指电梯运行到某一层楼时,先考虑这一层楼是否有请求:有则停止;无则继续上升或者下降。

停止后再启动时,考虑上方或者下方是否有请求,有则继续前进,无则停止。

检测后方是否有请求,有请求则转向运行,无请求则维持停止状态。

这种运作方式下,电梯对用户的请求相应率为100%,而且响应的时间较短。

方向优先控制方式的效率远远大于单向层层停等控制方式的效率。

而且,方向控制方式下,电梯在维持停止状态的时候可以进入省电模式,又能节省大量的电能。

在本设计中采用方向优先控制方式。

vhdl设计三层电梯控制程序

vhdl设计三层电梯控制程序

library ieee;use lift isport(clk,reset,up1,up2,down2,down3,stop1,stop2,stop3,checkow:in std_logic; --buttons uplight,downlight,stoplight:buffer std_logic_vector(3 downto 1);udmode:buffer std_logic; --0- 电梯处于上升模式,1-电梯处于下降木模式position:buffer integer range 1 to 3; --电梯位置doorlight: out std_logic; --电梯门开关灯loc: out std_logic_vector(6 downto 0); --显示电梯位置ss: buffer integer range 0 to 3; --电梯所处状态--0--上升--1-下降--2停止out_state: out std_logic_vector(6 downto 0);--电梯所处状态--u--上升d--下降--s-停止overweight_light :out std_logic);--超重提醒灯end lift;architecture aaa of lift istype state_type is(stopon1,dooropen,doorclose,wait1,wait2,wait3,wait4,up,down,stop); signal state:state_type:=stopon1;signal clearup,cleardown,buttclk,liftclk:std_logic;signal q,p:integer range 0 to ;component xianshiport(position: in integer range 0 to 9;segment_7: out std_logic_vector(6 downto 0));end component;component upordownport(ss: in integer range 0 to 2 ;segment_7: out std_logic_vector(6 downto 0));end component;beginprocess(clk)--电梯分频进程1sbeginif reset='1' then q<=0;elsif clk'event and clk='1' thenif q= then liftclk<='1';q<=0;--if q=2 then liftclk<='1';q<=0;else liftclk<='0';q<=q+1;end if;end if;end process;process(clk)----电梯按键分频进程==beginif reset='1' then p<=0;elsif clk'event and clk='1' thenif p=9999999 then buttclk<='1';p<=0;--if p=2 then buttclk<='1';p<=0;else buttclk<='0';p<=p+1;end if;end if;end process;cont:process(reset,liftclk)--电梯状态机variable pos :integer range 3 downto 0;beginif reset='1' thenstate<=stopon1;clearup<='0';cleardown<='0';elsif liftclk='1' and liftclk'event thenif checkow='1' then state<=wait1;elsecase state iswhen stopon1=>doorlight<='1';position<=1;pos:=1;state<=wait1;udmode<='0';when wait1=>if checkow='1' then state<=wait1;overweight_light<='1';else state<=wait2; ss<=2;overweight_light<='0';end if;when wait2=>if checkow='1' then state<=wait1;overweight_light<='1';else clearup<='0';cleardown<='0'; state<=wait3;ss<=2;overweight_light<='0';end if;when wait3=>if checkow='1' then state<=wait1;overweight_light<='1';else state<=wait4;ss<=2;overweight_light<='0';end if;when wait4=>if checkow='1' then state<=wait1;overweight_light<='1';else overweight_light<='0';state<=doorclose;ss<=2;end if;when doorclose=> doorlight<='0';ss<=2;if udmode='0' thenif position=3 thenif stoplight="000" and uplight="000" and downlight="000" thenudmode<='1'; state<=doorclose;elsif downlight(3)='1' or stoplight(3)='1' then state<=dooropen;else udmode<='1'; state<=down;end if;elsif position=2 thenif stoplight="000"and uplight="000" and downlight="000"thenudmode<='0';state<=doorclose;elsif uplight(2)='1' or stoplight(2)='1' then state<=dooropen;elsif stoplight(3)='1'or downlight(3)='1' thenudmode<='0'; state<=up;else udmode<='1';state<=down;end if;elsif position=1 thenif stoplight="000" and uplight="000" and downlight="000"thenudmode<='0'; state<=doorclose;elsif uplight(1)='1' or stoplight(1)='1' then state<=dooropen;else udmode<='0'; state<=up;end if;end if;elsif udmode='1' thenif position=1 thenif stoplight="000" and uplight="000"and downlight="000" thenudmode<='0';state<=doorclose;elsif uplight(1)='1' or stoplight(1)='1' then state<=dooropen;else udmode<='0';state<=up;end if;elsif position=2 thenif stoplight="000" and uplight="000"and downlight="000" thenudmode<='1';state<=doorclose;elsif downlight(2)='1' or stoplight(2)='1' then state<=dooropen;elsif stoplight(1)='1'or uplight(1)='1'thenudmode<='1'; state<=down;else udmode<='0';state<=up;end if;elsif position=3 thenif stoplight="000" and uplight="000"and downlight="000" thenudmode<='1';state<=doorclose;elsif downlight(3)='1' or stoplight(3)='1' then state<=dooropen;else udmode<='1';state<=down;end if;end if;end if;when up=> position<=position+1;pos:=pos+1;ss<=0;if pos=2 and stoplight(2)='0' and uplight(2)='0' and (stoplight(3)='1' or downlight(3)='1') then state<=up;else state<=stop;end if;when down=> position<=position-1;pos:=pos-1;ss<=1;if pos=2 and stoplight(2)='0' and uplight(2)='0' and (stoplight(1)='1' or uplight(1)='1') then state<=down;else state<=stop;end if;when stop=>state<=dooropen;when dooropen=>doorlight<='1';ss<=2;if udmode='0' thenif pos<3 and (stoplight(pos)='1' or uplight(pos)='1') then clearup<='1';else clearup<='1';cleardown<='1';end if;elseif pos>1 and (stoplight(pos)='1' or uplight(pos)='1') then cleardown<='1';else clearup<='1';cleardown<='1';end if;end if;state<=wait1;when others=> state<=stopon1;ss<=2;end case;end if;end if;end process cont;butt:process (reset,buttclk)--按键灯控制进程beginif reset='1' thenstoplight<="000"; uplight<="000"; downlight<="000";elseif buttclk'event and buttclk='1' thenif clearup='1' then--stoplight(position)<='0';uplight(position)<='0';elseif up1='1' then uplight(1)<='1';end if;if up2='1' then uplight(2)<='1';end if;end if;if cleardown='1' then--stoplight(position)<='0';downlight(position)<='0';elseif down2='1' then downlight(2)<='1';end if;if down3='1' then downlight(3)<='1';end if;end if;if clearup='1' or cleardown='1' thenif position=1 then stoplight(1)<='0';if stop2='1' then stoplight(2)<='1' ;end if;if stop3='1' then stoplight(3)<='1' ;end if;elsif position=2 then stoplight(2)<='0';if stop1='1' then stoplight(1)<='1' ;end if;if stop3='1' then stoplight(3)<='1' ;end if;elseif stop1='1' then stoplight(1)<='1' ;end if;if stop2='1' then stoplight(2)<='1' ;end if;end if;end if;end if;end if;end process butt;h1:xianshi port map(position=>position,segment_7=>loc);--数码管显示楼层si:upordown port map(ss=>ss,segment_7=>out_state);--数码管显示状态end aaa;--------------数码管显示楼层--------------library ieee;use xianshi isport(position: in integer range 0 to 9 ;segment_7: out std_logic_vector(6 downto 0));end xianshi;architecture a of xianshi isbeginprocess(position)begincase position iswhen 1=>segment_7<="1111001";when 2=>segment_7<="0100100";when 3=>segment_7<="0110000";when 4=>segment_7<="0011001";when 5=>segment_7<="0010010";when 6=>segment_7<="0000010";when 7=>segment_7<="1111000";when 8=>segment_7<="0000000";when 9=>segment_7<="0010000";when others=>segment_7<="1000000";end case;end process;end a;-------------------数码管显示状态----------------- library ieee;use upordown isport(ss: in integer range 0 to 2 ;segment_7: out std_logic_vector(6 downto 0) );end upordown;architecture a of upordown isbeginprocess(ss)begincase ss iswhen 0=>segment_7<="0011101";when 1=>segment_7<="0100001";when others=>segment_7<="0010010";end case;end process;end a;。

VHDL项目设计“三层电梯控制系统”

VHDL项目设计“三层电梯控制系统”

三层电梯控制系统一、设计功能与要求电梯控制系统是的设计目标是按照使用者的要求控制电梯的运行。

要求用VHDL设计出三层电梯的控制系统,基本功能要求如下:1、每层电梯入口处设有上、下请求开关,使用者可以根据自身的上下楼需要按下相应按键;电梯内部设有到达楼层按钮,使用者可以选择到达楼层。

2、设有电梯运行模式(上、下)标识和当前所在楼层标识。

3、电梯运行模式等同于普通电梯运行模式,电梯一般按照提出请求的先后顺序进行响应。

程序根据电梯当前位置和使用者所在楼层以及进入电梯后的要求控制运行状态。

4、电梯初始模式为一层关门状态。

二、设计思路本系统的主要输入有电梯外上下控制按钮Button(其中Button(0)表示一楼电梯外上升请求,Button(1)表示二楼电梯外上升请求,Button(2)表示二楼电梯外下降请求,Button(3)表示三楼电梯外下降请求);电梯内到达楼层控制按钮floor(其中floor(0)表示请求到达一层,floor(1)表示请求到达二层,floor(2)表示请求到达三层)。

系统的输出包括电梯位置标识position,表示电梯当前所在楼层;电梯开门关门显示按钮door(当door=1时表示开门,door=0表示关门);电梯当前运行状态按钮up_down(当up_down=1时表示电梯处于上升状态,当up_down=0时表示电梯处于下降状态)。

系统主要通过当前所在楼层以及运行状态、后续请求判断运行方式。

电梯处在第一层时,当它收到二层电梯外上下楼请求、三层电梯外下楼请求、一层电梯内到达二层和三层请求时,电梯会按照指令上升到相应楼层并开门、关门;若收到一层电梯外上楼请求只做开门响应,随后根据使用者进入电梯后请求进行响应;其他请求不响应。

当电梯处在第二层时,若系统收到二层电梯外上下楼请求只做开门响应;若收到三层电梯外下楼或二层电梯内到达三层请求,则做上楼响应、开门;若收到一层电梯外上楼或二层电梯内到达一层请求,则做下楼楼响应并开门;其他请求不响应。

电梯控制系统VHDL课程设计

电梯控制系统VHDL课程设计

电梯控制系统VHDL课程设计一、课程目标知识目标:1. 学生能理解电梯控制系统的基本原理,掌握VHDL语言在电梯控制系统中的应用;2. 学生能运用VHDL语言编写简单的电梯控制程序,实现电梯的基本功能,如楼层召唤、楼层到达等;3. 学生了解电梯控制系统的模块化设计,掌握模块之间的通信与协同工作原理。

技能目标:1. 学生能够运用所学知识,设计并实现一个简单的电梯控制系统;2. 学生通过课程学习,培养解决实际问题的能力,提高逻辑思维和编程技能;3. 学生能够利用仿真工具对电梯控制系统进行测试与优化。

情感态度价值观目标:1. 学生培养对电子工程领域的兴趣,激发创新精神,提高自主学习能力;2. 学生通过课程学习,认识到团队合作的重要性,培养团队协作精神;3. 学生能够关注电梯控制系统在现实生活中的应用,理解技术发展对社会进步的推动作用。

课程性质:本课程为电子工程专业高年级的实践课程,旨在通过电梯控制系统的设计,帮助学生巩固VHDL语言知识,提高实际工程应用能力。

学生特点:学生具备一定的电子工程基础和VHDL编程经验,具有较强的学习能力和动手能力。

教学要求:教师需引导学生将理论知识与实际应用相结合,注重培养学生的实践能力和团队合作精神,提高学生的综合素质。

通过课程目标的分解与实现,使学生在实践中掌握电梯控制系统的设计方法。

二、教学内容1. 电梯控制系统原理回顾:讲解电梯控制系统的基本组成、工作原理及功能模块划分,对应教材第3章;2. VHDL语言基础:复习VHDL的基本语法、数据类型、信号与变量等概念,对应教材第2章;3. 电梯控制系统模块设计:分析电梯控制系统的各个功能模块,如楼层召唤、楼层显示、电梯运行控制等,对应教材第4章;- 楼层召唤模块:设计并实现楼层召唤信号的检测与处理;- 楼层显示模块:设计并实现楼层显示功能;- 电梯运行控制模块:设计并实现电梯运行方向与速度的控制;4. VHDL代码编写与仿真:根据设计要求,运用VHDL语言编写各模块程序,利用仿真工具进行测试与验证,对应教材第5章;5. 电梯控制系统整体设计与实现:将各个模块整合,完成电梯控制系统的整体设计,进行系统级仿真与优化,对应教材第6章;6. 课程项目实践:学生分组进行电梯控制系统的设计、编程、仿真及测试,培养团队协作能力和实际工程应用能力。

三层电梯控制vhdl语言

三层电梯控制vhdl语言

library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity threelift12345 is--实体port(buttonclk:in std_logic; --按键时钟信号liftclk:in std_logic; --电梯时钟信号reset:in std_logic; --异步复位端口f1upbutton:in std_logic; --一层上升请求端口f2upbutton:in std_logic; --二层上升请求端口f2dnbutton:in std_logic; --二层下降请求端口f3dnbutton:in std_logic; --三层下降请求端口stop1button:in std_logic; --一层停站请求端口stop2button:in std_logic; --二层停站请求端口stop3button:in std_logic; --三层停站请求端口position:buffer integer range 1 to 3; --电梯位置信号udsig:buffer std_logic; --电梯模式(上升或下降)信号fuplight,fdnlight,stoplight:buffer std_logic_vector(3 downto 1);--上升、下降、停站请求寄存信号doorlight:out std_logic; --开关门信号dout1:out std_logic_vector(2 downto 0));end entity;architecture art of threelift12345 is --结构体type lift_state is ---定义十个状态(stopon1,dooropen,doorclose,doorwait1,doorwait2,doorwait3,doorwait4,up,down,stop);signal mylift:lift_state;signal clearup:std_logic; --上升和停站请求清除信号signal cleardn:std_logic;---下降和停站请求清除信号beginprocess(reset,liftclk)is--状态机进程variable pos:integer range 3 downto 1;beginif reset='1' then ----异步复位,电梯的初始状态为一层开门状态mylift<=stopon1;clearup<='0';cleardn<='0';else if liftclk'event and liftclk='1' thenmylift<=doorwait1;case mylift iswhen stopon1=>doorlight<='1';position<=1; pos:=1; mylift<=doorwait1;--电梯等待4swhen doorwait1=>mylift<=doorwait2;when doorwait2=>clearup<='0';cleardn<='0';mylift<=doorwait3;when doorwait3=>mylift<=doorwait4;when doorwait4=>mylift<=doorclose;when doorclose=> ---关门,判定电梯下一个运行方式doorlight<='0';if udsig='1' then--电梯处在上升模式if position=3 thenif fuplight="000" and fdnlight="000" and stoplight="000" then--没有请求信号时,电梯停在当前层udsig<='0';mylift<=doorclose;elsif fdnlight(3)='1' or stoplight(3)='1' then --本层有请求信号是,电梯开门udsig<='0';mylift<=dooropen;else --否则下降udsig<='0';mylift<=down;end if;elsif position=2 thenif fuplight="000" and fdnlight="000" and stoplight="000" thenudsig<='1';mylift<=doorclose;elsif fuplight(2)='1' or stoplight(2)='1' then--本层有上升或停站请求时时,电梯开门udsig<='1'; mylift<=dooropen;elsif fuplight="000" and stoplight="000" and fdnlight="010" then---只有二层有下降请求时,电梯开门udsig<='0';mylift<=dooropen;elsif stoplight(3)='1' or fdnlight(3)='1' then---三层有停站请求或下降请求,则上升udsig<='1';mylift<=up;else udsig<='0';mylift<=down;end if;elsif position=1 thenif fuplight="000" and fdnlight="000" and stoplight="000" thenudsig<='1';mylift<=doorclose;elsif stoplight(1)='1' or fuplight(1)='1' then udsig<='1';mylift<=dooropen;else udsig<='1';mylift<=up;end if;end if;elsif udsig='0' then ---电梯处在下降模式if position=3 thenif fuplight="000" and fdnlight="000" and stoplight="000" thenudsig<='0';mylift<=doorclose;elsif fdnlight(3)='1' or stoplight(3)='1' thenudsig<='0';mylift<=dooropen;else udsig<='0';mylift<=down;end if;elsif position=2 thenif fuplight="000" and fdnlight="000" and stoplight="000" thenudsig<='0';mylift<=doorclose;--position<=position+1;--电梯楼层数加一--pos:=pos+1;--end if;if pos<3 and (stoplight(pos)='1' or fuplight(pos)='1') then mylift<=stop;--电梯在一层或二层,本层有停站或上升请求时,则停止elsif pos=3 and (stoplight(pos)='1' or fdnlight(pos)='1') then mylift<=stop; --电梯处在三层,并且有三层停站或下降请求,则停止else mylift<=doorclose;end if;-- position<=position-1;--电梯楼层数减一--pos:=pos-1;if pos>1 and (stoplight(pos)='1' and fdnlight(pos)='1') then mylift<=stop;elsif pos=1 and (stoplight(pos)='1' or fuplight(pos)='1') then mylift<=stop;else mylift<=doorclose; end if;end if;end if;end if;when stop=>mylift<=dooropen;when dooropen=> doorlight<='1';if udsig='1' thenif position<3 and (fuplight(pos)='1' or stoplight(pos)='1') thenclearup<='1'; --清除当前层上升和停站请求else clearup<='1';cleardn<='1'; end if;elsif udsig='0' thenif position>1 and (fdnlight(pos)='1' or stoplight(pos)='1') then cleardn<='1'; --清除当前层下降和停站请求else clearup<='1'; cleardn<='1'; end if;end if;when others =>null;end case;end if;end if;end process;process(reset,buttonclk)is---信号灯控制进程beginif reset='1' then ---复位,寄存信号清零fuplight<="000";fdnlight<="000";stoplight<="000";elseif buttonclk'event and buttonclk='1' thenif clearup='1' then ----上升和停站请求清零fuplight(position)<='0';stoplight(position)<='0';elseif f1upbutton='1' then ----记忆各层上升请求fuplight(1)<='1';elsif f2upbutton='1' then fuplight(2)<='1'; end if;end if;if cleardn='1' then --下降和停站请求清零fdnlight(position)<='0';stoplight(position)<='0';elseif f2dnbutton='1' then ---记忆各层下降请求fdnlight(2)<='1';elsif f3dnbutton='1' then fdnlight(3)<='1';end if;end if;if stop1button='1' then stoplight(1)<='1'; --记忆各层停站请求elsif stop2button='1' then stoplight(2)<='1';elsif stop3button='1' then stoplight(3)<='1';end if;end if;end if;end process;process(position)--楼层显示进程beginif position=1 then dout1<="001";elsif position=2 then dout1<="010";elsif position=3 then dout1<="011";end if;end process;end architecture;。

(完整word版)基于VHDL的三层电梯控制器设计

(完整word版)基于VHDL的三层电梯控制器设计

EDA 课程设计报告书课题名称 基于VHDL 的三层电梯控制器设计 姓 名学 号 院 系 专 业 指导教师年 月 日※※※※※※※※※ ※※ ※※ ※※级学生EDA 课程设计基于VHDL的三层电梯控制器的设计1设计目的近年来,中国房地产业的快速发展,与之配套的电梯生产制造业也经历了迅猛发展的阶段,电梯产量保持了每年20%以上的增长速度.随着我国经济持续增长、城镇化建设的加速和房地产行业的进一步发展,对电梯的需求越来越大。

估计未来50年中国新增住房面积将达到200亿平方米。

国家规定20米以上高楼就应安装电梯,因此未来电梯最大的市场就是住宅市场。

此外,机场、商场、地铁等大型公共设施建设对自动扶梯、观光电梯等电梯的需求量也十分可观。

电梯作为垂直方向的交通工具,在高层建筑和公共场所已经成为重要的建筑设备而不可或缺。

电梯产业的前景和走势随着社会的需求而悄然发生着改变,除了考虑安全、舒适、豪华装修等要求外,市场对新一代的绿色电梯、节能电梯和智能电梯的需求越来越旺盛。

国内外电梯企业顺应市场需要,加大研发投入,都准备在未来新概念电梯产业发展中占得先机。

随着城市化的高速发展,越来越多的摩天大楼拔地而起。

就摩天大楼的高度而言,不仅受建筑技术上的制约,而且还有电梯升高方面的困惑,因而,在摩天大楼日益完备智能化的趋势中,电梯的智能化也不容忽视。

它不仅是人们上上下下的代步工具,同时,也是摩天大楼智能化的一个重要标志.尽管电梯在摩天大楼中只是—个细节,但电梯智能化程度的高低却决定着它服务质量的优劣.因而,电梯的智能化在一定程度上反映出智能大厦的智能程度。

2设计的主要内容和要求(1)电梯一层入口处设有上升请求开关,二层入口处设有上、下请求开关,三层入口处设有下降请求开关,电梯内部设有顾客到达楼层的停站请求开关.(2)每层电梯入口处设有位置指示装置及电梯运行模式(上升或下降)指示装置。

(3)电梯初始状态为一层开门状态。

(4)电梯每秒上升(下降)一层楼。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

VHDL项目设计“三层电梯控制系统”
三层电梯控制系统是一种常见的嵌入式系统,用于控制电梯的运行和
停止。

它由三层楼、一台电梯和一组控制器组成,通过控制器对电梯的动
作进行控制。

本文将介绍一个基于VHDL的三层电梯控制系统的设计。

首先,我们需要定义系统的输入和输出。

对于一个三层电梯控制系统,输入可以包括三个楼层传感器的信号、电梯内部的按钮信号以及电梯的当
前位置。

输出可以包括电梯的运行方向、电梯门的开关状态以及电梯运行
的目标楼层。

接下来,我们需要设计电梯运行的逻辑。

电梯可以向上或向下运行,
它可以根据当前位置和目标楼层来确定下一步的动作。

例如,如果当前位
置在一楼,目标楼层在三楼,电梯应该向上运行。

如果当前位置在三楼,
目标楼层在一楼,电梯应该向下运行。

我们可以使用状态机的方法来实现
这种逻辑。

在控制器的设计中,我们可以使用三个传感器来检测电梯的位置。


电梯到达一些楼层时,传感器会发出一个信号,控制器会根据这个信号来
更新电梯的当前位置。

控制器还需要检测电梯内部按钮的信号,并根据按
钮的输入来确定电梯的目标楼层。

例如,如果电梯内部的按钮被按下,控
制器会将目标楼层设置为当前所在楼层。

如果一些楼层的按钮被按下,控
制器会将目标楼层设置为该楼层。

最后,我们需要定义电梯门的开关逻辑。

当电梯到达目标楼层时,它
的门应该打开,当电梯离开目标楼层时,它的门应该关闭。

可以使用一个
门状态变量来跟踪电梯门的状态,并根据电梯的位置和目标楼层来更新该
变量。

通过以上的设计,我们可以实现一个基于VHDL的三层电梯控制系统。

这个系统可以根据输入信号来确定电梯的动作,包括电梯的运行方向,电
梯门的开关状态以及电梯运行的目标楼层。

这个系统可以实时更新电梯的
状态,以实现精确的电梯控制。

综上所述,VHDL项目设计的“三层电梯控制系统”是一个基于嵌入
式系统的设计,通过控制器对电梯的运行和停止进行控制。

这个系统的设
计包括电梯运行逻辑、控制器的设计以及电梯门的开关逻辑。

通过设计和
实现这个系统,我们可以实现一个高效、可靠的三层电梯控制系统。

相关文档
最新文档