Logic with Shutters

Discussion in 'Pascal Logic Code Examples' started by znelbok, Sep 4, 2017.

  1. znelbok

    znelbok

    Joined:
    Aug 3, 2004
    Messages:
    1,151
    Likes Received:
    17
    I need to open and close some windows and shutters with logic. The function in the key inputs is ramp to racall 1 and ramp off but I cant find anything similar in logic other than SetLightingLevel.

    Is this how I would open and close.

    Also, I want to wait until the window is open before taking the next action. There is WaitUntil(), which I thought would be the right thing to use but I then realized that the group for the window goes to the level instantly and hence the wait is made redundant. How would I best tackle this. I can hard code a delay that matches the time in the relay, or can I get that time out of the relay and use it?

    Mick
     
    znelbok, Sep 4, 2017
    #1
  2. znelbok

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,548
    Likes Received:
    178
    Location:
    Adelaide, Australia
    Assuming the shutters are set to level translation mode you use special group values to control the shutters. These are:
    0% close
    1% Close/Stop toggle
    2% Stop
    98% Open/Stop/Close/Stop toggle
    99% Open/Stop toggle
    100% Open

    Just set these values using a setLighting command.

    Actually they aren't ramp commands, they are just preset commands. The shutter relay will ignore the ramp part.

    Unfortunately there is no way to tell when the blinds have stopped, or get their current position (a major design flaw in my opinion). You will just have to put in a delay. The time out is stored in the tag file but getting to it is tricky (I know this because I wrote my own program to extract it so I can track blind position myself.) (If you really want it you have to scan through the tag file looking for the shutter device, then scan through all the <PP> tags till you get to <POWERUPDELAY> and that is the value. Easy huh :) )
     
    Last edited by a moderator: Sep 4, 2017
    Ashley, Sep 4, 2017
    #2
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.