[Message Prev][Message
Next][Thread Prev][Thread Next][Message
Index][Thread Index]
Re: xPL-CGATE Question
Hi John
Have created the Scripts as you have shown but when i try to add
them in my determinators they are not there ...Have tried reloading the
Scripts and also rrestarting xPLHAL but still cant see the new Scripts in
my
list.....Also there appears to be a lot of x10 Scripts which i assumed Tony
created available ??
Frank
----- Original Message -----
From: "John B" <home-automation@xxxxxxx>
To: <ukha_xpl@xxxxxxx>
Sent: Thursday, September 30, 2004 4:31 PM
Subject: Re: [ukha_xpl] xPL-CGATE Question
> Hi Frank,
>
> > John would it be possible to create a determinator which
sents out a
> > cbus command to use the value of a global for the ramp level
rather
than a
> > fixed value then ir commands could increment / decrement the
variable
> > therefore ramping up /down the cbus lighting ????? So basically
have
the
> > option of either a fixed value or using a global when creating
the
> > Determinator ..
>
> Yes, just put {GLOBAL_NAME} as the ramp level (where GLOBAL_NAME is
the
name of the global who's value should be used).
>
> E.g.
> Suppose I have a global called CBus_Lounge that contains the value
192.
> If I set the ramplevel of the C-Bus command in the determinator to
{CBUS_LOUNGE} then when the determinator fires it will substitute the ramp
level with the value currently held in CBus_Lounge.
>
> However, this doesn't help you with the job of
incrementing/decrementing
the global itself.
> There are actions in the determinator wizard to increment/decrement a
global, but only by 1 each time... so that would mean 255 key presses to go
from fully on to fully off!
>
> I guess we need to expand the increment/decrement features to allow
the
user to pick how much the global should be incremented/decremented.
>
> In the mean time, you could always write a small sub routine and call
it
from a determinator.
> For example, to increment a global by 10, write the following in a
script:
>
> Sub IncrementGlobal(GlobalName)
> sys.value(GlobalName) = sys.value(GlobalName) + 10
> End Sub
>
> And to decrement:
>
> Sub DecrementGlobal(GlobalName)
> sys.value(GlobalName) = sys.value(GlobalName) - 10
> End Sub
>
> Just call the above routines from a determinator (using the "Run
a
sub-routine" action) and pass the name of the global that you want to
increment/decrement as the parameter.
>
> Hope that makes sense.
>
> Regards,
>
> John
>
>
>
>
> xPL Links: http://www.xplproject.org.uk http://www.xplhal.com
http://www.xpl.myby.co.uk
> To Post a Message: ukha_xpl@xxxxxxx
> To Subscribe: ukha_xpl-subscribe@xxxxxxx
> To Unsubscribe: ukha_xpl-unsubscribe@xxxxxxx
> Yahoo! Groups Links
>
>
>
>
>
xPL Main Index |
xPL Thread Index |
xPL Home |
Archives Home
|