macro_command main()
bool on =true,off[3]={0,0,0},a[6]//
short g
GetData(a[0], "Local HMI", LB, 1, 6)//定義數(shù)組
GetData(g,"Local HMI",Lw,0,1)//獲取數(shù)值
SetData(off[0],"Local HMI",LB,10,3)//復(fù)位狀態(tài)
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