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
這是我寫(xiě)的一個(gè)宏指令,周期執(zhí)行,測(cè)試OK,請(qǐng)參考!