ADICON Support Forum Applied Digital, Inc.
Page 1 of 1 1
Topic Options
#22816 - 12/14/11 04:48 AM Heater will not turn on.
dlloyd560 Offline
newbie


Registered: 11/18/10
Posts: 19
I'm trying to turn a heater on if the temp is below 35 after 7am and before 10pm here is the code I wrote but the heater doesn't turn on unless temp drops below 35 after 7am. So if the temp is 33 at 7 then the temp must go above 35 and drop back down below 35 between 7 and 10 for te heater to go on If I cange code to variable 18<35 it keeps sending a-16 on singnal. Can anyone help?


If time of day is >0700
and time of day is <2200
and variable 18 becomes<35
Then house code A/unit code 16, turn on

Top
#22817 - 12/14/11 05:01 AM Re: Heater will not turn on. [Re: dlloyd560]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6406
Loc: Montreal, QC, Canada
You're looking for a single trigger in a situation where the temperature or the time might occur first. You cannot do that in a single statement. The easiest way is probably by using a flag, such as:

If time of day is >0700
and time of day is <2200
and variable 18 < 35
Then Variable #1 = 1
Else Variable #1 = 0

If Variable #1 becomes = 1
Then house code A/unit code 16, turn on

If Variable #1 becomes = 0
Then house code A/unit code 16, turn off


The first group of statements simply determine if the heater should be on or not based on time and temperature, and set the flag variable to 1 if yes. The second and third group of statements turn the heat on or off only if it was not on or off previously, avoiding the sending of multiple A-16 On/Off commands.
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#22818 - 12/14/11 01:04 PM Re: Heater will not turn on. [Re: dlloyd560]
dlloyd560 Offline
newbie


Registered: 11/18/10
Posts: 19
Thanks Guy for the info the heater works great now.
Top
Page 1 of 1 1


Moderator:  Dan Smith, Monte G, ADI Tech Support, Guy Lavoie 
Hop to:
Who's Online
1 registered (John Vomastic) and 13 anonymous users online.
Recent Posts
SECU16IR Output Connecting To A Xantech Connecting Block
by Guy Lavoie
02/10/12 06:14 AM
SECU16IR Output Connecting To A Xantech Connecting Block
by Jean-Marie
02/09/12 08:34 AM
how to post an icon
by manu
02/03/12 03:40 AM
Command Pair
by kuro
02/01/12 12:49 AM
Does anyone have a copy of the latest TSE?
by sevenzenith1
01/30/12 05:17 AM
Shout Box

Newest Members
Paul M. Willis, feshh, manu, chuck214, Funkhauser
2747 Registered Users
Forum Stats
2745 Members
19 Forums
3837 Topics
22722 Posts

Max Online: 67 @ 08/16/11 03:08 PM
February
Su M Tu W Th F Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29