Help with 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
Hi everyone,

I'm new to the world of Apex, and am working to set up my ATO reservoir fill.

I have the FMM connected with two optical sensors, and a solenoid valve connected to the energy bar. An RO line is going to the fill container, with a mechanical float valve. The float valve is higher than the optical sensors as a fail safe.

I also would only like the ATO reservoir to fill between the hours of 10:00 am and 6:00 pm.

I would appreciate if someone could review my code to make sure it is accurate!

I created a virtual outlet called Res_Fill.
ATO_Lo is the low sensor
ATO_High is the high sensor
ATO_Sol is the solenoid

The code for Res_Fill is:

Set OFF
If Time 10:00 then on
If time 18:00 then off
If ATO_Lo open then ATO_Sol ON
If ATO_Hi closed then ATO_Sol OFF
When ON > 360:00 then ATO_Sol OFF

Does this look right to you all ? I haven't tried it yet - wanted to verify the code here first.
 
Top Shelf Aquatics

Dburr1014

5000 Club Member
Review score
+0 /0 /-0
View Badges
Joined
May 8, 2016
Messages
6,056
Reaction score
5,874
Review score
+0 /0 /-0
Location
CT
Rating - 0%
0   0   0
Code looks okay.
You may be right. This is to actually turn something on and off in a given time, you probably don't need a virtual for this.

One thing to consider, you have your ATO_lo to turn on when open and high to turn off when closed. You might want to switch them around. Meaning have the ATO_lo open and turn on when closed and ATO_hi closed and turn on when open.
This way if you lose power to the unit it will shut off the water cuz the circuit will be open. If ever there was a problem with the unit, it won't turn on.

Also, do you have a flush value?
I can give you coding for that also.
 
www.dinkinsaquaticgardens.com
OP
OP
S

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'm confused by that... Are you saying switch the meaning of open and closed ? I thought that is set...meaning if the optical sensor is submerged, it is closed, and if it is not submerged, it is open.

I do have a manual flush valve on my BRS RODI unit, it is not powered but could be something I would look at for the future.
 

Dburr1014

5000 Club Member
Review score
+0 /0 /-0
View Badges
Joined
May 8, 2016
Messages
6,056
Reaction score
5,874
Review score
+0 /0 /-0
Location
CT
Rating - 0%
0   0   0
I'm confused by that... Are you saying switch the meaning of open and closed ? I thought that is set...meaning if the optical sensor is submerged, it is closed, and if it is not submerged, it is open.

I do have a manual flush valve on my BRS RODI unit, it is not powered but could be something I would look at for the future.
Okay, I don't use optics, I thought they can be changed.
You just want to be aware of any potential floods.
 
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%

New Posts

www.dinkinsaquaticgardens.com
Back
Top