发布于 2012-08-31 14:20:55
1楼
用vbs做全局脚本:
dim mytag1,mytag2,mytag3,mytag4,mytag5
mytag1=hmiruntime.tags("tag1").read
mytag2=hmiruntime.tags("tag2").read
mytag3=hmiruntime.tags("tag3").read
mytag4=hmiruntime.tags("tag4").read
mytag5=hmiruntime.tags("tag5").read
mytags=hmiruntime.tags("tags_sav").read
if hmiruntime.tags("tag6").read then
hmiruntime.tags("tag6").wite 0
end_if
tags=mytag1+mytag2+mytag3+mytag4+mytag5
if tags>0 and mytags=0 then
hmiruntime.tags("tag6").wite 1
end_if
hmiruntime.tags("tags_sav").write tags
上面的脚本放在全局脚本中执行,则tag6为1的时间为脚本的一个执行周期。
活到老,学到老!为了生活学习吧!