macro_command main()
short nRValue[5],nLValue[5]
GetData(nRValue[0], "Local HMI", RW, 0, 5)
GetData(nLValue[0], "Local HMI", LW, 0, 5)
bool b=true
short i=0
for i=0 to 4 step 1
if nRValue <> nLValue then
b=false
break
end if
next
//
if b==false then
//有误则弹出窗口12,错误信息
b=true
SetData(b, "Local HMI", LB, 1, 1)
else
//正确则弹出窗口11
b=true
SetData(b, "Local HMI", LB, 2, 1)
end if
////复位触发宏LB0,LB0由5个数值元件触发
b=false
SetData(b, "Local HMI", LB, 0, 1)
end macro_command