Changing group levels without ramp - CGate Server

Discussion in 'C-Bus Toolkit and C-Gate Software' started by MattyBoy, Apr 3, 2008.

  1. MattyBoy

    MattyBoy

    Joined:
    Oct 22, 2007
    Messages:
    4
    Likes Received:
    0
    Hi there,
    I am an absolute novice with CBus, so apologies if this is listed somewhere else. I've tried the help file, but it didn't shed much light on it.

    I'm using v1.81 and I'm connecting to CGate direct with my application.
    I'm trying to get a switch (in this case a NEO or DLT) to increment the group level by a small amount. I've set the key long press to idle and the long release to idle, and the shortpress to 'down key' and the short release to 'end ramp'. My global Ramp 1 setting is the default 4 secs.

    I've almost got it working the way I want, but the problem is that when I am at 0 reading, and I hit the up key, the switch causes a level set of 100% (255) with a corresponding ramp time, then when you release the button, it stops the ramp on the correct value. Ideally I don't want to see this 'jump' to 100%


    20080403-124108 730 //SUITCASE/254/56/5 07a52250-e17a-102a-9c10-837f6115169e new level=255 sourceunit=54 ramptime=4
    20080403-124108 734 //SUITCASE/254 fa9cf3d0-e179-102a-9bfe-837f6115169e response: 0536380002053E48
    20080403-124108 730 //SUITCASE/254/56/5 07a52250-e17a-102a-9c10-837f6115169e new level=62 sourceunit=54 ramptime=0


    Is there any other function I can use on the key that will do what I want (just a simple increment/decrement of a group address?).

    Background: I'm controlling a multi-room audio amp from our software, and I was wanting to use a DLT to enable the users to set the volume level in this case from the DLT. I listen out for changes to the group address, and raise/lower the volume on the amp accordingly.


    TIA,


    Matt
     
    Last edited by a moderator: Apr 3, 2008
    MattyBoy, Apr 3, 2008
    #1
  2. MattyBoy

    Richo

    Joined:
    Jul 26, 2004
    Messages:
    1,257
    Likes Received:
    0
    Location:
    Adelaide
    Hi Matt,

    You will need to use a recall to go direct to a specifc value. However, you can only have 2 recall values per key (I think). So this is no good for your purposes.

    The trick with processing the C-Gate events is you have to calculate the value based on the ramp time until you see the terminate ramp command (ramptime=0)

    So when you see a ramp command to 255 over 4 seconds you need to workout what each increment will be over that 4 seconds and then slowly apply those values internally in your application until you see another command terminating the ramp or you actually reach the 255 after 4 seconds. This is how the C-bus Clients we write in-house do it (S+/HG/OPC)

    However, the ramptime is actual a ramprate and represents the rate of change required to change the value of a group from 0 to 255 over the specified time. So a ramp command where the starting value is 0 and the target is 255 over 4 seconds will take 4 seconds, however if the starting value is 127 then the ramp will actually take 2 seconds (even though the ramptime=4).
     
    Last edited by a moderator: Apr 3, 2008
    Richo, Apr 3, 2008
    #2
  3. MattyBoy

    MattyBoy

    Joined:
    Oct 22, 2007
    Messages:
    4
    Likes Received:
    0
    Thanks very much for the info. I wasn't sure if I was missing something obvious....
     
    MattyBoy, Apr 3, 2008
    #3
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.