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
junior


Registered: 11/18/10
Posts: 38
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: 6548
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
junior


Registered: 11/18/10
Posts: 38
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, Bobkat 
Hop to:
Who's Online
0 registered and 64 anonymous users online.
Recent Posts
Cmax Message: Failed to set data for a 'delay'
by John Vomastic
07/03/17 10:14 PM
Shout Box

Newest Members
brigiel, vevevie, zhutree, 416, saiqul
3003 Registered Users
Forum Stats
3003 Members
19 Forums
4000 Topics
23426 Posts

Max Online: 132 @ 11/13/16 10:07 AM
July
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
30 31