I am looking to set up a second float switch which will trigger if the sump fills up and will kill the relay for my return pump. I have had a few pumps seizes recently and I would like to cut power to avoid them overheating or worse.
Any ideas on coding for this application.
2nd Float Switch
-
rimai
- Posts: 12857
- Joined: Fri Mar 18, 2011 6:47 pm
Re: 2nd Float Switch
Try this:
Code: Select all
ReefAngel.Relay.Set(Port1,ReefAngel.HighATO.IsActive());
Roberto.
-
cjrudy
- Posts: 135
- Joined: Sat Nov 10, 2012 2:47 pm
Re: 2nd Float Switch
Thanks
What if that current port is listed as "always on ", will I have to change that.
Do I have to use "if" statements like this
What if that current port is listed as "always on ", will I have to change that.
Do I have to use "if" statements like this
Code: Select all
if (ReefAngel.HighATO.IsActive()) ReefAngel.Relay.Off(Port5); else ReefAngel.Relay.On(Port5);-
rossbryant1956
- Posts: 471
- Joined: Sat Jan 14, 2012 2:08 pm
- Location: Montgomery Village, MD
Re: 2nd Float Switch
Roberto will correct me if I am wrong but no you don't. His command says to set something based on the state of something else...HighATO. If that is not active then do what the main code says.
Roscoe's Reefs - Starting Over Again:
Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
-
rimai
- Posts: 12857
- Joined: Fri Mar 18, 2011 6:47 pm
Re: 2nd Float Switch
They are both the same thing 
Just different ways of coding, but if you understand better the way you recommended, feel free to use it
Just different ways of coding, but if you understand better the way you recommended, feel free to use it
Roberto.