发布于 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 !