macro_command main()
short b,c
bool on=1,off=0
GetData(b,"Local HMI", LW,9011, 1)
GetData(c,"Local HMI", RW,1, 1)
if b==1 or c==1 then
SetData(on,"MITSUBISHI FX0n/FX2", M,0,1)
else
SetData(off,"MITSUBISHI FX0n/FX2", M,0,1)
end if
end macro_command
LW9011和RW1 任何一个数字为1时 M0“1”
如果需要LW9011和RW1 都为1时 M0“1” 请 if b==1 or c==1 then改成if b==1 and c==1 then |