fpga技术实现四层电梯控制器内容摘要:

39。 upcun(2)=39。 039。 downcun(1)=39。 039。 state=dooropen。 elsif dd30111 then state=up。 elsif dd30100 then state=down。 end if。 电梯在三楼,如果当前层有请求,进入开门状态,同时将请求清除,如果四楼有请求,电梯上升,否则下降 elsif position=4 then if stopcun(3)=39。 139。 or downcun(2)=39。 139。 then stopcun(3)=39。 039。 downcun(2)=39。 039。 state=dooropen。 else state=down。 end if。 end if。 电梯在四楼,如果当前层有请求,进入开门状态,同时将请求清除,否则下降 when up=upled=39。 139。 state=upwait1。 上升状态,上行状态灯亮 when upwait1=state=upwait2。 运行持续两秒 when upwait2=upled=39。 039。 position:=position+1。 到达新的楼层,上行指示灯灭 if position=1 then led1=39。 139。 led2=39。 039。 led3=39。 039。 led4=39。 039。 一楼指示灯亮 elsif position=2 then led2=39。 139。 led1=39。 039。 led3=39。 039。 led4=39。 039。 二楼指示灯亮 elsif position=3 then led3=39。 139。 led2=39。 039。 led1=39。 039。 led4=39。 039。 三楼指示灯 亮 elsif position=4 then led4=39。 139。 led1=39。 039。 led2=39。 039。 led3=39。 039。 四楼指示灯亮 else led1=39。 039。 led2=39。 039。 led3=39。 039。 led4=39。 039。 end if。 if position=2 and dd30011 and stopcun(1)=39。 039。 and upcun(1)=39。 039。 and downcun(0)=39。 039。 then state=up。 如果在二楼且当前层没有请求,电梯继续上升 elsif position=3 and dd30111 and stopcun(2)=39。 039。 and upcun(2)=39。 039。 and 6 / 12 downcun(1)=39。 039。 then state=up。 如果在三楼且当前层没有请求,电梯继续上升 else state=dooropen。 if position=4 then if downcun(2)=39。 139。 then downcun(2)=39。 039。 end if。 if stopcun(3)=39。 139。 then stopcun(3)=39。 039。 end if。 elsif position=3 then if downcun(1)=39。 139。 then downcun(1)=39。 039。 end if。 if upcun(2)=39。 139。 then upcun(2)=39。 039。 end if。 if stopcun(2)=39。 139。 then stopcun(2)=39。 039。 end if。 elsif position=2 then if downcun(0)=39。 139。 then downcun(0)=39。 039。 end if。 if upcun(1)=39。 139。 then upcun(1)=39。 039。 end if。 if stopcun(1)=39。 139。 then stopcun(1)=39。 039。 end if。 end if。 end if。 电梯进入开门状态,且将与所在楼层相关的请求清除 when down=downled=39。 139。 state=dnwait1。 下降状态,下降指示灯亮 when dnwait1=state=dnwait2。 运行持续两秒 when dnwait2=downled=39。 039。 position:=position1。 到达新的楼层,下降。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。