这还不简单
macro_command main()
bool a0 = true
bool a1 = false
bool a2 = false
bool a3 = false
bool a4 = false
bool a5 = false
bool a6 = false
bool a7 = false//变量 a 的数值设定到 LB2 中
SetData(a1,"Local HMI",LB,1,1)
SetData(a2,"Local HMI",LB,2,1)
SetData(a3,"Local HMI",LB,3,1)
SetData(a4,"Local HMI",LB,4,1)
SetData(a5,"Local HMI",LB,5,1)
SetData(a6,"Local HMI",LB,6,1)
SetData(a7,"Local HMI",LB,7,1)
end macro_command
按钮通知LB0,LB0执行这个宏指令就行了
其他按钮依次类推,简单粗暴