macro_command main()
bool M=0
bool M1=0
int DTEMP1=0
GetData(M, "DELTA AS300 MODBUS TCP/IP", Y_Bit, 0, 1)
SetData(M, "Siemens S7-1200/S7-1500", Q, 10, 1)
GetData(M1, "DELTA AS300 MODBUS TCP/IP", Y_Bit, 2, 1)
SetData(M1, "Siemens S7-1200/S7-1500", Q, 11, 1)
GetData(DTEMP1, "DELTA AS300 MODBUS TCP/IP", D, 100, 1)
SetData(DTEMP1, "Siemens S7-1200/S7-1500", MW, 100, 1)
end macro_command
这是我写的一个宏指令,周期执行,测试OK,请参考!