Code Check Please

phoggberg

New member
Somebody please make sure that the nut behind this keyboard is sufficiently tightened up! :mtool:

I have two AquaLifters supplying Top Off Water to my sump. One (ATO_RO) is a direct feed from my RO Reservoir, and the other (ATO_KALK) runs into my Kalkwasser Reactor.

I want the Kalk water topoff to only happen every hour for one minute between 8PM and 8AM if the pH < 8.36.

I want the RO water topoff to happen every hour for one minute when the Kalk isn't going to topoff (ie pH is high) So I tried to build in a priority override so the RO water will not run if the KALK should be filling the tank.

I will be adding a calcium reactor to the mix to run during the 8AM to 8PM time frame in the very near future. The code is as follows:

Note: SumpHigh is a virtual outlet set to a float switch at the correct level to fill, using 10 second hysteresis.

ATO_Kalk Outlet
===========

Fallback OFF
Set OFF
OSC 059:00/001:00/000:00 Then ON
If Time 08:00 to 20:00 Then OFF
If Outlet SumpHigh = ON Then OFF
If pH > 08.35 Then OFF


ATO_RO Outlet
=============
Fallback OFF
Set OFF
OSC 000:30/001:00/059:00 Then ON
If Outlet ATO_Kalk = ON Then OFF
If Outlet SumpHigh = ON Then OFF

From a reefkeeping standpoint should I modify the ATO_Kalk program as follows:

The first lights on and last lights off use the following program:
ActinicR
==============
Fallback ON
Set ON
If Sun 060/060 Then ON
If Temp > 82.0 Then OFF
If Temp < 77.1 Then ON
If Outlet ActinicOnly = ON Then ON
If FeedA 000 Then ON
If FeedB 000 Then ON
If FeedC 000 Then ON
If FeedD 000 Then ON
If Outlet AutoFeed = ON Then ON
If Outlet SumpLow = ON Then OFF

Should I replace the "If Time" statement in ATO_Kalk with the following:
If Outlet ActinicR = ON Then OFF

Thanks in advance for the programming help.
 
Looks about right, with a few comments:

Set OFF is not needed when using OSC since it generates both ON and OFF states. Same for the Sun and Moon command.

The timing on your ATO_RO outlet is a bit off based on your description. Just use the same OSC parameters as in ATO_Kalk. You don't need to offset it since you are not allowing ATO_RO to run when ATO_Kalk is running.

As far as using If Outlet instead of If Time in ATO_Kalk, it really depends. Seems unlikely that the actinics will raise the pH unless running for an extended duration, I would stick with what you have.

Todd
 
The timing on your ATO_RO outlet is a bit off based on your description. Just use the same OSC parameters as in ATO_Kalk. You don't need to offset it since you are not allowing ATO_RO to run when ATO_Kalk is running.

As far as using If Outlet instead of If Time in ATO_Kalk, it really depends. Seems unlikely that the actinics will raise the pH unless running for an extended duration, I would stick with what you have.

Todd,
A follow on question:

The reason I thought of using the actinic rear outlet (I have two banks of them) was it is the first lights on, and the last lights off. So it's a cheap way of saying any lights ON/OFF to make the code sensitive to photo period. So the question is Would I be better served to put that kind of environmental sensitivity into the code rather than just a straight If Time instruction? (more about reef keeping rather than Apex Programming)

Thanks for the help,
Barry
 
I really don't think it will make much difference in terms of operation. The primary reason to use the If Outlet is more of an Apex issue. It does make the code more readable; and if you frequently adjust the time period, it makes it more convenient.

Todd
 
Back
Top