Fan control from temp and time

ReefPig

Active Member
View Badges
Joined
Feb 17, 2020
Messages
377
Reaction score
352
Location
London
Rating - 0%
0   0   0
Hi,

Hopefully you can help shine some light onto something I've been beating my head against the wall on.
I'm trying to figure out how to program an output which I have a fan plugged in to which is controller based on both the temp of the tank, but also using the oscillate timer, as I occasionally want to move the air around in the tank room.

The challenge I seem to be bumping in to is that the IF statement doesn't support OR / AND, I understand the order of operations, but I cannot seem to get it working.

For the sake of "simplicity", I've created two virtual outputs, one for the timer and one for the temp, which I wanted to tie together in the real output.

  • Virtual Output "CoolingTemp"
    • Fallback OFF
      Set OFF
      If Temp_1 > 27.5 Then ON
      Defer 000:10 Then ON
      If Temp_1 < 27.3 Then OFF

  • Virtual Output "CoolingTime"
    • Fallback OFF
      Set OFF
      OSC 000:00/001:00/030:00 Then ON

  • Real Output "Fan1"
    • Fallback OFF
      Set OFF
      If Output CoolingTemp = ON Then ON
      If Output CoolingTime = ON Then ON
      If Output CoolingTemp = OFF Then OFF
      If Output CoolingTime = OFF Then OFF


The behavior I want is
  • If CoolingTemp or CoolingTime is on, then on.
  • If CoolingTemp and CoolingTime is off, then off.
 

RussM

Active Member
View Badges
Joined
Jun 4, 2011
Messages
278
Reaction score
200
Location
El Cajon, CA
Rating - 0%
0   0   0
You do not need any virtual outputs for this. Using VOs is just adding unnecessary complexity.

[Fan1]
Fallback OFF
OSC 000:00/001:00/030:00 Then ON
If Temp_1 > 27.5 Then ON
If Temp_1 < 27.3 Then OFF
 
OP
OP
ReefPig

ReefPig

Active Member
View Badges
Joined
Feb 17, 2020
Messages
377
Reaction score
352
Location
London
Rating - 0%
0   0   0
You do not need any virtual outputs for this. Using VOs is just adding unnecessary complexity.

[Fan1]
Fallback OFF
OSC 000:00/001:00/030:00 Then ON
If Temp_1 > 27.5 Then ON
If Temp_1 < 27.3 Then OFF

Thank you, clearly I was over complicating things!

I always seem to forgot that the logic has an implicit OR as it evaluates each statement and the last true statement wins.
 

TOP 10 Trending Threads

WHAT AMOUNT OF LIVE ROCK AND SAND SHOULD BE PRIORITIZED FOR OPTIMAL BIODIVERSITY/FILTRATION?

  • 100% live rock + bagged sand

    Votes: 34 27.0%
  • 100% dry rock + 100% live sand

    Votes: 45 35.7%
  • 50/50 live/dry rock, 50/50 live/bagged sand

    Votes: 27 21.4%
  • 75% live rock, 25% live sand

    Votes: 11 8.7%
  • 25% live rock, 75% live sand

    Votes: 9 7.1%
Back
Top