发布于 2010-01-14 19:04:29
2楼
vbs,最普通的方法
if HMIRuntime.Tags("TAG1").Read=1 and HMIRuntime.Tags("TAG2").Read=0 then
HMIRuntime.Tags("TAG1").write=HMIRuntime.Tags("TAG1").value+1
else if HMIRuntime.Tags("TAG1").Read=0 and HMIRuntime.Tags("TAG2").Read=1 then
HMIRuntime.Tags("TAG1").write=HMIRuntime.Tags("TAG1").value-1
else
不变
end if