用全局脚本方式把wincc内部变量周期写入PLC固定DB块中
假如写个int数据怎么实现
最佳答案
全局脚本VBS,周期1s:
dimmytag
mytag=HMIruntime.tags("tag1").read”读取内部变量tag1的值
hmiruntime.tags("tag2").writemytag”写mytag的值到外部变量tag2中,tag2的参数是plc中的db地址。
或者直接写:
hmiruntime.tags("tag2").writehmiruntime.tags("tag1").read
c脚本,周期1s:
SetTagWord("tag2",GetTagWord("tag1"));
提问者对于答案的评价:
谢谢大神
专家置评
已阅,最佳答案正确。