PIR Functions tab

Discussion in 'C-Bus Toolkit and C-Gate Software' started by froop, Aug 20, 2008.

  1. froop

    froop

    Joined:
    Dec 23, 2007
    Messages:
    124
    Likes Received:
    0
    Location:
    Melbourne, Australia
    I'm playing around with programming some of my PIRs, and I'm curious as to what the Functions tab represents. I can't seem to find the answers here, and the online Toolkit help doesn't help..

    The columns are obvious (LI,DA,SS,SE), but what do the 'Short/Long/Press/Release' rows mean in the context of a PIR??
     
    froop, Aug 20, 2008
    #1
  2. froop

    tobex

    Joined:
    Nov 3, 2006
    Messages:
    728
    Likes Received:
    0
    Location:
    Sydney, Australia
    The functions tab is just a more direct form used to setup a PIR without the fancy graphics. If you change PIR parameters you will notice that values in the functions tab update.

    You can also use it to generate combined actions between several groups if you dont want to use the OR function in an output module.
     
    tobex, Aug 20, 2008
    #2
  3. froop

    froop

    Joined:
    Dec 23, 2007
    Messages:
    124
    Likes Received:
    0
    Location:
    Melbourne, Australia
    Yes, I realise that! I just can't find any real useful documentation that answers my question about what the four rows in the table (short press, long press, short release, long release) mean. Ie, where's the page in a document that says, if you change the "Long release" action under the "DA" column, it will cause xxxxxx to happen, and if you change the "short press" action, yyyyyy will happen.

    It's obvious what they mean in the context of a button press, but not in the case of a PIR.
     
    Last edited by a moderator: Aug 20, 2008
    froop, Aug 20, 2008
    #3
  4. froop

    Newman

    Joined:
    Aug 3, 2004
    Messages:
    2,203
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    The PIR's need to work as you expect for standard functions AND and cater for the "But I just want to change it so that it does this....." cases. Hence, the Functions tab allows you to do non-standard PIR type stuff.

    Try to think of it this way. Whenever the PIR sensor element detects movement it presses a key. If it is continuously sensing movement the key remains held down. When it stops detecting movement it releases the key.

    So, using the DA column as an example, when the PIR first detects movement the key is "pressed". This sends the On command on the network because the key function for Short Press is programmed to On Key. If the PIR sensor continues to detect movement it will then "press" the Long Press key. Since the key function is chosen as Retrigger Timer this will set the timer running.

    Once you understand this you can start to fiddle with how the unit works.
    • If you don't want the timer to run you can change the Short Release and Long Press keys to Idle OR set the timer to 0 seconds.
    • If you want the light to turn on at 50% you can change the Short Press function to Recall 1 and set the Recall 1 level to 50% on the Blocks Tab.
    • If you want to have the light turn on gently with a ramp you can replace the Short Press function with the Up Key function.
    • If you want it to turn on a a light some time after the PIR detects motion you can replace the Short Press key function with Start and set a timer expiry command of Recall 1 or Recall 2.
    I'm sure you'll dream up other scenarios. I hope that's useful.
     
    Newman, Aug 21, 2008
    #4
  5. froop

    froop

    Joined:
    Dec 23, 2007
    Messages:
    124
    Likes Received:
    0
    Location:
    Melbourne, Australia
    Thanks Newman, that's exactly what I was after.
    So the obvious next question, is what about the releases? Does that mean as soon as the PIR stops sensing motion it sends a short release?
     
    froop, Aug 21, 2008
    #5
  6. froop

    Newman

    Joined:
    Aug 3, 2004
    Messages:
    2,203
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    Yep, you got it.
     
    Newman, Aug 21, 2008
    #6
  7. froop

    BradJ

    Joined:
    Aug 6, 2004
    Messages:
    95
    Likes Received:
    0
    Hi all,

    I'm trying to use the Blocks and Functions tabs on my PIR's in an interesting way and I'm not getting the desired result.

    What I want is that if the PIR senses someone when its dark, it sets the level of a group in the Trigger application to a particular level (I've chosen 100%). If it detects someone when its Light, its sets the level in the same group to a different value (I've chosen 50%).

    I'm doing this so I can apply logic to CBUS events that tell me someone is in the zone when its dark (turn the lights on), and someone is still in the zone when the lights have been turned on (keep the lights on). I can ignore them in the zone when its day because I'll see the 'Light' movement but I know I haven't turned the lights on so I know its not dark.

    I don't want to use the 'default' PIR settings because I want to control the timeout externally (i.e. not use the internal timer and retrigger).

    So I've done the following:

    Day time group and Night time group are set the same. I've set the timer to 10 seconds (so I don't flood CBUS) and I've set the expiry function to 'Off Key'.

    Under 'Blocks' for the block (block 2) in use by both the LI and DA, I've set Recall 1 to 100% and Recall 2 to 50% (my two trigger levels).

    Under 'Functions', LIght Short and Long Press is set to 'Recall 2, DArk Short and Long Press is set to Recall 1. The releases are all set to Idle.

    So I'm thinking that if movement is detected when its DArk (either short or long), my trigger group will be set to 100% (Recall 1) and then after 10 seconds the timer will expire and set the level to 'Off'. Likewise, if movement is detected when its LIght, my trigger group will be set to 50% (Recall 2) for 10 seconds before the timer expiry sets it to 'Off'.

    What I'm finding is that when I move in the zone in the dark, my group is repeatedly set to 50%. Not to 100% as I expected, and it doesn't get set to Off after 10 seconds.

    Any suggestions would be greatly appreciated.
    Thanks.
     
    BradJ, Oct 1, 2008
    #7
  8. froop

    BradJ

    Joined:
    Aug 6, 2004
    Messages:
    95
    Likes Received:
    0
    I was thinking about it more and perhaps the 50% (LIght) event is the only one being transmitted because the 'Use same response settings as Day movement' is ticaked. Problem is I can't untick it because if they are independent I can't select the same trigger group. I'm not sure why this limitation is being enforced.

    I could change it to use two separate trigger groups but it just seems a waste of a group.

    As to why there is no 'Off' being transmitted, perhaps setting the level to recall does not utilise the timer in the Unit. So maybe I just set the releases to transmit an 'Off' key and see if I can adjust the debounce parameter to reduce the traffic.
     
    BradJ, Oct 1, 2008
    #8
  9. froop

    Newman

    Joined:
    Aug 3, 2004
    Messages:
    2,203
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    Your timers aren't running because you're not starting them. Set your LI function to Recall2, Retrigger Timer, Retrigger Timer, Idle and set your DA function to Recall1, Retrigger Timer, Retrigger Timer, Idle. That will recall the appropriate level (either recall 1 or 2) when movement is detected and then set the timer running.

    Recall 1 level = 100%, Recall 2 level = 50%.

    There's no need to use 2 separate groups. If you un-tick the "Use same response settings" it frees you up to assign the Night-time Movement (DA) function to a different group address. If this is ticked it forces the Night-Time movement to use the same Group Address as Day-time Movement (LI). In your case it won't matter, since you're just controlling a single Trigger Group.
     
    Last edited by a moderator: Oct 2, 2008
    Newman, Oct 2, 2008
    #9
  10. froop

    BradJ

    Joined:
    Aug 6, 2004
    Messages:
    95
    Likes Received:
    0
    Newman,

    Thanks very much for reading my post. It was pretty long.

    Your instructions certainly did the trick.

    There seems to be a small problem that sometimes my PAC logic doesn't see the 100% (DArk) event. The 50% (LIght) event gets transmitted from the PAC pretty quickly after the 100% event. Maybe within the PAC the 100% event gets overwritten by the 50% event before my code gets a chance to check the trigger group? Is that how the PAC works or does it buffer a number of events per group?

    I haven't had a good look yet but maybe I modify the PIR so that the LIght events take longer to trigger?

    Brad.
     
    BradJ, Oct 2, 2008
    #10
  11. froop

    Newman

    Joined:
    Aug 3, 2004
    Messages:
    2,203
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    Multiple Action Selectors within a Trigger Group (the thing you're sending out of the PIR) are mutually exclusive. The logic engine processes your code 5 times a second so it's possible that the first message received is getting overridden by the second within a single 200ms period. Messages don't get queued, rather the state gets inspected every time the logic code is processed.
    • You can try using 2 different Trigger Groups; or
    • You can try using 2 Group Addresses on the Lighting Application.
     
    Last edited by a moderator: Oct 3, 2008
    Newman, Oct 2, 2008
    #11
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.