圖片:
請(qǐng)教大佬們,威綸通怎么寫執(zhí)行子函數(shù),返回兩個(gè)數(shù)值。看到官網(wǎng)也沒(méi)有這個(gè)返回兩個(gè)數(shù)值的
//子函數(shù),交換數(shù)據(jù)
sub unsigned short Commutative_function(unsigned short a, unsigned short b)
a=a+b
b=a-b
b=a-b
TRACE("1")
return a,b
TRACE("2")
end sub
//主函數(shù)
macro_command main()
unsigned short time[3]
GetData(time[0], "Local HMI", LW, 9017, 3)//獲取HMI時(shí)間
Commutative_function(time[0], time[2])//執(zhí)行子函數(shù)
SetData(time[0], "Mitsubishi FX3U/FX3G", D, 0, 3)
end macro_command