PDA

View Full Version : need some help with programing


intotheblue2011
07/06/2011, 11:40 AM
what I would like to do is hook up a window fan in the same room as the fish tank. the reason is to get humidity down which would allow my existing cooling fans above the fish tank right now to properly cool down tank temps.

so the following is my program that I have for the cooling fans above the fish tank:

outlet name: [COOLING-FAN]
Fallback ON
If Tmpx4 > 79.4 Then ON
If Tmpx4 < 79.1 Then OFF

what I would like to do is have the window box fan come on befor and shut off after the cooling fans do. So here is what i was thinking... please let me know if you see anything wrong with this.

outlet name: [BOX-FAN]
Fallback ON
If Tmpx4 > 78.9 Then ON
If Tmpx4 < 78.6 Then OFF

***THE PROBLEM IS THAT MY FISH TANK NEVER DIPS BELOW 79 IN THE SUMMER MONTHS SO WITH THE ABOVE SCENARIO THE BOX FANS WWOULD ALWAYS BE ON WHICH IS NOT WHAT I WANT EITHER. I WOULD LIKE IT TO OSCILATE ON/OFF BASED ON TANK TEMP. GIVING THE BOX FAN MOTOR TIME TO COOL AS WELL***

intotheblue2011
07/06/2011, 02:14 PM
I'm new to the board... any advice would be greatly appreciated...

aquamanic
07/06/2011, 04:07 PM
You could have the COOLING-FAN outlet defer for a couple of minutes after the BOX-FAN outlet turns on. For example, leave the BOX-FAN outlet as is but for the COOLING-FAN try this instead:

Fallback ON
Set OFF
If Outlet BOX-FAN = ON Then ON
Defer 020 Then ON

That will turn the cooling fan on whenever the box fan is on but only after a 20min delay.

intotheblue2011
07/06/2011, 05:22 PM
You could have the COOLING-FAN outlet defer for a couple of minutes after the BOX-FAN outlet turns on. For example, leave the BOX-FAN outlet as is but for the COOLING-FAN try this instead:

Fallback ON
Set OFF
If Outlet BOX-FAN = ON Then ON
Defer 020 Then ON

That will turn the cooling fan on whenever the box fan is on but only after a 20min delay.

interesting... however, not sure if this will achieve the end result. The reasoning behind the colling fans is that they cool down the tank temperature through evaporative cooling. the byproduct however is humidity/moisture in the room. so thats why the box fan is there...to take out the excess humidity from the room so evaporative cooling can be performed efficiently. I do not have ahumidity tester/meter (i was considering this for the box fan) this way the box fan comes on by the % humidity in the room not by the temperature of the fish tank. for now however I need to try to get it to work off of the tank temp. the only issue is that the box fan should come on about an hour or so befor the cooling fans and turn off about an hour after the cooling fans.

RussM
07/06/2011, 06:18 PM
Create a virtual outlet called TooHot (for example):

[TooHot]
Set OFF
If Tmpx4 > 79.5 Then ON
Defer 005 Then ON
Defer 005 Then OFF

[COOLING-FAN]
Set Off
If Outlet TooHot = ON Then ON
Defer 55 Then ON

[BOX-FAN]
Set Off
If Outlet TooHot = ON Then ON
Defer 55 Then OFF

The Defer 005 statements in the VO is for debouncing. Once the temp exceeds 79.5 continuously for 5 minutes, the box fan will come on. 55 minutes later (a total of 60 minutes after the temp first crossed 79.5 upward), the cooling fan will come on. When the temp drops below and stays 79.6, the VO will turn off. The cooling fan will also turn off at that time. The box fan will stay on another 55 minutes. This should give you exactly what you asked for.

Personally, I think 60 minute delays are too much for your purposes.. I'd use 15-20 minutes.

Adjust the temp threshold and the times as desired.

BTW... did you know that you can rename that Tmpx4 probe to something more meaningful (and less annoying too ;) )?

intotheblue2011
07/06/2011, 08:16 PM
Create a virtual outlet called TooHot (for example):

[TooHot]
Set OFF
If Tmpx4 > 79.5 Then ON
Defer 005 Then ON
Defer 005 Then OFF

[COOLING-FAN]
Set Off
If Outlet TooHot = ON Then ON
Defer 55 Then ON

[BOX-FAN]
Set Off
If Outlet TooHot = ON Then ON
Defer 55 Then OFF

The Defer 005 statements in the VO is for debouncing. Once the temp exceeds 79.5 continuously for 5 minutes, the box fan will come on. 55 minutes later (a total of 60 minutes after the temp first crossed 79.5 upward), the cooling fan will come on. When the temp drops below and stays 79.6, the VO will turn off. The cooling fan will also turn off at that time. The box fan will stay on another 55 minutes. This should give you exactly what you asked for.

Personally, I think 60 minute delays are too much for your purposes.. I'd use 15-20 minutes.

Adjust the temp threshold and the times as desired.

BTW... did you know that you can rename that Tmpx4 probe to something more meaningful (and less annoying too ;) )?

I'm not understanding what the need is for a virtual outlet... is it because of the delay request? is there a way to do this without the delay? I don't necessarily need a times delay... just need the box fan to come on befor the cooling fans and off after the cooling fans. could I just rely on fish tank temp for the box fan as well as the cooling fan and just set the box fan to come on to a degree befor the cooling fan turns on ect?

RussM
07/06/2011, 08:25 PM
the box fan should come on about an hour or so befor the cooling fans and turn off about an hour after the cooling fans.
you asked, you received ;)

RussM
07/06/2011, 08:28 PM
Oops, I omitted the outlet name for the third set of statements. They are for the box fan outlet.

intotheblue2011
07/06/2011, 09:20 PM
you asked, you received ;)

yes looks like I did, thank you... but would like to simplify things a bit. is there any way to just program it so the box fan would turn on/off based on tank temps instead? will the OP work?

zoolan70
07/07/2011, 08:14 AM
Sure, you can do it that way (based on temp only), but you are really not using the Apex to its potential if you do. Russ' example gives you the most flexibility. You only need to change one line of code to change any parameter of the process, rather than two or more.