以下是引用xiatianyun在2018/4/3 21:39:25的发言:
威纶的宏怎么和C扯上了。
大兄弟,和C没关系我给你说错了,这是一小段,有删减勿用,最长的有1300多行的,能用和用好是两个概念,继续努力吧。
short brsjh
short brsjm
short brsjh1
short brsjm1
bool brsjh1bz
GetData(brsjh, "Local HMI", LW, 9019, 1)
GetData(brsjh1, "Local HMI", RW, 10, 1)
GetData(brsjm1, "Local HMI", RW, 12, 1)
GetData(brsjsdm1, "Local HMI", RW, 16, 1)
if (brsjh1<brsjsdh1) then
if (brsjh1<=brsjh) & (brsjh<=brsjsdh1) then
brsjh1bz1=1
if (brsjh==brsjh1) & (brsjm==brsjm1) then
brsjh1bz=1
SetData(brsjh1bz, "Local HMI", LB, 187, 1)
end if
if (brsjh==brsjsdh1) & (brsjm==brsjsdm1) then
brsjh1bz=0
SetData(brsjh1bz, "Local HMI", LB, 187, 1)
end if
end if
end if