Will this Apex code work for UV?

ReefHog

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

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