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
 
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
 
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.
 

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