回复:求变量改变WINCC上矩形颜色的C脚本!

树上那只猫

  • 帖子

    27
  • 精华

    0
  • 被关注

    0

论坛等级:游民

注册时间:2012-07-08

普通 普通 如何晋级?

发布于 2013-01-03 00:44:41

2楼

创建变量color
VBS脚本如下
dim a,b,c,
a=hmiruntime.tags("tag1").read
b=hmiruntime.tags("tag2").read
c=hmiruntime.tags("tag3").read

if a=1 and b=0 and c=1 then
hmiruntime.tags("color").write 1
end if

if a=0 and b=1 and c=1 then
hmiruntime.tags("color").write 2
end if

if a=0 and b-0 and c=0 then
hmiruntime.tags("color").write 3
end if

然后在颜色里链接color ,设置1的时候为红色,2的时候为粉色,3的时候为绿色就行了
走着瞧~
评论
编辑推荐: 关闭

请填写推广理由:

本版热门话题

SIMATIC WinCC / Panel

共有32569条技术帖

相关推荐

热门标签

相关帖子推荐

guzhang

恭喜,你发布的帖子

评为精华帖!

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

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

  • 分享

  • 只看
    楼主

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