当前位置: 主页 > PLC控制

怎么把 通过PLC 扫面上来的条形码(十三个数)显示到WINCC上位机上呢

怎么把通过PLC扫面上来的条形码(十三个数)显示到wincc上位机上呢
若是用脚本脚本怎么写能不能把脚本发给我我的邮箱270056303@qq.com
谢谢

最佳答案

我原来给你的你不用吗?
13个变量保存你的条形码数值,wincc定义8位文本变量STr,winccio链接变量str,数据类型位字符串。
全局vbs脚本,周期1s
dimmytag(14)
mytag(0)=HMIruntime.tags("tag0").read
mytag(1)=hmiruntime.tags("tag1").read
mytag(2)=hmiruntime.tags("tag2").read
mytag(3)=hmiruntime.tags("tag3").read
mytag(4)=hmiruntime.tags("tag4").read
mytag(5)=hmiruntime.tags("tag5").read
mytag(6)=hmiruntime.tags("tag6").read
mytag(7)=hmiruntime.tags("tag7").read
mytag(8)=hmiruntime.tags("tag8").read
mytag(9)=hmiruntime.tags("tag9").read
mytag(10)=hmiruntime.tags("tag10").read
mytag(11)=hmiruntime.tags("tag11").read
mytag(12)=hmiruntime.tags("tag12").read‘以上是读取条码数据
mytag(13)=mytag(0)&mytag(1)&mytag(2)&mytag(3)&mytag(4)&mytag(5)&mytag(6)&mytag(7)&mytag(8)&mytag(9)&mytag(10)&mytag(11)&mytag(12)”字符串连接
hmiruntime.tags("str").writemytag(13)”写数据到变量str中

提问者对于答案的评价:
语言一点也不通所以你给我详细的才可以非常感谢非常感谢

最佳答案作者回复:
????你用的是什么版本软件?我给你的是思路,具体变量要看你的实际的,我这个是wincc7.0以下版本使用的,vbs编程方式。

是不通还是不懂?

  • 关注微信

猜你喜欢

微信公众号