电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

基于MCGS组态软件设计的四层电梯程序

基于MCGS组态软件设计的四层电梯程序_第1页
1/7
基于MCGS组态软件设计的四层电梯程序_第2页
2/7
基于MCGS组态软件设计的四层电梯程序_第3页
3/7
'*********轿内指示灯***********inlamp1=(inbutton1 or inlamp1) and not left1inlamp2=(inbutton2 or inlamp2) and not left2inlamp3=(inbutton3 or inlamp3) and not left3inlamp4=(inbutton4 or inlamp4) and not left4'*********轿外指示灯***********outlamp1=((outbutton1 or outlamp1) and not left1)outlamp2=(outbutton2 or outlamp2) and (not left2 or (leftup and not leftdown))outlamp3=(outbutton3 or outlamp3) and (not left2 or (leftup and not leftdown))outlamp4=(outbutton4 or outlamp4) and (not left3 or (leftup and not leftdown))outlamp5=(outbutton5 or outlamp5) and (not left3 or (leftup and not leftdown))outlamp6=((outbutton6 or outlamp6) and not left4)’*********定向程序 上行***********leftup=((((outlamp2 or outlamp3 or inlamp2) and not left2) or (outlamp4 or outlamp5 or inlamp3) and not left3) or (outlamp6 or inlamp4)) and not left4 and not leftdown '*********定向程序 下行***********leftdown=((((outlamp4 or outlamp5 or inlamp3) and not left3) or (outlamp2 or outlamp3 or inlamp2) and not left2) or (outlamp1 or inlamp1)) and not left1 and not leftup '*********平层自动开门设置***********策略 1'*********开关门控制;手动开门***********if openbutton and not closebutton and not upmotor and not downmotor and not stateopen then dooropen=1if (outbutton1 or inbutton1) and left1 and not closebutton and not upmotor and not downmotor and not stateopen then dooropen=1if (outbutton2 or outbutton3 or inbutton2) and left2 and not closebutton and not upmotor and not downmotor and not stateopen then dooropen=1if (outbutton4 or outbutton5 or inbutton3) and left3 and not closebutton and not upmotor and not downmotor and not stateopen then dooropen=1if (outbutton6 or inbutton4) and left4 and not closebutton and not upmotor and not downmotor and not stateopen then dooropen=1if doorclose or stateopen then dooropen=0if (closebutton or closedoordelay) and not openbutton and not dooropen and not stateclose then doorclose=1if openbutton or stateclose then doorclose=0:closedoordelay=0endif’*********行吊电机正反转***********upmotor= leftup and not dooropen and stateclosedownmotor= leftdown and not dooropen and statecloseif upmotor then 高度=高度—1if downmotor then 高度=高度+1left1=(高度=30):left2=(高度=20):left3=(高度=10):left4=(高度=0):if 高度=30 then leftnum=1if 高度=20 then leftnum=2if 高度=10 then leftnum=3if 高度=0 then leftnum=4'*********门电机正反转***********if dooropen then 门值=门值-1if doorclose then 门值=门值+1stateopen=(门值=0):stateclose=(门值=20)

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

基于MCGS组态软件设计的四层电梯程序

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部