Flag help to turn on A/C

Louis019

New Member
Hi I"m new here hope I can get some advice on how to write my code.
 
What I would like it to do is between the hours of 1045 am and 445 pm if the Temp is greater then 78 then it will turn on the AC SWITCH for 1 hour.
 
 
The code that i wrote, what it does, is if at 10:45am its above 78 the AC goes on for an hour.  But if the temp raises after that the AC SWITCH doesn't go on.
 
       1.     Timed 10:45 AM MTWTF--
                                       THEN Temptur Flag ON for 6 Hours
 
        2.  When Temptur Flag ON                                    
                                     And IF 2nd Floor CURRENT TEMPERATURE IS GREATER THAN 78                    
                                                THEN A/C Unit Sw ON FOR 1 HOUR 
                                                         
 
 
Any help would be greatly appreciated thanks
 
Lou

 
 
Hi Lou,
 
Flip your triggers.
 
When Time = will only occur when that time occurs (i.e., it is a one-time test)
 
So what I would do is write:
 
WHEN Temp > 78 degrees
  AND
    TIME is after 10:45am
    TIME is before 4:45pm
       THEN A/C Unit Sw ON FOR 1 HOUR
 
Done this way, the trigger event is the temperature, then it tests to see if the time is between X and Y, and then performs the actions accordingly.
 
Cheers,
Jcd
 
Louis019 said:
 
        2.  When Temptur Flag ON                                    
                                     And IF 2nd Floor CURRENT TEMPERATURE IS GREATER THAN 78                    
                                                THEN A/C Unit Sw ON FOR 1 HOUR 
 
This block will only trigger at the time the flag turns on. i.e., only once at 1045.

This is a good opportunity to use a Time Clock.
Checking if a time clock is on or off only uses one Ilne, while checking in a window of time takes two.
 
jcdavis said:
Hi Lou,
 
Flip your triggers.
 
When Time = will only occur when that time occurs (i.e., it is a one-time test)
 
So what I would do is write:
 
WHEN Temp > 78 degrees
  AND
    TIME is after 10:45am
    TIME is before 4:45pm
       THEN A/C Unit Sw ON FOR 1 HOUR
 
Done this way, the trigger event is the temperature, then it tests to see if the time is between X and Y, and then performs the actions accordingly.
 
Cheers,
Jcd
You can't trigger from a temperature that way.
You have to make the high set point of the temperature sensor 78 and then trigger when the sensor zone goes NOT READY.
 
Desert_AIP said:
I'd use
 

WHEN Outside Temperature NOT READY
AND IF Time Clock 1 ENABLED
THEN AC Switch ON FOR 1 HOUR
 
Thanks for the advice I was,  I was staying away from Time Clock because there is only three of them.  but i guess for this its the best way to go.  
 
I will play around with it this weekend and keep you guys posted
 
You could replace the time clock line with two time statements to bracket the period of interest.
That's an easy way to test and no problem if you have the programming lines available.
 
Desert_AIP said:
I'd use
 

WHEN Outside Temperature NOT READY
AND IF Time Clock 1 ENABLED
THEN AC Switch ON FOR 1 HOUR


I'm using this as an inside temp with an omni stat 2.  So i couldn't find a "When temp is greater then" to start the code.  So what i ended up doing and it seems to work.
When Arm Day
               and if time clock 1 is enabled 
               and if 2nd floor current temp is greater then 78
                        Then A/C unit on for 1 hour

 
I m sure there is a better way to write this(i'm still a newbie at this)  but being that alarm is always on, the times i need the time clock on I think it will work.  Thanks for everyone's help
 
If you want to use a "When Temp Is Greater Than" trigger.
 
Make the High Setpoint of the Thermostat you trigger temp, e.g., 78.
If you don't want to trigger on a lower temp too, then make the Low Setpoint 0.
Then use

WHEN 2nd Floor NOT READY

 
If you do want to also trigger on a low setpoint, and make the setpoint any value other than 0, then you create a window.
e.g., if the Low Setpoint is 65, then the thermostat zone would be SECURE between 65 and 78 and NOT READY if it was below 65 OR above 78.
This can cause some odd behavior if you're not careful, for instance turning on the A/C in winter when the zone goes not ready below 65.
Easily fixed by adding an AND IF statement next to check if the temp is high or low.
 
I'm no HVAC expert but with recovery times and cycling issues I've never felt programming a thermostat was something to be toyed with lightly.  Get it wrong and not only will it waste a lot of energy, some actions can end up causing damage.  
 
I'm only vaguely aware of what it's doing, but our thermostats are smart enough to learn how long it takes to bring the temperature to the setpoint.  Their programming automagically adjusts the start time for the system in order to bring the area to that temp BY the setpoint time.  As in, not just turning on the AC at 3pm, but realizing it takes 30 minutes to bring it back to 76F after it's been left set to 79F all day (while it's 90F outside).  So it starts the cycle at around 2:30 to get things going.  Apparently it also dynamically takes the outside temp into account.  So if it wasn't so hot it appears to shorten the recovery time.  Seems rather clever.
 
Of course when you understand this is what it's doing you're not freaking out on other forums bitching about how it's not starting the system on the dot of 3pm... (as I've seen posts by others stating).
 
My point is I'd be concerned about whatever programming was applied has sufficient logic to be smarter than just on/off.
 
well i'm using the tstat(temp) to turn on the wall unit A/C.  i set the temp high bc i don't want it going on all the time. just if it gets to hot for the dog.  (i don't want to have to leave the AC on all day)
 
Back
Top