Page 1 of 1

if and coding on RA

PostPosted: Fri Jul 14, 2017 7:59 pm
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

Re: if and coding on RA

PostPosted: Sat Jul 15, 2017 9:12 am
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);

Re: if and coding on RA

PostPosted: Sat Jul 15, 2017 10:19 am
by ecam
So I will execute this as 3 separate statements right.

Didn't know that could work. Figured one would override the other

Re: if and coding on RA

PostPosted: Sat Jul 15, 2017 12:08 pm
by rimai
Yeap. That what you want to do.
You want to override the skimmer function if low ato is triggered.

Re: if and coding on RA

PostPosted: Sat Jul 15, 2017 12:17 pm
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

Re: if and coding on RA

PostPosted: Sat Jul 15, 2017 4:53 pm
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

Re: if and coding on RA

PostPosted: Sat Jul 15, 2017 5:28 pm
by rimai
Are you sure Port6 was on?