wincc模拟量求和
林慧玲
发布于2014-03-19 17:31
2
0
标签:
现在要在wincc上面对几个浮点型数据求和,该怎么实现?
佳答案
io域,动态连接输入公式:'变量1'+‘变量2’+‘变量3’.......
vbs脚本:
dimtag(10)
tag(0)=hmiruntime.tags("变量1").read
tag(1)=hmiruntime.tags("变量2").read
tag(2)=hmiruntime.tags("变量3").read
tag(3)=hmiruntime.tags("变量4").read
tag(4)=hmiruntime.tags("变量5").read
tag(5)=tag(0)+tag(1)+tag(2)+tag(3)+tag(4)
hmiruntime.tags("累计").writetag(5)
变量“累计”就是变量1~变量4的和。