ADICON Support Forum Applied Digital, Inc.
Page 1 of 1 1
Topic Options
#15542 - 04/06/06 03:24 PM Was Working - Need Advise
Neil Offline
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
#15543 - 04/06/06 04:07 PM Re: Was Working - Need Advise [Re: Neil]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
The setting of variable #30 at line 300 is conditional on variable #25 being < variable #40, but the code doesn't show where the value of variable #25 is coming from... Could you include that code in your post? You might also want to monitor variable #25 just before 4 PM in case its value is the problem.
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#15544 - 04/07/06 08:37 AM Re: Was Working - Need Advise [Re: Guy Lavoie]
Neil Offline
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
#15545 - 04/07/06 08:59 AM Re: Was Working - Need Advise [Re: Neil]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
When you say that variable #30 is set to 1 ok, are you sure that it was indeed set to 0 before 3 PM (so that the "becomes" action of line 301 triggers)?
Try inserting a line between lines 302 and 303 to increment a spare variable such as "THEN Variable #99 + 1" and see if it increments by one at 3PM every day.

Is this still happening every day since the DST time change? If it missed only once on the day after the DST time change, then that would be due to your resetting the flags at 2 AM, since 2:00 doesn't occur on that day. The clock routine internally rolls the time over to 2:00 and then sees that the DST change is needed, and immediately sets it to 3:00 instead.
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#15546 - 04/07/06 09:36 AM Re: Was Working - Need Advise [Re: Guy Lavoie]
Neil Offline
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 Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
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 Offline
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 Offline
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
#15550 - 04/10/06 09:02 AM Re: Was Working - Need Advise [Re: Neil]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
Yes, you could manually set parameters 4 and 5 to 1. Normally, if parameter 5 is set to 1, then the clock routine automatically sets parameter 4 to 1 or 0 at the correct dates (for North America). Currently DST is in force so parameter 4 should be set to 1. When you change the setting using the checkbox in the comms setup screen, then the controller will be updated when you load a new program or set the controller clock; I'm not sure which.

For your original question: Since this stopped working correctly when the time change occurred (and your clock was not automatically adjusted for DST), I suspect that it has something to do with the light levels and the way you are setting clearing/clearing the variable #30 flag according to fixed light levels. I would try playing with the summer values to see if it could be made a bit more tolerant.
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#15551 - 04/10/06 09:40 AM Re: Was Working - Need Advise [Re: Guy Lavoie]
Neil Offline
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 Offline
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
Page 1 of 1 1


Moderator:  Dan Smith, Monte G, ADI Tech Support, Guy Lavoie 
Hop to:
Who's Online
0 registered and 49 anonymous users online.
Recent Posts
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
August
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