一般軟件里面都有說明或者文檔可以多查看一下,
bool A
short NUM
macro_command main()
GetData(A, "Local HMI", LB, 0, 1) 獲取LB地址0的數(shù)據(jù)變量名為A
GetData(NUM, "Local HMI", LW, 0, 1)獲取LW地址0的數(shù)據(jù)變量名為NUM
NUM=10
SetData(NUM, "Local HMI", LW, 0, 1)把NUM的值傳給LW地址0
SetData(NUM, "Local HMI", LW, 101, 1)把NUM的值傳給LW地址101
// 這樣應(yīng)該能明白了吧