Change State Logic?

Discussion in 'C-Touch/HomeGate/SchedulePlus/PICED Software' started by muppets, Nov 12, 2007.

  1. muppets

    muppets

    Joined:
    Oct 26, 2007
    Messages:
    98
    Likes Received:
    0
    Just wondering if anyone knows how to write code for a change in state of a cbus installation.

    I have a logic code that unfortunately is executed repeatedly which is ok with me but i'm sure will bog down the system and could over time cause errors. Has anyone had any experience with this problem and knows how to overcome it?

    I know that if I execute it only on changed state for the two monitored inputs I can run the code effectively then but I just can't find anything that monitors "changed state".

    The inputs are a key input and an aux input.

    If I can get some help with this it is a good example for overide control with fallback. (Basically two inputs with an advanced priority system.)

    Will post example if req'd.
     
    muppets, Nov 12, 2007
    #1
  2. muppets

    Lucky555

    Joined:
    Aug 13, 2007
    Messages:
    229
    Likes Received:
    0
    Look in the Logic help file for "once" then vote 1 - Darren for Prime Minister ;)
     
    Lucky555, Nov 12, 2007
    #2
  3. muppets

    muppets

    Joined:
    Oct 26, 2007
    Messages:
    98
    Likes Received:
    0
    thanx - that sounds logical lol

    wont work for me with current config (conditional statements - ifs inside ifs) however I can just add a heap more code to cover each condition at the top with the once command.

    Will see how it goes and post back - at least I wont be repeatedly executing.

    Out of interest the system does point me to use scenes to safely work around - is this really a safe work around or is it better just not to repeat at all? As it currently works great with the repeating excecute on the scene (for how long couldn't tell you though).

    Gotta comment on the terrific error debug feature - it not only tells you there is a problem, it also points you into the right direction to fix the fault.

    edit :

    the warning was

    Warning W005 at line 124:46 - It is recommended that a Scene be used for sending multiple C-Bus commands.
    Compiled OK
     
    Last edited by a moderator: Nov 12, 2007
    muppets, Nov 12, 2007
    #3
  4. muppets

    muppets

    Joined:
    Oct 26, 2007
    Messages:
    98
    Likes Received:
    0
    muppets, Nov 12, 2007
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.