发布于 2012-08-10 20:50:47
2楼
WINCC中用一个内部变量来保存tag1的数值
你用一个全局脚本vbs,脚本触发周期为2s
dim mytag1,mytag2
mytag1=hmiruntime.tags("tag1").read
mytag2=hmiruntime.tags("tag1_sav").read
if mytag1 and not mytag2 then
hmiruntime.tags("sy1").write 1
hmiruntime.tags("sy2").write 0
else if not mytag1 and mytag2 then
hmiruntime.tags("sy1").write 0
hmiruntime.tags("sy2").write 1
end if
活到老,学到老!为了生活学习吧!