ADICON Support Forum Applied Digital, Inc.
Page 1 of 1 1
Topic Options
#16807 - 11/27/06 10:45 PM Need help for shut-down sequence
jerrybeast Offline
newbie


Registered: 11/27/06
Posts: 2
Hi

I'm new to this forum and i need help to program a routine for my ocelot.

I've tried several ways to program but it just won't work.

I'ld like to program a shutdown sequence if A/16 turns on.

when A/16 (trigger) turns on, i'll have 10 seconds to reply (pushing a button) which means i'ld be still awake otherwise all units turn off.

While this sequence is running A/3(lamp) turns ON & Off.

If i'ld reply within 10 seconds the A/3 on/off sequence should stop and lamp A/5 should be on for 2 seconds.

I've tried several times but it just won't work the way i want.

This is what i've so far.

if A/16 turns on
and A/1 is on
and A/7 is on
then timer#0=65525
then var#0=1
then A/16 turn off
if receive A/21
then A/5 turn on
then timer#1=65530
if timer#1=0
and var#0=1
then A/5 turn off
then var#0=0
if timer#0=0
and var#0=1
then -shut down units-
then var#0=0
if timer#0 is NOT=0
then A/3 turn on
if timer#0 is NOT=0
then A/3 turn off
end

I'ld appriciate if someone could help me out.

Thanks in advance,

Top
#16808 - 11/28/06 06:25 AM Re: Need help for shut-down sequence [Re: jerrybeast]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
I see, you want to create a challenge/response system using X-10. The problem with X-10 is that it has limited bandwidth, so if you want to be able to respond to the warning (flashing light), the risk of an X-10 collision is high since you would need to respond between the flashes. The best way around this would be to make the flash sequence slow enough to give you time to respond between state changes. Try something like this:

if A/16 ON Command pair //if trigger conditions occur...
and A/1 is on
and A/7 is on
then timer#0 = 1 //then start timer
then A/3 turn ON //and turn on light

if timer#0 becomes > 2 //two seconds later
then A/3 turn OFF //turn off light

if timer#0 becomes > 4 //two seconds later
then A/3 turn ON //turn on light

if timer#0 becomes > 6 //two seconds later
then A/3 turn OFF //turn off light

if timer#0 becomes > 8 //two seconds later
then A/3 turn ON //turn on light

if timer#0 becomes > 10 //two seconds later
then A/3 turn OFF //turn off light
then timer #0 = 0 //stop timer
then shut down units... //do whatever shutdown

if receive A/21 //sending a "dim" to respond?
then timer #0 = 0 //stop timer immediately
then A/5 turn on //turn on acknowledge light
then A/3 turn OFF //turn off A/3 (if it was on)
then A/5 turn off //turn off acknowledge light
end


If you find that the 2 second interval beween light status changes is too tight to reliably send your response (ie: due to collisions) then you could modify the sequence to send an on or an off every 3 seconds or whatever.
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#16809 - 11/28/06 07:23 AM Re: Need help for shut-down sequence [Re: Guy Lavoie]
jerrybeast Offline
newbie


Registered: 11/27/06
Posts: 2
thanks for the fast response..

it's great info..

Many thanks

Top
Page 1 of 1 1


Moderator:  Dan Smith, Monte G, ADI Tech Support, Guy Lavoie 
Hop to:
Who's Online
0 registered and 65 anonymous users online.
Recent Posts
Secu16 inputs not working correctly
by ADI Tech Support
10/03/17 06:01 AM
Ocelot Battery
by ADI Tech Support
09/22/17 07:38 AM
Shout Box

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

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