回复:SCL 编程如何实现按一次开关Q0.1=1;再按一次Q0.1=0;如此反复

xiaode

  • 帖子

    1342
  • 精华

    2
  • 被关注

    49

论坛等级:奇侠

注册时间:2008-07-18

钻石 钻石 如何晋级?

发布于 2011-12-28 09:31:07

35楼

"Button_Lamp_Cylinder_Out".Out_In_Out[j].Button_Fellow := "Button_Lamp_Cylinder_In".In[j].Button AND NOT "Button_Lamp_Cylinder_Out".Out_In_Out[j].Button_Fellow_Temp;
"Button_Lamp_Cylinder_Out".Out_In_Out[j].Button_Fellow_Temp := "Button_Lamp_Cylinder_In".In[j].Button;
"Button_Lamp_Cylinder_Out".Out_In_Out[j].Lamp:=( NOT "Button_Lamp_Cylinder_Out".Out_In_Out[j].Lamp AND "Button_Lamp_Cylinder_Out".Out_In_Out[j].Button_Fellow )OR
("Button_Lamp_Cylinder_Out".Out_In_Out[j].Lamp AND NOT "Button_Lamp_Cylinder_Out".Out_In_Out[j].Button_Fellow );
我这个就是实现了,按一下等亮,再按一下灯灭的程序,所有的变量都是在DB块当中。按钮是"Button_Lamp_Cylinder_In".In[j].Button 灯是"Button_Lamp_Cylinder_Out".Out_In_Out[j].Lamp
every day is new day !
评论
编辑推荐: 关闭

请填写推广理由:

本版热门话题

SIMATIC S7-300/400

共有54618条技术帖

相关推荐

热门标签

相关帖子推荐

guzhang

恭喜,你发布的帖子

评为精华帖!

快扫描右侧二维码晒一晒吧!

再发帖或跟帖交流2条,就能晋升VIP啦!开启更多专属权限!

  • 分享

  • 只看
    楼主

top
您收到0封站内信:
×
×
信息提示
很抱歉!您所访问的页面不存在,或网址发生了变化,请稍后再试。