Fan control from temp and time

Users Who Are Viewing This Thread (Total: 1, Members: 0, Guests: 1)

ReefPig

Active Member
View Badges
Joined
Feb 17, 2020
Messages
377
Reaction score
365
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
277
Reaction score
198
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
365
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

HOW WELL IS YOUR MOST EXPENSIVE REEF INHABITANT DOING RIGHT NOW?

  • It's doing excellent - It appears healthy and has grown exponentially!

    Votes: 15 17.9%
  • It's doing great - It appears healthy and has grown some!

    Votes: 16 19.0%
  • It's doing good - Although it hasn't grown yet, it appears healthy!

    Votes: 21 25.0%
  • It's doing okay - It isn't growing, and it seems a little stressed, but I'm sure it'll recover.

    Votes: 4 4.8%
  • It's not doing good - It isn't growing, it seems very stressed, and I'm not sure it'll recover.

    Votes: 1 1.2%
  • It's doing bad - Sadly, it looks like it is dying and I do not expect it to recover.

    Votes: 0 0.0%
  • Unfortunately, I already lost it...

    Votes: 25 29.8%
  • Other (please explain).

    Votes: 2 2.4%
Back
Top