This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Long loop run for water pump !
#6
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.
Reply


Messages In This Thread
RE: Long loop run for water pump ! - by admin - 24.01.2022, 08:25
RE: Long loop run for water pump ! - by phongvucba - 28.01.2022, 08:47
RE: Long loop run for water pump ! - by admin - 28.01.2022, 12:08
RE: Long loop run for water pump ! - by admin - 31.01.2022, 08:46

Forum Jump: