程序如下:
macro_command main()
short b,c,d,e,f,g,m,n
GetData(b, "Local HMI", RW, 402, 1)
c=b*14.3
d=b*14.3
e=b*14.3
f=b*14.3
g=b*14.3
m=b*14.3
n=b*14.3
SetData(c, "MODBUS RTU", 6x, 14#0525, 1)
SetData(d, "MODBUS RTU", 6x, 15#0525, 1)
SetData(e, "MODBUS RTU", 6x, 16#0525, 1)
SetData(f, "MODBUS RTU", 6x, 17#0525, 1)
SetData(g, "MODBUS RTU", 6x, 18#0525, 1)
SetData(m, "MODBUS RTU", 6x, 19#0525, 1)
SetData(n, "MODBUS RTU", 6x, 20#0525, 1)
end macro_command |