![](https://iknow-base.cdn.bcebos.com/lxb/notice.png)
WINCC flexible 里一个IO域,假设名字是A, 还有一个变量B,
当B等于1时,A的背景变红或者外观变红都可以,必须用脚本写,谁知道如何写。不用脚本的方法就别说了,q279061192...
当B等于1时,A的背景变红或者外观变红都可以,必须用脚本写,谁知道如何写。不用脚本的方法就别说了,
q 279061192 展开
q 279061192 展开
展开全部
dim B
B=hmiruntime.tags("tag0").read
if B=1 then
backcolor=rgb(255,0,0)‘第一位为1则变量值为1,颜色为红色
end if
if B=2 then
backcolor=rgb(0,255,0)’第二位为1则变量值为2,颜色为绿色
end if
if B=4 then
backcolor=rgb(0,0,255)第三位为1则变量值为4,颜色为蓝色
end if
B=hmiruntime.tags("tag0").read
if B=1 then
backcolor=rgb(255,0,0)‘第一位为1则变量值为1,颜色为红色
end if
if B=2 then
backcolor=rgb(0,255,0)’第二位为1则变量值为2,颜色为绿色
end if
if B=4 then
backcolor=rgb(0,0,255)第三位为1则变量值为4,颜色为蓝色
end if
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询