ATO Pump Based on PH

Do you have a question on how to do something.
Ask in here.
Post Reply
keithb
Posts: 18
Joined: Tue Jun 04, 2013 3:20 pm

ATO Pump Based on PH

Post by keithb »

I have a young tank that isn't consuming a ton of Calc or really dropping my PH too badly, so for the time being I'd like it to run the ATO through the KalkReactor only if the PH is below 8.2. I am far from a coder, and was wondering if anyone had something I can borrow from?

Logic tree:

If Ato.Low = on
If PH <= 8.2 Turn on exp relay box 1, port 7
else
Turn on exp relay box 1, port 3
do Until ATO.low = off or 300 seconds passes
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: ATO Pump Based on PH

Post by rimai »

Try this:

Code: Select all

if (ReefAngel.Params.PH<=820)
{
  ReefAngel.Relay.On(Box1_Port7);
  ReefAngel.Relay.Off(Box1_Port3);
}
else
{
  ReefAngel.Relay.Off(Box1_Port7);
  ReefAngel.SingleATO(true,Box1_Port3,60,0);
}
Roberto.
keithb
Posts: 18
Joined: Tue Jun 04, 2013 3:20 pm

Re: ATO Pump Based on PH

Post by keithb »

I'm looking for an ATO based trigger for determination of what pump to use for the ATO based PH... Again, I'm not a coder but I'm interepting the code as Port 7 is always on as long as PH is below 8.2? If that is the case, I will need it to shut off based upon the switch to avoid the great flood. :)

Would the below be more fitting to my goal?

Code: Select all

if (ReefAngel.Params.PH<=820)
{
    ReefAngel.SingleATO(true,Box1_Port7,60,0);
}
else
{
   ReefAngel.SingleATO(true,Box1_Port3,60,0);
}
rimai wrote:Try this:

Code: Select all

if (ReefAngel.Params.PH<=820)
{
  ReefAngel.Relay.On(Box1_Port7);
  ReefAngel.Relay.Off(Box1_Port3);
}
else
{
  ReefAngel.Relay.Off(Box1_Port7);
  ReefAngel.SingleATO(true,Box1_Port3,60,0);
}
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: ATO Pump Based on PH

Post by rimai »

Ahh.
Your code is almost there.
You just need to make sure to turn the port off in case the ph is changed mid ATO cycle.

Code: Select all

if (ReefAngel.Params.PH<=820)
{
    ReefAngel.Relay.Off(Box1_Port3);
    ReefAngel.SingleATO(true,Box1_Port7,60,0);
}
else
{
   ReefAngel.Relay.Off(Box1_Port7);
   ReefAngel.SingleATO(true,Box1_Port3,60,0);
}
Roberto.
Post Reply