Apex Help

mtgmichaelg

Community Member
View Badges
Joined
Dec 19, 2018
Messages
32
Reaction score
38
Rating - 0%
0   0   0
Screen Shot 2018-12-31 at 1.29.34 PM.png

I am trying to set a kalk reactor so that it turns on for 60 seconds per day over 3 intervals. After some research, this is what I think I have to do, but it would be great if someone could check over it over. Thanks in advance.
 
I think you still have to tell it what to do in the if time part.
If time 8:00 to 8:01 then on...I think
#apexusers
 
That won't work. Only one Defer statement allowed per each code group, and it applies to the entire group no matter where it's placed.

The easiest way to do what you want is with the OSC statement. OSC takes the place of the Set statement, creating a fixed cycle of ONs and OFFs. As an example, here's how my kalk reactor is programmed:

Fallback OFF
OSC 015:00/000:11/014:49 Then ON
When On > 000:15 Then OFF
If Sal < 33.0 Then OFF
If pH > 8.43 Then OFF
...

The first number in the OSC statement is the number of minutes offset from midnight before first activation. The second number is the time the outlet will be ON (since the command ends in 'then ON'.) The third number is the additional time off, which then adds to the first number before turning ON again. So in my example, starting at 12:15 AM, the pump turns on and dispenses for 11 second, then turns off for 29 minutes 49 seconds, turning on again at 12:45 AM, and so on all day long. If you make sure that the total of all 3 numbers divides exactly into 1440 (number of minutes in a day), then the program will be exactly the same every day as mine is.

If you wanted to dispense for 60 seconds three times evenly spaced throughout the day starting at midnight and again at 8 AM and 4 PM, it would be:

OSC 000:00/001:00/479:00 Then ON

What you want to do is a bit trickier. You can do it by setting the pump to activate every 4 hours with the OSC command, but then adding an If Time command to keep it from activating except when you want it.

Fallback OFF
OSC 000:00/001:00/239:00 Then ON
If Time 17:00 to 07:00 Then OFF

This will give you exactly what you want - 60 seconds of kalk at 8 AM, noon, and 4 PM. :)
 
Last edited:
That won't work. Only one Defer statement allowed per each code group, and it applies to the entire group no matter where it's placed.

The easiest way to do what you want is with the OSC statement. OSC takes the place of the Set statement, creating a fixed cycle of ONs and OFFs. As an example, here's how my kalk reactor is programmed:

Fallback OFF
OSC 015:00/000:11/014:49 Then ON
When On > 000:15 Then OFF
If Sal < 33.0 Then OFF
If pH > 8.43 Then OFF
...

The first number in the OSC statement is the number of minutes offset from midnight before first activation. The second number is the time the outlet will be ON (since the command ends in 'then ON'.) The third number is the additional time off, which then adds to the first number before turning ON again. So in my example, starting at 12:15 AM, the pump turns on and dispenses for 11 second, then turns off for 29 minutes 49 seconds, turning on again at 12:45 AM, and so on all day long. If you make sure that the total of all 3 numbers divides exactly into 1440 (number of minutes in a day), then the program will be exactly the same every day as mine is.

If you wanted to dispense for 60 seconds three times evenly spaced throughout the day starting at midnight and again at 8 AM and 4 PM, it would be:

OSC 000:00/001:00/479:00 Then ON

What you want to do is a bit trickier. You can do it by setting the pump to activate every 4 hours with the OSC command, but then adding an If Time command to keep it from activating except when you want it.

Fallback OFF
OSC 000:00/001:00/239:00 Then ON
If Time 17:00 to 07:00 Then OFF

This will give you exactly what you want - 60 seconds of kalk at 8 AM, noon, and 4 PM. :)


Wow thank you so much. Thanks for copying the code you use as well, I am definitely going to add those if statements just in case. I am actually trying to turn on the pump for a total of 60 seconds so 3x20. Would I just modify the interval like what I did below to do that?

Fallback OFF
OSC 000:00/00:20/239:40 Then ON
If Time 17:00 to 07:00 Then OFF
 
Wow thank you so much. Thanks for copying the code you use as well, I am definitely going to add those if statements just in case. I am actually trying to turn on the pump for a total of 60 seconds so 3x20. Would I just modify the interval like what I did below to do that?

Fallback OFF
OSC 000:00/00:20/239:40 Then ON
If Time 17:00 to 07:00 Then OFF

Exactly! Of course when you program it, you should then test it out carefully to make sure it works as planned. :)
 
"So in my example, starting at 12:15 AM, the pump turns on and dispenses for 11 second, then turns off for 29 minutes 49 seconds, turning on again at 12:45 AM, and so on all day long. If you make sure that the total of all 3 numbers divides exactly into 1440 (number of minutes in a day), then the program will be exactly the same every day as mine is."

Do you find that running the kalk reactor over night causes any swings in salinity, pH, Ca and Alk? I would think that you wouldn't be evaporating as much water at night nor would your corals be up taking as much Ca and Alk. I know you have it in your code to shut off if certain parameters aren't meant but is there a way to see if that happens often?[/QUOTE]
 
Last edited:
Dosing both 2-part and kalk throughout the day and night, I have a very predictable diurnal pH variation from 8.2 minimum to 8.4 maximum. I only ever check my alk in the morning so I can't address whether it's higher then due to overnight dosing and drops during the day. It might, but probably still results in less acute swings than would be caused by dosing a relatively large amount first thing in the morning. Also I'm not certain that all corals actually stop growing at night, even though the photosynthesis of their zooxanthellae stops. If they keep growing then they're still using alk.

I also use a CO2 scrubber, only at night, for a bit of pH support, and have found that it boosts the pH range throughout the entire day.

Calcium level isn't much of a concern, as calcium level isn't nearly as sensitive to conditions as the alk level is.

I don't notice a huge difference in evaporation between night and day, and no appreciable change in salinity. However if the water level gets too high I have some additional code (that I didn't list there) that will also pause the kalk in that event. And if the water level gets too low, I have a text alarm setup telling me I have to manually add some more kalk or plain rodi water. There's a way to automate all this even more but I've never explored it because this works for me. If I were traveling a lot and away from my tank then I'd explore tighter control with additional optical sensors etc.

You can see if your code is working as planned. I'd recommend reviewing it every day or even several times a day until you're sure it's working right. On the code page for the kalk pump, you have to have Log -> Enable checked at the lower left (it isn't checked by default.) Then on the main dashboard page, click on 'Output Log' at the upper left. Here you can review what went on and off and exactly when it happened.
 

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