17.03.2023, 08:45 
		
	
	
		Hello,
I have 160 modbus points and I am using an event script to combine in groups of two as below. Do I need to write this script to each point or is there a short way to do this?
Thanks.
	
	
	
	
I have 160 modbus points and I am using an event script to combine in groups of two as below. Do I need to write this script to each point or is there a short way to do this?
Thanks.
Code:
value1 = event.getvalue()
value2 = grp.getvalue('34/1/15')
if (value1 == 0 ) then
grp.write('34/1/35', 0)
elseif (value1 == 1 and value2 == 0) then
  grp.write('34/1/35', 1)
elseif (value1 == 1 and value2 == 85) then
  grp.write('34/1/35', 2)
end