请大家帮忙看看程序哪里错了,这个是设定日期用来收款的,以前都可以用的,现在不知道为啥用不了了。
macro_command main()
short a[6]
short b[6]
short c,d,e,f
GetData(a[0], "Local HMI", LW, 9010, 6)
GetData(b[0], "Local HMI", RW, 10, 6)
GetData(c, "Local HMI", RW_Bit, 0, 1)
GetData(d, "LS XGT/XGK CPU DIRECT", M, 410, 1)
GetData(e, "Local HMI", LB, 10, 1)
GetData(f, "LS XGT/XGK CPU DIRECT", M, 12, 1)
if(e==1) then
c=0
e=0
end if
if(c==1) then
if(a[5]>b[5]) then
d=1
end if
end if
if(c==1) then
if(a[5]==b[5]) then
if(a[4]>b[4]) then
d=1
end if
if(a[4]==b[4]) then
if(a[3]>b[3]) then
d=1
end if
if(a[3]==b[3]) then
if(a[2]>b[2]) then
d=1
end if
if(a[2]==b[2]) then
if(a[1]>b[1]) then
d=1
end if
if(a[1]==b[1]) then
if(a[0]>b[0]) then
d=1
end if
end if
end if
end if
end if
end if
end if
if(c==0) then
d=0
end if
f=d
SetData(b[0], "Local HMI", RW, 10, 6)
SetData(a[0], "Local HMI", LW, 9010, 6)
SetData(c, "Local HMI", RW_Bit, 0, 1)
SetData(d, "LS XGT/XGK CPU DIRECT", M_Bit, 410, 1)
SetData(e, "Local HMI", LB, 10, 1)
SetData(f, "LS XGT/XGK CPU DIRECT", M, 12, 1)
end macro_command