macro_command main()
int e
bool a,a1,a2
GetData (e,"MODBUS RTU",6x,8194,1)
if e==1 then
a=1
SetData(a,"Local HMI",LB,0,1)
else
a=0
SetData(a,"Local HMI",LB,0,1)
end if
if e==2 then
a1=1
SetData(a1,"Local HMI",LB,1,1)
else
a1=0
SetData(a1,"Local HMI",LB,1,1)
end if
if e==3 then
a2=1
SetData(a2,"Local HMI",LB,2,1)
else
a2=0
SetData(a2,"Local HMI",LB,2,1)
end if
end macro_command 作者: zzh1978 时间: 2017-3-8 16:18