Please check my Apex Code

sunil6784

Community Member
View Badges
Joined
Jan 7, 2023
Messages
28
Reaction score
6
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

Well-Known Member
View Badges
Joined
Jun 8, 2017
Messages
914
Reaction score
367
Location
Grand Rapids, Michigan
Rating - 100%
32   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
 

All_talk

Active Member
View Badges
Joined
Oct 8, 2019
Messages
398
Reaction score
368
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.
 

TOP 10 Trending Threads

HOW DO YOU ADJUST YOUR CUC AS ALGAE DISAPPEARS?

  • Capture and re-home CUC

    Votes: 8 7.2%
  • Increase white light/hours in tank to spur algae growth to feed CUC

    Votes: 7 6.3%
  • Feed nori to support CUC

    Votes: 39 35.1%
  • Feed herbivore pellets to support CUC

    Votes: 39 35.1%
  • Allow attrition to balance CUC and algae

    Votes: 47 42.3%
  • Provide macro algae to feed CUC

    Votes: 8 7.2%
  • Introduce CUC predators

    Votes: 1 0.9%
  • Other (please explain)

    Votes: 11 9.9%
Back
Top