下面两个语句:
正确,可以正常使用的语句
macro_command main()
short a,b,c
GetData(a, "Local HMI", LW, 9022, 1)
GetData(c, "DELTA DVP", D, 4000, 1)
if a>=2016 then
if c==100 then
b=1982
else
b=0
end if
end if
SetData(b, "DELTA DVP", D, 280, 1)
SetData(b, "DELTA DVP", D, 11999, 1)
end macro_command
不能正常使用,但是编译没有错误的语句:
macro_command main()
short a,b,c
GetData(a, "Local HMI", LW, 9022, 1)
GetData(c, "DELTA DVP", D, 4000, 1)
if a>=2016 and c==100 then
b=1982
else
b=0
end if
SetData(b, "DELTA DVP", D, 280, 1)
SetData(b, "DELTA DVP", D, 11999, 1)
end macro_command
大家试试这两个宏指令,是否有差异,不能正常使用的为什么编译没有错误?