#15542 - 04/06/06 03:24 PM
Was Working - Need Advise
|
Neil
enthusiast
Registered: 02/03/05
Posts: 211
|
The following was working fine and now I noticed .....
Var#25 is the light level Var#30 is set to 1 but nothing else happens. Seems to stop working at DST change over. Its the after 3pm deal that is not working so far.
0080 - IF Month is > September (9) // April 1 - Sept 30 = Summer 0081 - OR Month is < April (4) // 0082 - THEN Variable #29 = 185 // Var29 = Light Level for Den Lamp (day) 0083 - THEN Variable #40 = 210 // Var40= Light Level for Den Lamp (eve) 0084 - THEN Variable #41 = 215 // Var41= OFF Level Winter Time 0085 - ELSE Variable #40 = 225 // Var40= Light Level for Den Lamp (eve) 0086 - ELSE Variable #29 = 200 // Var29= Light level for Den Lamp (day) 0087 - ELSE Variable #41 = 230 // Var41= OFF Level Summer Time
0294 - IF Variable #25 is < Variable #29 // Den Lamp 0295 - AND Time of Day is > 09:00 // 0296 - AND Variable #24 is = 1 // Home 0297 - THEN Variable #30 = 1 // set flag 0298 - IF Variable #25 is < Variable #40 // 0299 - AND Time of Day is > 15:00 // 0300 - THEN Variable #30 = 1 // set flag 0301 - IF Variable #30 becomes = 1 // if flag is set 0302 - AND Timer #13 is = 0 // not locked-out 0303 - THEN X-10 House N / Unit 4, Turn ON // 0304 - THEN Variable #28 = 1 // flag set for ON 0305 - THEN Timer #13 = 65236 // lock-out for 5mins 0306 - IF Variable #25 becomes > Variable #41 // 0307 - AND Variable #28 is = 1 // lamp was turned ON 0308 - THEN X-10 House N / Unit 4, Turn OFF // Den Lamp OFF 0309 - THEN Variable #28 = 0 // reset 0310 - THEN Variable #30 = 0 // reset
|
|
Top
|
|
|
|
#15544 - 04/07/06 08:37 AM
Re: Was Working - Need Advise
[Re: Guy Lavoie]
|
Neil
enthusiast
Registered: 02/03/05
Posts: 211
|
Guy:
Here is the light level capture variable and also resetting the Var 30 at 2am.
0126 - IF Module #2 -BOBCAT-L is > -100 // 0127 - THEN Load Data to: Variable #25 // var #25 set for Sunset Light Level 0128 - ELSE Load Data to: Variable #25 // 0129 - IF Variable #25 is = Variable #25 // 0130 - THEN Variable #25 - 100
0320 - IF Time of Day becomes = 02:00 // Reset Flag @ 2am 0321 - THEN Variable #30 = 0 // Var 30= Den Lamp 0322 - THEN Variable #31 = 0 // Var 31= Counter Light 0323 - THEN Variable #32 = 0 // Var 32= Mst Bed Lamp 0324 - THEN Variable #33 = 0 // Var 33= Living Rm Lamp 0325 - THEN Variable #34 = 0 // Var 34= Hallway Light 0326 - THEN Variable #35 = 0 // Var 35= Porch/Deck Lights 0327 - THEN Variable #36 = 0 // Var 36= Garden Lights
_________________________
Neil
|
|
Top
|
|
|
|
#15546 - 04/07/06 09:36 AM
Re: Was Working - Need Advise
[Re: Guy Lavoie]
|
Neil
enthusiast
Registered: 02/03/05
Posts: 211
|
Guy:
When Var 30 was set to 1, I assumed it was at 0 before due to the 2am reset (line 320-321).
I noticed it didnt not work properly on Monday and Tuesday, Wed and Thur all was well.
Thats another thing, my Ocelot did not adjust for DST, is this normal or I missed a setting somewhere?
_________________________
Neil
|
|
Top
|
|
|
|
#15547 - 04/07/06 10:04 AM
Re: Was Working - Need Advise
[Re: Neil]
|
Guy Lavoie
Beyond All Hope
   
Registered: 12/21/02
Posts: 6401
Loc: Montreal, QC, Canada
|
The value of variable 25 comes from a light level. Could it be that for whatever reason, the light level was too high on those days? If you think that the problem might happen again, try capturing the value of variable #25 in a spare variable at 3PM so that you can see it later using "debug timers and variables". Do something like this:
IF Time of Day becomes = 15:00 THEN Variable #98 = Variable #25
In the same manner, you might want to capture the value of variable #30 just before 3PM if you have doubts about its initial value:
IF Time of Day becomes = 14:59 THEN Variable #97 = Variable #30
As for your DST not switching automatically, look at your "comms setup" and make sure that the DST check box is check off. To see the current setting in the Ocelot, look at controller parameter 5. If it is set to 1, then it will test for DST changes. Also look at parameter 4: if it is set to 1, then it is currently in DST mode, while a setting of 0 means its at standard time.
_________________________
"If you don't know what you're doing, do it neatly..."
|
|
Top
|
|
|
|
#15548 - 04/07/06 10:35 AM
Re: Was Working - Need Advise
[Re: Guy Lavoie]
|
Neil
enthusiast
Registered: 02/03/05
Posts: 211
|
Guy:
Thanks for the pointers on the DST.
Now if the light level is high on those days, it has to go low somtime, and my goal is, if its after 3pm and the light level goes to the level I want then turn on the light. I dont want the light to turn on before 3pm (say it gets cloudy or so coz I am at work).
Now 3pm comes aorund and light level is bright, thats OK, now as the light level drops (its after 3pm) then it should trigger, which it does var 30. But for some reason it dont turn ON, maybe the timer wasnt zero but why would that be?
Thanks for all your help.
_________________________
Neil
|
|
Top
|
|
|
|
#15549 - 04/10/06 08:10 AM
Re: Was Working - Need Advise
[Re: Guy Lavoie]
|
Neil
enthusiast
Registered: 02/03/05
Posts: 211
|
Guy:
Both para 4 and 5 of controller parameter is at 0. Do I have to manually set 4 to 1?
I checked off the box in the comm setup, but how will that d/laod to the controller?
|
|
Top
|
|
|
|
#15551 - 04/10/06 09:40 AM
Re: Was Working - Need Advise
[Re: Guy Lavoie]
|
Neil
enthusiast
Registered: 02/03/05
Posts: 211
|
Since I updated the clock, all has been well so far.
Will set the para and I should be OK moving forward now.
Thanks again
|
|
Top
|
|
|
|
#15552 - 05/17/06 01:49 PM
Re: Was Working - Need Advise
[Re: Guy Lavoie]
|
Neil
enthusiast
Registered: 02/03/05
Posts: 211
|
Still having problems with this piece of code, this is what I noticed:
if the lamp turns on (after 3pm) say at 4, and the light level goes back up, the lamp then turns off (as planned) but when the light level drops again, the lamp does not turn on.
Could it be the light level is dropping within 5 mins and the lamp does not turn on because of the 5 min timer?
Neil
|
|
Top
|
|
|
|
Moderator: Dan Smith, Monte G, ADI Tech Support, Guy Lavoie
|
0 registered
and 26 anonymous users online.
|
|
2747 Members
19 Forums
3835 Topics
22711 Posts
Max Online: 67 @ 08/16/11 03:08 PM
|
|
|
|
|
|
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
|
|
|
|
|
|