macro_command main()
unsigned short c,a,e
unsigned char b[5]
float d
GetData(a, "MODBUS RTU (zero-based addressing)", 3x, 2, 1)
//读取寄存器数值如:34567(3是放大倍数,4567为有效数值)
DEC2ASCII(a, b[0], 5)//将34567转为ASCII码
ASCII2FLOAT(b[1], d, 4)//将4567转为浮点数
c=b[0]-48//将3的ASCII码减去48得出数字(放大倍数)
//ASCII2DEC(b[0], c, 1)
POW(10,c,e)//10的c次方赋于e
d=d/e
SetData(d, "Local HMI", LW, 0, 1)
end macro_command
谢谢大佬们的解答帮助,初步程序如上基本实现显示问题