读
macro_command main()
short a = 0 //设备编号
bool m1 =false
GetData(a, "Local HMI", LW, 0, 1)
SetData(a, "Local HMI", Lw, 200, 1)
if a > 0 then
GetData(m1, "Local HMI", Lb, 100, 1)
SetData(m1, "Local HMI", Lb, a, 1) //通过设备编号计算写入地址 a 等于任意数
end if
end macro_command
反正大致这样挺简单的,不过你想让人家帮你写。不现实
还是得自己研究研究 |