回复:VBS读写wincc变量

rission

  • 帖子

    222
  • 精华

    2
  • 被关注

    15

论坛等级:侠圣

注册时间:2011-10-23

普通 普通 如何晋级?

发布于 2012-03-09 12:56:03

2楼

斑竹说的对,一般不用到value属性。
但是之前我总是写错,有些对象的值的属性就是value,代码写着写着就顺着写下去了,一调试,不好使了。
再是习惯用msgbox看看调试结果,有时候会有些小问题。

不知道大家在wincc中都用怎么调试vbs的,怎么查看段代码的运行的结果,也在这请教一下。

那天是在找答案里看到有几个问题关于这方面的,我就特意看看,弄清楚些,然后就写这里了。
脚本手册是这样解释value属性的:
Displays the value of the tags at the last read access or the value which should be
or was written. Value stands for the value of a tag. After calling in the "Read"
method, the tag value read is returned. Before writing, the new tag value required
can be assigned to the property. After calling in the "Write" method, the property
contains the value last written.
还是写出来看看运行结果,才有体会
尤其这句
Displays the value of the tags at the last read access or the value which should be
or was written.
其实这也是个小问题,一般不计较这些,代码也不至于错,极特殊条件(故意让变量读取与脚本运行异步的时候)下才能有差别,但是这个过程能感受到一些启发。
涓涓不塞,将为江河!
评论
编辑推荐: 关闭

请填写推广理由:

本版热门话题

SIMATIC WinCC / Panel

共有32566条技术帖

相关推荐

热门标签

相关帖子推荐

guzhang

恭喜,你发布的帖子

评为精华帖!

快扫描右侧二维码晒一晒吧!

再发帖或跟帖交流2条,就能晋升VIP啦!开启更多专属权限!

  • 分享

  • 只看
    楼主

top
您收到0封站内信:
×
×
信息提示
很抱歉!您所访问的页面不存在,或网址发生了变化,请稍后再试。