macro_command main()
short g
bool a,b,c,d,e
unsigned short shi,fen
unsigned short shiq1,fenq1,shiq2,fenq2,dl
GetData(shi, "Local HMI", LW, 9019, 1)
GetData(fen, "Local HMI", LW, 9018, 1)
GetData(shiq2, "Local HMI", RW, 148, 1)
GetData(fenq2, "Local HMI", RW, 149, 1)
if shi==shiq2 and fen==fenq2 and g<3 then
SYNC_TRIG_MACRO(21)
d=false
SetData(d, "Local HMI", LB, 7, 1)
g=g+1
else if shi<>shiq2 and fen<>fenq2 then
g=0
end if
end macro_command
我想shi==shiq2 and fen==fenq2时只运行三次,当shi<>shiq2 and fen<>fenq2时,g归0,各 位老师哪出错了,怎么才能实现 |