Will this Apex code work for UV?

  • Thread starter Thread starter ReefHog
  • Start date Start date
  • Tagged users Tagged users None

ReefHog

Well-Known Member
View Badges
Joined
Jun 17, 2017
Messages
891
Reaction score
625
Location
Chicago
Rating - 0%
0   0   0
I want to run my UV when the lights are off. I want it to shut off if the flow is below 450 or the temp is above 82.

Fallback OFF
Set OFF
If Time 20:00 to 09:00 Then ON
IF R_Flow < 450 Then OFF
If Tmp > 80.0 Then OFF
Min Time 120:00 Then OFF
 
That is ok, but may not do exactly what you want.
The min time command will turn your UV off for 2 hours if your flow drops below 450 for even a second.
Same issue with the temp; if it blips above 80 even for a second, UV is off for two hours.
To avoid this, you can add a Defer line like:

Defer 000:30 Then OFF

This will allow the UV to stay on unless the flow or temp stays outside the range for 30 seconds continuously.
 
I keep my flow at 750ish and temp at 76. So those set points are if something really goes wrong. As far as the defer statement goes, does the one defer statement cover both conditions? Temp and flow?
 
Last edited:

WHAT MOST MAKES A BLACK FRIDAY REEF DEAL WORTH CONSIDERING?

  • A real discount on something already on my list

    Votes: 46 76.7%
  • Free or reduced shipping

    Votes: 9 15.0%
  • A useful bundle of gear or supplies

    Votes: 2 3.3%
  • A good price on livestock I’ve already researched

    Votes: 13 21.7%
  • A rare chance to get something hard to find

    Votes: 11 18.3%
  • A seller or brand I trust

    Votes: 11 18.3%
  • I buy when I need something, sale or not

    Votes: 12 20.0%
  • Other (Post in the comments)

    Votes: 1 1.7%
Back
Top
Home
Post thread…
Market
What's new