是第9行,不是11行。
macro_command main()
short time[6],c=9000//
short shi[6]
bool a,d
GetData(time[0], "Local HMI", LW, 9017, 6)//读取时间到变量数组time
GetData(shi[0],"Local HMI", LW, 100, 6)//
if time[5]>=shi[5] and time[4]>=shi[4] and time[3]>=shi[3] and time[2]>=shi[2]and time[1]>=shi[1]and time[0]>=shi[0] then
a=1// 时间比较
end if
if a==1 then
d=true
else
d=false
end if
SetData(c, "Local HMI", LW, 120, 1)//
SetData(d, "Local HMI", LB, 0, 1)
end macro_command
[此贴子已经被作者于2018/9/2 9:16:39编辑过]