macro_command main()
int B[3]
short e[2]
GetData(B[0], "Local HMI", LW, 010, 1)
GetData(B[1], "Local HMI", LW, 012, 1)
GetData(e[0], "Local HMI", LW, 16, 1)
B[2]=B[0]+B[1]
SetData(B[2], "Local HMI", LW, 014, 1)
if b[2]>9999 then
GETBIT(e[0], e[1], 1)
GetData(e[1], "Local HMI", LB, 100, 1)
end if
end macro_command |