这个其实很简单,
short a,b,c
getdata(a,"HMI",LW,0,1)
getdata(B,"HMI",LW,1,1)
getdata(C,"HMI",LW,2,1)
IF A == B and a > 0 then
a = 0
end if
IF b == c and b > 0 then
b = 0
end if
IF A == c and c > 0 then
c = 0
end if
setdata(a,"HMI"LW,0,1)
setdata(b,"HMI"LW,1,1)
setdata(c,"HMI"LW,2,1)
这个只是我个人的想法,仅供参考 |