Page 1 of 1

WaterLevelATO Timing Out

Posted: Mon Jan 07, 2019 8:05 am
by sbidny
I am using the WaterLevelATO() call to read from the first port of my multi-channel water level expansion and turn on Box2_Port3 when needed. However, this call seems to be randomly causing an ATO timeout, even though ATOExtendedTimeout_read() is returning 120 (verified by also writing it to a custom variable), and the top off is not taking anywhere near that long to complete.

Here is the code:

Code: Select all

if (!ReefAngel.HighATO.IsActive()) ReefAngel.WaterLevelATO(1, Box2_Port3, InternalMemory.ATOExtendedTimeout_read(), InternalMemory.WaterLevelLow_read(), InternalMemory.WaterLevelHigh_read());
InternalMemory.ATOExtendedTimeout_read() is 120
InternalMemory.WaterLevelLow_read() is 98
InternalMemory.WaterLevelHigh_read() is 100

This seems similar to the issue in http://forum.reefangel.com/viewtopic.php?f=3&t=6043 from two years ago, which was never seemly resolved. Does the ATO class still need to be redone?

Re: WaterLevelATO Timing Out

Posted: Mon Jan 07, 2019 10:37 am
by lnevo
I think something still needs to be redone. I've always had the same issue. I'm filling a top of reservoir so my timeout is an hour though. It would always timeout in the first few minutes somewhere, either immediately or shortly after. I've worked around it by clearing the timeout for the first few minutes. Not a great workaround for someone using a traditional ATO.

Re: WaterLevelATO Timing Out

Posted: Tue Jan 08, 2019 9:33 am
by sbidny
Thanks for the reply. I actually figured this one out. I was making two calls to WaterLevelATO (one for my tank and one for my quarantine), and since they use a shared variable for time state, it was causing issues.