请帮我看一下,第一段为:当三菱PLC的M0置1时,将屏中的RW-BIT和三菱PLC中的M20置1
第二段为:当屏中的LB0置1时,将屏中的RW-BIT和三菱PLC中的M20置0
macro_command main()
bool a,b,c
GetData(a, "plc", m, 0, 1)
GetData(b, "Local HMI", RW_Bit, 0, 1)
GetData(c, "plc", m, 20, 1)
if a==1 then
b=1
else
c=1
end if
//
GetData(a, "Local HMI", lb, 0, 1)
GetData(b, "Local HMI", RW_Bit, 0, 1)
GetData(c, "plc", m, 20, 1)
if a==1 then
b=0
else
c=0
end if
end macro_command |