而GetDevice和SetDevice是位讀位寫,可以讀寫PLC的字軟元素D,除非樓主說。
所以可以用SetDevice。考試:
IRet = Actfxcpu1。SetDevice("m0 ",1)
即設置m0。