macro_command main()
int a,b,c
GetData(a, "Local HMI", LW, 9017, 1)
b=a/59
if b==1 then
c=c+1
SetData(c, "Local HMI", LW, 0, 1)
end if
end macro_command
macro_command main()
unsigned short c
unsigned char a,b
GetData(a, "Local HMI", LW, 9017, 1)
b=a/50
if b==1 then
c=c+1
end if
SetData(c, "Local HMI", LW, 0, 1)
end macro_command
是设定不对,这样设就对了,不过还有问题,进来第一次C不为0,不知那么清0