Fan control from temp and time

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

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.
 
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
 
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.
 

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