macro_command main()
bool on =true,off[3]={0,0,0},a[6]//
short g
GetData(a[0], "Local HMI", LB, 1, 6)//定义数组
GetData(g,"Local HMI",Lw,0,1)//获取数值
SetData(off[0],"Local HMI",LB,10,3)//复位状态
if (a[0]==1 and a[1] ==0)or( a[2]== 1) or(g > 10) then
SetData(on,"Local HMI",LB,10,1)
if(a[3]== 1)then
SetData(on,"Local HMI",LB,11,1)
if (a[4]==1) or (a[5]==1)then
SetData(on,"Local HMI",LB,12,1)
end if
end if
end if
end macro_command