Setting a circuit to 50% then cycling it

Discussion in 'C-Bus Toolkit and C-Gate Software' started by Mike Costello, Dec 18, 2013.

  1. Mike Costello

    Mike Costello

    Joined:
    Dec 9, 2013
    Messages:
    47
    Likes Received:
    0
    Location:
    UK
    Hi all,

    I've got a job where there are DLT's all downstairs but 4 button Saturns in the bedrooms.

    My customer wants to be able to set circuits so on the 1st short press it will set it to 50% but then if he holds it it will cycle up and then down. When he releases it, it will stay on that level.

    When he next short presses the same button it will turn the circuit off.

    Unfortunately with only having 4 buttons in the bedrooms he doesn't want to use 2 buttons for this.

    There isn't currently a PAC or touchscreen but I will add a PAC if required

    Does anyone have an answer to this?

    Thanks
    Mike
     
    Mike Costello, Dec 18, 2013
    #1
  2. Mike Costello

    Robbo_VIC

    Joined:
    Jan 24, 2011
    Messages:
    142
    Likes Received:
    0
    Location:
    Melbourne, VIC
    Hi Mike, would setting the button as Dimmer and Dimmer Function as "Memory" work for you? This means the customer can dim to whatever level they please, then turn the light off, and when they turn it back on, it will come on at the level that it was when it was switched off.
     
    Robbo_VIC, Dec 18, 2013
    #2
  3. Mike Costello

    Mike Costello

    Joined:
    Dec 9, 2013
    Messages:
    47
    Likes Received:
    0
    Location:
    UK
    Thanks Robbo,

    If I can't do exactly what I want to do that's a good option certainly but if there is a way to set it to 50% every time that would be a better solution for me.
     
    Mike Costello, Dec 19, 2013
    #3
  4. Mike Costello

    Roosta

    Joined:
    Nov 22, 2011
    Messages:
    560
    Likes Received:
    1
    Location:
    Australia
    If you set the key function to normal on/off dimmer and then fiddle with the recall settings you should be able to achieve what you require..
     
    Roosta, Dec 22, 2013
    #4
  5. Mike Costello

    Mike Costello

    Joined:
    Dec 9, 2013
    Messages:
    47
    Likes Received:
    0
    Location:
    UK
    Hi Roosta,

    Thanks for the reply.

    I've had a play with that and I can get it to turn on to 50% and then cycle but can't turn it off without the use of another button.

    In essence all I want the button to do is operate the same as when you just set a circuit as a dimmer but start at 50% instead of 100%.

    The problem I have is there's only 4 buttons in many areas and all the buttons are being used so no space for an all off.

    Thanks
    Mike
     
    Mike Costello, Jan 6, 2014
    #5
  6. Mike Costello

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    Was anyone ever able to make this work?

    I have a client that wants the same thing.
    i.e.
    Normal dimmer functionality, but the short press toggle only sets the level to 30%

    So it works as follows;
    Short press toggle between 30% and off
    Long press dim up/down

    All this on 1 button, on standard switches, DLT's and eDLT's.

    If anybody has any ideas (including alternate approaches) I would be grateful.

    Cheers

    Rohan
     
    rhamer, Jan 25, 2017
    #6
  7. Mike Costello

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,524
    Likes Received:
    173
    Location:
    Adelaide, Australia
    I do this using logic. Set to dimmer function then change short release to recall1 at 1%. Then the logic just waits for that value and toggles the ga between off and the preset value:

    Code:
    // Global variables
    studyToggle: boolean;
    
    //Code
    
    once GetLightingLevel("Study_1") = 1% then
     begin
       studyToggle := not studyToggle;
       if studyToggle then
         SetLightingLevel("Study_1", 30%, "0s")
       else
         SetLightingLevel("Study_1", 0%, "0s")
     end; 
    The only issue is that if you dim the light up from off and then do a short release it will set the ga to it's recall value first and you need to press it again to turn the light off. If you were keen you could track the dim function and set the toggle variable appropriately.
     
    Last edited by a moderator: Jan 25, 2017
    Ashley, Jan 25, 2017
    #7
  8. Mike Costello

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    See that's why I ask the questions here, there is always somebody who has been there, done that.

    Thanks Ashley!

    And yes I think setting the Toggle variable based on 0 or not zero would be a nice final touch.

    Cheers

    Rohan
     
    rhamer, Jan 25, 2017
    #8
  9. Mike Costello

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,524
    Likes Received:
    173
    Location:
    Adelaide, Australia
    It was for me so sloppy was ok :)

    All fixed

    Code:
    // Global variables
    studyToggle: boolean;
    studyLevel: integer;
    
    //Code
    studyLevel := GetLightingLevel("Study_1");
     once studyLevel = 1% then
     begin
       if studyToggle then
         SetLightingLevel("Study_1", 30%, "0s")
       else
         SetLightingLevel("Study_1", 0%, "0s")
     end;
     studyToggle := studyLevel = 0;
     
    Ashley, Jan 25, 2017
    #9
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.