Thanks Lee;
I do a series of things with the I/O expansion unit and float valves. Here is some of my working code:
Code: Select all
// I_O Expansion & Float Valves
ReefAngel.CustomVar[7]=1;
//turn off DT pump when switch is tripped and sound buzzer
ReefAngel.Relay.Set(DT_Pump,ReefAngel.IO.GetChannel(0));
ReefAngel.PWM.SetDaylight(100-(ReefAngel.IO.GetChannel(0)*100));
ReefAngel.CustomVar[0]=ReefAngel.IO.GetChannel(0); //tell the portal we have a overflow problem
//turn off GT pump when switch is tripped and sound buzzer
ReefAngel.Relay.Set(GT_Pump,ReefAngel.IO.GetChannel(1));
ReefAngel.PWM.SetDaylight(100-(ReefAngel.IO.GetChannel(1)*100));
ReefAngel.CustomVar[1]=ReefAngel.IO.GetChannel(1); //tell the portal we have a overflow problem
In other words, when those I/O floats trip, they turn off the pumps DT & GT to keep those tanks from overflowing. I have had trouble in the past with my Glass-Holes overflows slowing due to junk in the pipes. Works like a charm. Then I added another float valve to my I/O expansion, wires pointed down, that would turn on another pump and refill evaporated water from my RODI system. I originally used this line of code:
Code: Select all
ReefAngel.Relay.Set(GT_Fill,ReefAngel.IO.GetChannel(2));
ReefAngel.PWM.SetDaylight(100-(ReefAngel.IO.GetChannel(2)*100));
Worked like a charm. THEN under the auspices of one of the primary engineering tenets "if it ain't broke, fix it anyway" I decided it would be better to implement some method of instead of toggling that pump every time that tank needed a little water it would be better to have it wait until it needed a decent top off before turning on.
So that's where I am. Roberto suggested a bit of code that seems like it should work but I'm not able to understand it well enough to do my own troubleshooting. Appreciate any advice you provide. Thanks