图片:
macro_command main()
bool status,off=false,on=true
short a,a1,a2,a3,a4,a5,a6,b1,b2,b3,b4,b5,b6
GetData(a1, "OMRON CJ/CS/CP", D, 310, 1)
GetData(a2, "OMRON CJ/CS/CP", D, 311, 1)
GetData(a3, "OMRON CJ/CS/CP", D, 312, 1)
GetData(a4, "OMRON CJ/CS/CP", D, 313, 1)
GetData(a5, "OMRON CJ/CS/CP", D, 314, 1)
GetData(a6, "OMRON CJ/CS/CP", D, 315, 1)
SetData(a1, "Local HMI", LW, 9017, 1)
SetData(a2, "Local HMI", LW, 9018, 1)
SetData(a3, "Local HMI", LW, 9019, 1)
SetData(a4, "Local HMI", LW, 9020, 1)
SetData(a5, "Local HMI", LW, 9021, 1)
SetData(a6, "Local HMI", LW, 9022, 1)
end macro_command
宏指令都搞错………………