使用宏指令可以实现:
macro_command main()
bool bit[3]
GetData(bit[0], "Local HMI", LB, 0, 2)
if bit[0]==false and bit[1]==false then
bit[2]=false
SetData(bit[2], "Local HMI", LB, 2, 1)
else if bit[0]==true and bit[1]==true then
bit[2]=true
SetData(bit[2], "Local HMI", LB, 2, 1)
end if
end macro_command
请参考 |