APEX Code for ATO

StikHedRon

Well-Known Member
View Badges
Joined
Jun 17, 2012
Messages
931
Reaction score
171
Location
Central Illinois
Rating - 0%
0   0   0
As the title says I am wanting to add however many lines of code I need to ensure that my ATO doesn't run for more than 15mins. If it does run for more than 15mins due to a stuck float switch I want it to shut off and email/text me. Can someone please help me figure out how to do that. Here are the current lines of code I have. Sw1 is obviously my top off float switch. SWX5_1, 2 and 3 are my leak detection modules and well Feed D is my maintenance mode function.

Fallback OFF
If Sw1 CLOSED Then ON
If Sw1 OPEN Then OFF
If Swx5_1 CLOSED Then OFF
If Swx5_2 CLOSED Then OFF
If Swx5_3 CLOSED Then OFF
If FeedD 000 Then OFF
 
I like to use virtual outlets for my switches. This makes the code easier to read and allows you to monitor the status of each switch. It also allows a Defer isolated to just the switch. So:

[Sump_High]
Set OFF
If Switch2 OPEN Then ON

[Sump_Low]
Set OFF
If Switch1 CLOSED Then ON
Defer 00:30 Then ON

[ATO]
Fallback OFF
Set OFF
If Outlet Sump_Low = ON Then ON
If Outlet Sump_High = ON Then OFF
Min Time 030:00 Then OFF

[ATO_Low alarm]
Set OFF
If Outlet Sump_Low = ON Then ON
Defer 010:00 Then ON

The 30 second Defer in Sump_Low should be enough to filter out any bouncing.

The min time 30 mins would make the ATO stay off for at least 30 mins

The defer 10 mins says wait 10 mins before email.
 
Thanks for posting this code- I too was looking for how exactly to handle this.
 

IF YOU HAD TO TAKE A REEFING EXAM, WOULD YOU PASS?

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%

New Posts

Back
Top