28.01.2022, 08:47
Hello ! I have a little trouble in this loop !
I already did that loop! Thanks everyone
I have the following problem and have the following objects:
-4 valve address is 1/1/1 ; 1/1/2 ; 1/1/3 ;1/1/4
- Pump address is 2/1/1
I want to program 1 of the other 4 valves to be ON then the pump must be ON. And if pump is ON, all 4 valves are ON. Pump is OFF, all 4 valves are OFF
In the 2/1/1 address pump I'm writing:
-----------------------------------
value = event.getvalue()
if value==true then
grp.write('1/1/1',true)
grp.write('1/1/2',true)
grp.write('1/1/3',true)
grp.write('1/1/4',true)
else
grp.write('1/1/1',false)
grp.write('1/1/2',false)
grp.write('1/1/3',false)
grp.write('1/1/4',false)
end
---------------------------------
In each valve I write, for example valve number 1 1/1/1:
value = event.getvalue()
if value==true then
grp.write('2/1/1',true)
end
---------------------------------
I am having an endless loop, and there is no way to solve the above problem.
I already did that loop! Thanks everyone
I have the following problem and have the following objects:
-4 valve address is 1/1/1 ; 1/1/2 ; 1/1/3 ;1/1/4
- Pump address is 2/1/1
I want to program 1 of the other 4 valves to be ON then the pump must be ON. And if pump is ON, all 4 valves are ON. Pump is OFF, all 4 valves are OFF
In the 2/1/1 address pump I'm writing:
-----------------------------------
value = event.getvalue()
if value==true then
grp.write('1/1/1',true)
grp.write('1/1/2',true)
grp.write('1/1/3',true)
grp.write('1/1/4',true)
else
grp.write('1/1/1',false)
grp.write('1/1/2',false)
grp.write('1/1/3',false)
grp.write('1/1/4',false)
end
---------------------------------
In each valve I write, for example valve number 1 1/1/1:
value = event.getvalue()
if value==true then
grp.write('2/1/1',true)
end
---------------------------------
I am having an endless loop, and there is no way to solve the above problem.