Page 1 of 1
turning off skimmer when return is off
Posted: Wed Jan 23, 2013 5:50 pm
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.
turning off skimmer when return is off
Posted: Wed Jan 23, 2013 5:59 pm
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..
Re: turning off skimmer when return is off
Posted: Wed Jan 23, 2013 6:27 pm
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.
turning off skimmer when return is off
Posted: Wed Jan 23, 2013 7:37 pm
by lnevo
Compiling is a good sign...keep me posted
