macro_command main()
short m,n
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(shiq1, "Local HMI", RW, 44, 1)
GetData(fenq1, "Local HMI", RW, 45, 1)
GetData(m, "Local HMI", RW, 46, 1)
if shi==shiq1 and fen==fenq1 and m<5 then
m=m+1
else if shi<>shiq1 and fen<>fenq1 then
m=0
end if
SetData(m, "Local HMI", LW, 6000, 1)//加1送显,看程序是否执行
end macro_command
|