Using both High and Low ATO to turn off port

Do you have a question on how to do something.
Ask in here.

Posts: 81
Joined: Sat Jun 30, 2012 9:21 am
PostPosted: Sun May 14, 2023 9:37 am
Hi

I am trying to turn off port 4 on my relay if either of the ATO floats IsActive

I tired the following code but the second ato in the list takes precedence. If i put High in first them low works as expected and if low is first the high works. I am guessing that I need to add something else but i cant find what.


if (ReefAngel.HighATO.IsActive())
{
ReefAngel.Relay.On(Port4);
}
else
{
ReefAngel.Relay.Off(Port4);
}

if (ReefAngel.LowATO.IsActive())
{
ReefAngel.Relay.On(Port4);
}
else
{
ReefAngel.Relay.Off(Port4);
}

I would also like to have port4 only turn on after 60-120 seconads after the ato float returns to the "active" state.

thanks
Andy
Image

Return to How do I code ...

Who is online

Users browsing this forum: No registered users and 10 guests

cron