Page 1 of 1

2nd Float Switch

Posted: Wed May 15, 2013 10:33 am
by cjrudy
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.

Re: 2nd Float Switch

Posted: Wed May 15, 2013 10:53 am
by rimai
Try this:

Code: Select all

ReefAngel.Relay.Set(Port1,ReefAngel.HighATO.IsActive());

Re: 2nd Float Switch

Posted: Wed May 15, 2013 11:23 am
by cjrudy
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

Code: Select all

if (ReefAngel.HighATO.IsActive()) ReefAngel.Relay.Off(Port5); else ReefAngel.Relay.On(Port5);

Re: 2nd Float Switch

Posted: Wed May 15, 2013 1:52 pm
by rossbryant1956
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.

Re: 2nd Float Switch

Posted: Wed May 15, 2013 1:58 pm
by rimai
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 :)