turning off skimmer when return is off

Do you have a question on how to do something.
Ask in here.
Post Reply
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

turning off skimmer when return is off

Post by rossbryant1956 »

I am working with this bit of code:

Code: Select all

 // Skimmer off when Return pump is off.
     if (bitRead(ReefAngel.Relay.RelayMaskOff,8)==0) //DT Pump
     {
        bitClear(ReefAngel.Relay.RelayMaskOff,4);  //Skimmer
     }
My question, though, is my skimmer will be on the other relay, box1_port7; not port 4 as the code snippet represents. How can I do that? And will it come back on when the DT Pump comes back on

Thx in advance.
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

turning off skimmer when return is off

Post by lnevo »

First off, the position in the mask starts at 0 so to read bit 8, it will need to be 7...

For the port 4 on box1, you need to use the relay mask expansion array...

I *think* its RelayMaskE[0]. And you would gave to use 6 for the bit to set.

Thats why in my code i write Skimmer - 1 and Return - 1 in those functions..
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: turning off skimmer when return is off

Post by rossbryant1956 »

Thanks. I changed it to:

Code: Select all

// Skimmer off when Return pump is off.
     if (bitRead(ReefAngel.Relay.RelayMaskOff,7)==0) //Return
     {
        bitClear(ReefAngel.Relay.RelayMaskOffE[0],6); //Skimmer
     }     
and it compiles. I won't be able to test for a few days; this is the code set for my new tanks that are just now pumping water and beginning their cycle. I appreciate your assistance.
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

turning off skimmer when return is off

Post by lnevo »

Compiling is a good sign...keep me posted :)
Post Reply