if and coding on RA

Do you have a question on how to do something.
Ask in here.
Post Reply
ecam
Posts: 229
Joined: Thu Nov 15, 2012 11:27 am

if and coding on RA

Post by ecam »

Im trying to code my skimmer as follows: How to combine this statement

Essentially, I want the skimmer to turn off whenever ATO low trips. I also want the skimmer to turn off when my return pump is off. I want to put a 3 min delay on both sides. Thanks for the help

ReefAngel.Relay.Set(Box1_Port3,ReefAngel.Relay.Status(Port6)); // 11 Skimmer
ReefAngel.SingleATOLow(true,Port5,900,0 ); // 5 ATO - RODI
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: if and coding on RA

Post by rimai »

Try this:

Code: Select all

ReefAngel.Relay.Set(Box1_Port3,ReefAngel.Relay.Status(Port6)); // 11 Skimmer
ReefAngel.SingleATOLow(true,Port5,900,0 ); // 5 ATO - RODI
if (ReefAngel.LowATO.IsActive()) ReefAnel.Relay.Off(Box1_Port3);
Roberto.
ecam
Posts: 229
Joined: Thu Nov 15, 2012 11:27 am

Re: if and coding on RA

Post by ecam »

So I will execute this as 3 separate statements right.

Didn't know that could work. Figured one would override the other
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: if and coding on RA

Post by rimai »

Yeap. That what you want to do.
You want to override the skimmer function if low ato is triggered.
Roberto.
ecam
Posts: 229
Joined: Thu Nov 15, 2012 11:27 am

Re: if and coding on RA

Post by ecam »

Last question. So my main ato is fumctionjng with
The reefangel.singleAto function (plugged into low ato )

This one will operate skimmer and use high ato. For trigger.

Do you see any concerns ? Also wanted to put a 3 min delay on skimmer when return pump is turned back on
ecam
Posts: 229
Joined: Thu Nov 15, 2012 11:27 am

Re: if and coding on RA

Post by ecam »

So the code works and turns of the skimmer. But it doesn't turn it back on. How can I make that happen after the high ato is cleared
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: if and coding on RA

Post by rimai »

Are you sure Port6 was on?
Roberto.
Post Reply