The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: 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 Main Index | xPL Thread Index | xPL Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.