Skimmer Code Help

Do you have a question on how to do something.
Ask in here.
Post Reply
ecamFT
Posts: 35
Joined: Tue Aug 22, 2017 8:00 pm

Skimmer Code Help

Post by ecamFT »

Can someone please help me combine these statements

ReefAngel.Relay.DelayedOn( Box1_Port3,0 ); //Skimmer
// if ( ReefAngel.HighATO.IsActive() == 0 ) ReefAngel.Relay.Off( Box1_Port3 );
if ( ReefAngel.Relay.Status( Port6 ) ) ReefAngel.Relay.Off( Box1_Port3 );


when this code is used... the skimmer never turns on.... (I've toggled between 1 and 0 on the isactive () command)

any help would be great. trying to setup a multi layered condition where if the return pump is off or ATO High is triggered (skim bucket) then skimmer is off else on. Also on all restarts it waits 2 mins to kick on (I have it set to 0 for testing)
ecamFT
Posts: 35
Joined: Tue Aug 22, 2017 8:00 pm

Re: Skimmer Code Help

Post by ecamFT »

Bump
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Skimmer Code Help

Post by rimai »

Probably because port 6 is on and it is turning off box1_port.
If you do two statements, the last one will always overwrite any previous condition. You need to make it into one statement.
Roberto.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Skimmer Code Help

Post by lnevo »

Code: Select all

if ( ReefAngel.HighATO.IsActive() == 0 || !ReefAngel.Relay.Status(Port6) ) { 
  ReefAngel.Relay.Off( Box1_Port3 );
} else {
  ReefAngel.Relay.DelayedOn( Box1_Port3,0 ); //Skimmer
}
bkc6868
Posts: 91
Joined: Wed Sep 02, 2015 4:39 pm

Re: Skimmer Code Help

Post by bkc6868 »

10pm on till 4pm off worked for me
Image
Post Reply