17.02.2021, 14:40
I suppose you need something like this. 32/1/6 = 1 when both modes are 1, 0 otherwise; 32/1/7 = 1 when both modes are 2, 0 otherwise and so on.
Code:
mode1 = grp.getvalue('1/1/1')
mode2 = grp.getvalue('1/2/1')
function check(value)
if mode1 == value and mode2 == value then
return 1
else
return 0
end
end
grp.checkwrite('32/1/6', check(1))
grp.checkwrite('32/1/7', check(2))
grp.checkwrite('32/1/8', check(3))
grp.checkwrite('32/1/9', check(4))