发表于:2018/1/6 20:26:47
#0楼
设置了LW1 LW2 的值,if里的语句就是不执行,哪位帮忙看看 是哪里的问题,谢谢
macro_command main()
int a,B,C,D=1,E=0,F
GetData(B, "Local HMI", LW, 1, 1)
GetData(F, "Local HMI", LW, 2, 1)
C=C+1
if C==B then
SetData(D, "MITSUBISHI FX0n/FX2", Y, 1, 1)
end if
if C==F then
SetData(E, "MITSUBISHI FX0n/FX2", Y, 1, 1)
C=0
end if
SetData(C, "Local HMI", LW, 3, 1)
end macro_command
macro_command main()
int a,B,C,D=1,E=0,F
GetData(B, "Local HMI", LW, 1, 1)
GetData(F, "Local HMI", LW, 2, 1)
C=C+1
if C==B then
SetData(D, "MITSUBISHI FX0n/FX2", Y, 1, 1)
end if
if C==F then
SetData(E, "MITSUBISHI FX0n/FX2", Y, 1, 1)
C=0
end if
SetData(C, "Local HMI", LW, 3, 1)
end macro_command