macro_command main()
bool on =true, off[3],a1[6]
short g
GetData(a1[0], "Local HMI", LB, 1, 6)
GetData(g,"Local HMI",Lw,0,1)
SetData(off[0],"Local HMI",LB,10,3)
if (a1[0]==1 and a1[1] ==0)or( a1[2]== 1) or(g > 10) then
SetData(on,"Local HMI",LB,10,1)
if(a1[3]== 1)then
SetData(on,"Local HMI",LB,11,1)
if (a1[4]==1) or (a1[5]==1)then
SetData(on,"Local HMI",LB,12,1)
end if
end if
end if
end macro_command