PAC PIR Settings

Discussion in 'C-Touch/HomeGate/SchedulePlus/PICED Software' started by Clinton's Electrical, Nov 4, 2008.

  1. Clinton's Electrical

    Clinton's Electrical

    Joined:
    Mar 28, 2006
    Messages:
    31
    Likes Received:
    0
    Hi All. i Should be Getting A PAC Next Week After My Minder Mk2 Got Hit By Lightning. I Had Simple Logic Programmed Where i Woudl use A Dummy GA (PIR Lounge) And use If PIR Lounge Is On Dim Lounge Lights To 70%. All Fine
    Then If PIR Lounge is Off, Delay For 5 Mins Then set Lounge Lights To 50%
    Then If PIR Lounge is Off, Delay For 7 Mins Then set Lounge Lights To 0%
    Could this be Done With PAC? As I Have Played With Piced For the PAC. And Have Programmed A Touch Screen Fine With The Software before But Not With Logic. Pool Timer Function And Set Outside Lights With Light Level Switch, Sounds And looks easy But the PIR... Not So Sure. Anyone Else Done Similar.?
    Thanks For the Help So Far.
    :D
     
    Clinton's Electrical, Nov 4, 2008
    #1
  2. Clinton's Electrical

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    This should be easy enough with a PAC. If I correctly understand what you require, this will do what you want:

    Code:
    once GetLightingState("PIR Lounge") then
    begin
      SetLightingLevel("Lounge Lights", 70%, "0s");
    end;
    
    if ConditionStaysTrue(GetLightingState("PIR Lounge") = OFF, "0:05:00") then
    begin
      SetLightingLevel("Lounge Lights", 50%, "4s");
    end;
    
    if ConditionStaysTrue(GetLightingState("PIR Lounge") = OFF, "0:07:00") then
    begin
      SetLightingLevel("Lounge Lights", 0%, "4s");
    end;
     
    Darren, Nov 4, 2008
    #2
  3. Clinton's Electrical

    Clinton's Electrical

    Joined:
    Mar 28, 2006
    Messages:
    31
    Likes Received:
    0
    Darren, Thanks For the help. The Code Looks Differnet From the Older minder If,thenAnd etc. But Thanks For the Prompt Reply i Would Like to Create A GA For The PIR Motion 100% And a GA For 30% ( After midnight For Those Refridgerator Raids. He he ) But As Asoon As i Have th Unt i Will play:rolleyes:
    Thanks For the Assistance So Far..
     
    Clinton's Electrical, Nov 5, 2008
    #3
  4. Clinton's Electrical

    Lucky555

    Joined:
    Aug 13, 2007
    Messages:
    229
    Likes Received:
    0
    "if ConditionStaysTrue" - that's brilliant - so much better than "ignore" which doesn't make any sense at all... :D :D :D

    edit - "ignore" which doesn't make any sense at all, to a very intelligent person :D
     
    Last edited by a moderator: Nov 6, 2008
    Lucky555, Nov 6, 2008
    #4
  5. Clinton's Electrical

    Clinton's Electrical

    Joined:
    Mar 28, 2006
    Messages:
    31
    Likes Received:
    0
    I Still Have To Learn All these If Condition... Ignore,, Stuff. Very Good to See Humour here..:cool:
     
    Clinton's Electrical, Nov 6, 2008
    #5
  6. Clinton's Electrical

    Lucky555

    Joined:
    Aug 13, 2007
    Messages:
    229
    Likes Received:
    0
    Stick with Piced (pronounced pick - ed) and C-Bus logic. If you have any areas of confusion read the help files, they are excellent.

    I'm self taught and I'm not very clever.......... Shut up PSC...

    P.S. What's with the :cool: ?

    P.S.S. Drop the code that Darren wrote above into your Pick ed (PAC) program module and it will do exactly what you have described (provided the tags line up). Looks like that Darren kid should get a job at CIS... He would be handy around there. :D
     
    Last edited by a moderator: Nov 7, 2008
    Lucky555, Nov 7, 2008
    #6
  7. Clinton's Electrical

    Clinton's Electrical

    Joined:
    Mar 28, 2006
    Messages:
    31
    Likes Received:
    0
    Thanks Lucky Sorry For The Long Delay. But Having Fun With PAC. Greates C-Bus Product Since.... Er Well Since 2000.. im Also Learing So Far . A Few Blackouts From Master off Settings And Wife Screaming C- Busted !! But Yeah Good Fun...
     
    Clinton's Electrical, Dec 1, 2008
    #7
  8. Clinton's Electrical

    Lucky555

    Joined:
    Aug 13, 2007
    Messages:
    229
    Likes Received:
    0

    If you are triggering "master off's" from buttons on key inputs around the place eg, GoodNight, GoodBye etc, after much trial and error try this arrangement with your C-Bus and Pick ed (PICED) programming.

    Make your button a timer function - toggle - and say 20 seconds time. Put a group address on the button that will be recognised by the PAC / C-Touch etc and used to trigger your GoodNight, GoodBye scene - let's call the group Trig Goodnight. In your logic code use the if ConditionStaysTrue funtion to see if the "Trig Goodnight" group address stays on for 10 seconds. If true SetScene "Goodnight" and set the "Trig Goodnight" group to "OFF"

    What do you get from all of this ? - I'm glad you asked...

    The GoodNight button flashes to show the timer function, if it was not what the user intended they have 10 seconds to press the button again - no harm done - no wife screaming at you...

    When going to bed it is really cool to have a 10 second delay so you can jump into bed, pull the covers up nice and high then have all the lights slowly ramp off.

    If the timer function on the button runs past 10 seconds, your PAC / CTouch is off line or you have written some bodgie code and you have a runtime error. :p :p :p

    Havng said that, these days (don't program much these days) I am sure even after a runtime error you can get the logic engine to auto restart.. Would love to meet the person responsible for such a brilliant platform...
     
    Last edited by a moderator: Dec 2, 2008
    Lucky555, Dec 2, 2008
    #8
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.