LW需要改为大写!
macro_command main()
short a,b,c,d,f
bool e
GetData(a, "Local HMI", LW, 9022, 1)
GetData(b, "Local HMI", LW, 9021, 1)
e=1
f=981
c=a+b+f
SetData(c,"Local HMI",LW,1,1)
GetData(d,"Local HMI",LW,1,1)
if D==3000 then
SetData(e, "FX1N", M, 0, 1)
else
end if
end macro_command