Will this Apex code work for UV?

ReefHog

Well-Known Member
View Badges
Joined
Jun 17, 2017
Messages
868
Reaction score
637
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
 

rkpetersen

walked the sand with the crustaceans
View Badges
Joined
Sep 14, 2017
Messages
4,528
Reaction score
8,865
Location
Near Seattle
Rating - 0%
0   0   0
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.
 
OP
OP
ReefHog

ReefHog

Well-Known Member
View Badges
Joined
Jun 17, 2017
Messages
868
Reaction score
637
Location
Chicago
Rating - 0%
0   0   0
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:

More than just hot air: Is there a Pufferfish in your aquarium?

  • There is currently a pufferfish in my aquarium.

    Votes: 32 17.4%
  • There is not currently a pufferfish in my aquarium, but I have kept one in the past.

    Votes: 32 17.4%
  • There has never been a pufferfish in my aquarium, but I plan to keep one in the future.

    Votes: 33 17.9%
  • I have no plans to keep a pufferfish in my aquarium.

    Votes: 79 42.9%
  • Other.

    Votes: 8 4.3%
Back
Top