Please check my Apex Code

Neptune

sunil6784

Community Member
Review score
+0 /0 /-0
View Badges
Joined
Jan 7, 2023
Messages
27
Reaction score
6
Review score
+0 /0 /-0
Location
Boston
Rating - 0%
0   0   0
I am working on automating my ATO fill reservoir, and wanted to confirm my code. It's important I get this right, because I run a regeneration for my whole house water softener at night, so the RODI can only come on during certain hours during the day. I wanted to confirm the code here first before automating it.

This is for an Apex solenoid connected to my RODI.

I would like the solenoid to turn on if the two conditions are met... The time is between 8 am and 8 pm, and the ATO_lo sensor is open. Then I would like the Solenoid to turn off if the ATO_hi sensor is closed, or the time is outside of 8 am to 8 pm.


Set OFF
Fallback OFF
If Time 08:00 to 20:00 Then ON
If ATO_lo open then ON
If ATO_hi closed then OFF
 

Jason_MrFrags

Active Member
Review score
+0 /0 /-0
View Badges
Joined
Jun 8, 2017
Messages
440
Reaction score
158
Review score
+0 /0 /-0
Rating - 100%
1   0   0
This

If ATO_lo open then ON
If Time 20:01 to 07:59 Then OFF
If ATO_hi closed then OFF

It would of turned on if the switch was open OR during the time
 
World Wide Corals

All_talk

Active Member
Review score
+0 /0 /-0
View Badges
Joined
Oct 8, 2019
Messages
331
Reaction score
325
Review score
+0 /0 /-0
Location
Thorp, WA
Rating - 0%
0   0   0
A couple of ideas...

In general I feel running your float switches Normal Closed is a safer option (opens to close solenoid in your case). This way if it becomes disconnected the solenoid will stay closed. Most float switches are convertible by flipping the float over on the shaft.

I think you are going to need a virtual outlet to latch the Lo float, otherwise as soon as you add enough water to lift the Lo float its going to shut off. Look at Defer and Min Time statements to hold the VO for enough time to fill the reservoir. This will also add a time limit safety if the Hi float sticks.
 
Neptune

Polyp polynomial: How many heads do you start with when buying zoas?

  • One head is enough to get started.

    Votes: 27 10.6%
  • 2 to 4 heads.

    Votes: 145 57.1%
  • 5 heads or more.

    Votes: 65 25.6%
  • Full colony.

    Votes: 10 3.9%
  • Other.

    Votes: 7 2.8%
First Choice
Back
Top