wincc内部二进制变量如何实现自动0-1跳变,变化的频率可以调节,1s,2s等。
最佳答案
全局脚本出发周期为1s,wincc定义两个内部整数变量RUNtime,runtime_sp,
VBS脚本:
dimtag(3)
tag(0)=HMIruntime.tags("tag_bool").read//跳边变量值读取
tag(1)=hmiruntime.tags("runtime").read//计时
tag(0)=hmiruntime.tags("runtime_sp").read//计时设定值
iftag(1)>=tag(2)then
iftag(0)=1then
tag(0)=0
else
tag(0)=1
endif
endif
tag(1)=tag(1)+1
hmiruntime.tags("runtime").writetag(1)
提问者对于答案的评价:
谢谢,有C脚本的程序吗?