How to read Enable-Control group level via CGate?

Discussion in 'C-Gate Developers' started by Ingo, May 6, 2011.

  1. Ingo

    Ingo

    Joined:
    Dec 2, 2006
    Messages:
    285
    Likes Received:
    0
    Location:
    South Africa
    Is there a way to read an Enable-Control group level from within CGate? All the options I've tried doesn't return the level.

    From within PICED I can see the status of a button assigned to an Enable-Control group so I guess there must be a way, I just can't find it.

    Regards,
    Ingo
     
    Ingo, May 6, 2011
    #1
    1. Advertisements

  2. Ingo

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    When the enable group changes you will get a C-Gate event like this:

    enable set //HOME/254/203/1 255 #sourceunit=3 OID=3dd5fb10-5bfc-102e-a27b-878401fb59c6

    To get the levels of everything, you can use a "tree" command. For example:

    tree 254

    will give you the enable group levels as part of the reply:

    320- Application 203 ($cb) [enable]
    320- Net Vars:
    320- //HOME/254/203/1 ($1) level=255 state=ok


    You have probably discovered that doing something like:

    get 254/203/1 level

    does not work. We will look at changing this (issue 21346).
     
    Darren, May 9, 2011
    #2
    1. Advertisements

  3. Ingo

    Ingo

    Joined:
    Dec 2, 2006
    Messages:
    285
    Likes Received:
    0
    Location:
    South Africa
    That is exactly how I tried to read the level. Thanks for the workaround and adding this to your future enhancement list, it will make the programming a lot less complicated this side.

    Regards,
    Ingo
     
    Ingo, May 9, 2011
    #3
  4. Ingo

    Ingo

    Joined:
    Dec 2, 2006
    Messages:
    285
    Likes Received:
    0
    Location:
    South Africa
    Just to confirm... The Enable_Control application is a completely 'phantom' application until you actually set/clear a group value, is that correct?

    My testing with PICED showed me that it doesn't know the state of the Enable_Control groups until I physically set it to a value.

    Here is an idea: How about selling a 'Dummy Load' that can act as an output unit but all it does is respond to MMI's and store phantom groups you assign to it. In this way you will always know the state of these groups. I am sure you guys have something like this for lab testing, just label it 'Special Order Parts' put a price on it and sell some to us 'techies'. Hmm... I wonder if a PAC can do this....

    Ingo
     
    Ingo, May 11, 2011
    #4
  5. Ingo

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    As soon as you send a command to C-Gate to set an Enable Group level, or a command on C-Bus setting an Enable Group is seen by C-Gate, the Enable Group will then be created by C-Gate. Until that time, it will appear that there are no Enable Groups, and effectively that there is no Enable Application.

    That is correct, unless you use Power Failure Recovery to remember the level of the Enable Groups. This is the recommended thing to do, and is set automatically when you select an Enable Group for a Schedule. This prevents you from losing the values with a power failure.

    Our recommendation is that applications should remember the values of things like "phantom groups" in case there is a power failure.

    The PAC stores all group address levels so that it is unaffected by a power failure. It is not able to respond to an MMI though. You could get a PAC to send all of the needed levels onto C-Bus after start-up if you wanted to.
     
    Darren, May 12, 2011
    #5
    1. Advertisements

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.