恭喜,你发布的帖子
发布于 2021-03-29 14:06:31
1楼
全局脚本vbs,周期1s:
dim mytag
mytag=hmiruntime.tags("tag1").read''读取内部变量tag1的值
hmiruntime.tags("tag2").write mytag''写mytag的值到外部变量tag2中,tag2的参数是plc中的db地址。
或者直接写:
hmiruntime.tags("tag2").write hmiruntime.tags("tag1").read
c脚本,周期1s:
SetTagWord("tag2",GetTagWord("tag1"));
请填写推广理由:
分享
只看
楼主