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,請參考!