恭喜,你发布的帖子
发布于 2020-02-15 19:40:52
5楼
hmi就不存在多点触控,你如何同时触发变量A,B?
变量A用置位。
全局脚本周期1s.
dim mytag(2)
mytag(0)=hmiruntime.tags("B0").read
mytag(1)=hmiruntime.tags("B1").read
if 变量A then
if 变量B then
mytag(1)=mytag(1)+1
else
mytag(1)=0
end_if
if not 变量B then
mytag(0)=mytag(0)+1
else
mytag(0)=0
end_if
if mytag(0)>=10 then
hmiruntime.tags("变量C").write 2
end_if
if mytag(1)>=10 then
hmiruntime.tags("变量C").write 1
end_if
end_if
hmiruntime.tags("B0").write mytag(0)
hmiruntime.tags("B1").write mytag(1)
请填写推广理由:
分享
只看
楼主