Controlling Motorised Devices with following LED status

Discussion in 'Pascal Logic Code Examples' started by PSC, May 7, 2006.

  1. PSC

    PSC

    Joined:
    Aug 3, 2004
    Messages:
    626
    Likes Received:
    0
    Location:
    Brisbane, Australia
    First of all the blinds should be electrically interlocked using two channels of a Change Over relay.

    TOOLKIT

    Create one GA for that blind in the 'Trigger' application e.g. KITCHEN BLINDS.

    Create four 'Action Selectors' e.g. 0 = OFF, 1 = OPEN, 2 = STOP, 3 = CLOSE within than GA.

    You will need three buttons to control the blinds - OPEN / STOP / CLOSE.

    Setup the OPEN / STOP / CLOSE button functions as a 'Scene' within the input unit (DLT, Reflection, Saturn & NEO only). Edit the details for that function by selecting the box to the right of the 'function' drop down box.

    Select 'KITCHEN BLINDS' from the 'Trigger Group' drop down box, select the required 'Trigger Group Action Selector' from the drop down box - i.e. OPEN. Leave the other options in that window as default - Scene 1 and Instant.

    Setup the output unit (Change Over relay) for the required GA's i.e. -
    Channel 1 = KITCHEN BLIND 1 OPEN
    Channel 3 = KITCHEN BLIND 1 CLOSE
    Channel 3 = KITCHEN BLIND 2 OPEN
    Channel 4 = KITCHEN BLIND 2 CLOSE



    PICED / S+

    Create a scene for the blinds along these lines -

    FOR THE OPEN COMMAND:
    KITCHEN BLIND 1 CLOSE to Level '0%', Ramp Rate '0s'.
    KITCHEN BLIND 2 CLOSE to Level '0%', Ramp Rate '0s'.
    KITCHEN BLIND 1 OPEN to Level '100%', Ramp Rate '0s'.
    KITCHEN BLIND 2 OPEN to Level '100%', Ramp Rate '0s'.


    SCENE TRIGGER:
    NETWORK: NETWORK1
    APPLICATION: Trigger Control
    GROUP ADDRESS: KITCHEN BLINDS
    TAG: OPEN


    FOR THE STOP COMMAND:
    KITCHEN BLIND 1 CLOSE to Level '0%', Ramp Rate '0s'.
    KITCHEN BLIND 2 CLOSE to Level '0%', Ramp Rate '0s'.
    KITCHEN BLIND 1 OPEN to Level '0%', Ramp Rate '0s'.
    KITCHEN BLIND 2 OPEN to Level '0%', Ramp Rate '0s'.


    SCENE TRIGGER:
    NETWORK: NETWORK1
    APPLICATION: Trigger Control
    GROUP ADDRESS: KITCHEN BLINDS
    TAG: STOP


    FOR THE CLOSE COMMAND:
    KITCHEN BLIND 1 OPEN to Level '0%', Ramp Rate '0s'.
    KITCHEN BLIND 2 OPEN to Level '0%', Ramp Rate '0s'.
    KITCHEN BLIND 1 CLOSE to Level '100%', Ramp Rate '0s'.
    KITCHEN BLIND 2 CLOSE to Level '100%', Ramp Rate '0s'.


    SCENE TRIGGER:
    NETWORK: NETWORK1
    APPLICATION: Trigger Control
    GROUP ADDRESS: KITCHEN BLINDS
    TAG: CLOSE


    FOR THE OFF COMMAND:
    KITCHEN BLIND 1 OPEN to Level '0%', Ramp Rate '0s'.
    KITCHEN BLIND 2 OPEN to Level '0%', Ramp Rate '0s'.
    KITCHEN BLIND 1 CLOSE to Level '0%', Ramp Rate '0s'.
    KITCHEN BLIND 2 CLOSE to Level '0%', Ramp Rate '0s'.


    SCENE TRIGGER:
    NETWORK: NETWORK1
    APPLICATION: Trigger Control
    GROUP ADDRESS: KITCHEN BLINDS
    TAG: OFF


    You will need to setup your timers for the OPEN / STOP / CLOSE functions in the 'Constants' section of the Logic Engine. Here's one I prepared earlier -

    KITCHEN BLINDSOpenTimer = 1;
    KITCHEN BLINDSStopTimer = 2;
    KITCHEN BLINDSCloseTimer = 3;


    Another good idea is to setup reset the timers in the 'Intialisation' section of the Logic Engine. Here's one I prepared earlier -

    TimerStop (KITCHEN BLINDSOpenTimer);
    TimerStop (KITCHEN BLINDSStopTimer);
    TimerStop (KITCHEN BLINDSCloseTimer);


    OK, now we need to write some code to control the blinds. Here's one I prepared earlier -

    {BLIND LOGIC CONTROL - OPEN}
    once (GetCBusLevel("NETWORK1", "Trigger Control", "KITCHEN BLINDS") = 1 {"OPEN"} ) then
    begin
    TimerStart(KITCHEN BLINDSOpenTimer);
    TimerStop(KITCHEN BLINDSCloseTimer);
    TimerStop(KITCHEN BLINDSStopTimer);
    end;

    once TimerTime(KITCHEN BLINDSOpenTimer) = "0:00:45" then
    begin
    SetCBusLevel("NETWORK1", "Trigger Control", "KITCHEN BLINDS", "OFF", 0);
    TimerStop(KITCHEN BLINDSOpenTimer);
    end;

    {BLIND LOGIC CONTROL - STOP}
    once (GetCBusLevel("NETWORK1", "Trigger Control", "KITCHEN BLINDS") = 2 {"STOP"} ) then
    begin
    TimerStart(KITCHEN BLINDSStopTimer);
    TimerStop(KITCHEN BLINDSCloseTimer);
    TimerStop(KITCHEN BLINDSOpenTimer);
    end;

    once TimerTime(KITCHEN BLINDSStopTimer) = "0:00:02" then
    begin
    SetCBusLevel("NETWORK1, "Trigger Control", "KITCHEN BLINDS", "OFF", 0);
    TimerStop(KITCHEN BLINDSStopTimer);
    end;

    {BLIND LOGIC CONTROL - CLOSE}
    once (GetCBusLevel("NETWORK1", "Trigger Control", "KITCHEN BLINDS") = 3 {"CLOSE"} ) then
    begin
    TimerStart(KITCHEN BLINDSCloseTimer);
    TimerStop(KITCHEN BLINDSOpenTimer);
    TimerStop(KITCHEN BLINDSStopTimer);
    end;

    once TimerTime(KITCHEN BLINDSCloseTimer) = "0:00:45" then
    begin
    SetCBusLevel("NETWORK1", "Trigger Control", "KITCHEN BLINDS", "OFF", 0);
    TimerStop(KITCHEN BLINDSCloseTimer);
    end;


    You will find that the scenes will be fired by the trigger levels and LED on the input unit will stay on for the nominated time as well as following the current direction of the blinds.
     
    PSC, May 7, 2006
    #1
  2. PSC

    Chicken

    Joined:
    May 7, 2006
    Messages:
    9
    Likes Received:
    0
    Location:
    Wagga Wagga
    Changeover relay

    What if you are not using a change over relay can this still be done in (PICED)
     
    Chicken, May 13, 2006
    #2
  3. PSC

    PSC

    Joined:
    Aug 3, 2004
    Messages:
    626
    Likes Received:
    0
    Location:
    Brisbane, Australia
    Not using a change over relay will still work fine. The only reason why we recommend using a change over relay is to electrically interlock the up / down - open / close channels.

    If a change over relay is not used there is a chance that both channels could be powered at the same time and damage the motor.
     
    PSC, May 13, 2006
    #3
  4. PSC

    Chicken

    Joined:
    May 7, 2006
    Messages:
    9
    Likes Received:
    0
    Location:
    Wagga Wagga
    Interlocking

    Well u can still put in a software interlock which does the same job but isnt as full proof as a changeover relay. if you create a up scene and set the up channel to 100% with a 4s ramp rate and the down channel to 0% also with a 4s ramp rate. Then create a down scene and set the down channel to 100% with a 4s ramp rate. set the up channel to 0% with a 4 sec ramp rate. I am sure this is a software interlock and i have used this interlock in several projects with out any promblems as of yet. But with out the change over relay i cant seem to get your program to work in piced. Is this because i need a logic engine to create a timer that will trigger these scences.
    Maybe by looking at the project you can tell me what i am doing wrong.
     
    Last edited by a moderator: May 14, 2006
    Chicken, May 14, 2006
    #4
  5. PSC

    Duncan

    Joined:
    Jul 23, 2004
    Messages:
    925
    Likes Received:
    0
    Location:
    Salinas de Garci Mendoza, Bolivia
    (please excuse the off topic post.. )

    Therac 25, a radiation therapy machine.. a great example of hardware interlocks being given the shove in favour of software interlocks.. disastrous results.. a fascinating story.. overview at http://en.wikipedia.org/wiki/Therac-25

    More detailed info at the external links referenced at wikipedia..
     
    Duncan, May 14, 2006
    #5
  6. PSC

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,392
    Likes Received:
    24
    Location:
    Adelaide, South Australia
    After 20 years in te electronics and software design business, I'll recommend a hardware interlock every time over a software interlock.
     
    ashleigh, May 14, 2006
    #6
  7. PSC

    Chicken

    Joined:
    May 7, 2006
    Messages:
    9
    Likes Received:
    0
    Location:
    Wagga Wagga
    I get the point but lets face it what are the chances of cbus software energising those two channels in a malfunction. yes there is a chance that someone may locally toggle the channels but i quess you just diable local toggle. There is a saying out in the country . "It's FARM SAFE" . So i guess u just put your faith in cbus runng smothly with no hick ups.
     
    Chicken, May 14, 2006
    #7
  8. PSC

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    Iv'e heard that saying a little differently.

    "It's Farm Built"........

    Sorry, but I agree on the hardware interlocks.
     
    rhamer, May 14, 2006
    #8
  9. PSC

    PSC

    Joined:
    Aug 3, 2004
    Messages:
    626
    Likes Received:
    0
    Location:
    Brisbane, Australia
    Example -

    The client doesn't like your attitude, they ring me up and ask me to take over the C-Bus programming.

    You haven't left the client any files or documentation and I need to start from scratch. I start controlling the output units via the built-in buttons. I turn on all the channels on a 12ch relay, I am now powering both sides of the motor. The motor is now stuffed and I need to replace it.

    Result - Two very unhappy campers.

    To answer your question re programming in PICED - yes you need the logic engine.
     
    PSC, May 14, 2006
    #9
  10. PSC

    Chicken

    Joined:
    May 7, 2006
    Messages:
    9
    Likes Received:
    0
    Location:
    Wagga Wagga
    That is a fair call, I see the many floors in software interlocks now . Especially with the cow boy programers getting around. A very good point. What were your thoughs on the way i program or the way i set a project out.
     
    Chicken, May 14, 2006
    #10
  11. PSC

    Caroline Springs

    Joined:
    Jun 6, 2005
    Messages:
    13
    Likes Received:
    0
    Why taking 2 channels?

    Gents,

    If you use a change over relay, you will use 3 of 3 terminals in the first changeover channel and 2 of 3 terminals in the second changeover relay. Even that this arrangement provides a hardware lockup I see that the second channel of the changeover relay can be replaced by a single channel from a standard voltage free relay unit. The voltage free relay channel is connected to the common line from the blind motor and output this line to the common channel of the changeover relay, which selects up or down.

    I'll have to control 16 window shutters soon, and according to PSC I'll need 16/2 = 8 changeover relay units (about $400 x 8 = $3200). But if I use 4 changeover relays ($400 x 4 = $1600) plus two 12-channel voltage free relays ($700 x 2 = $1400), I'll not only be paying slightly less money, but I'll have 8 relay spare channels.

    Have any member tried this configuration?

    CS.
     
    Caroline Springs, Jul 23, 2006
    #11
  12. PSC

    Darpa

    Joined:
    Apr 30, 2006
    Messages:
    426
    Likes Received:
    0
    Location:
    Australia
    As long as you feel confident in your ability to program the relays correctly in this situation, then there is no reason why your suggestion wont work electrically :)

    Darpa
     
    Darpa, Jul 24, 2006
    #12
  13. PSC

    Caroline Springs

    Joined:
    Jun 6, 2005
    Messages:
    13
    Likes Received:
    0
    Roller shutter speed control ??

    Another advantage of using this configuration is the chance to control motor speed. If the voltage-free relay is replaced with a Dimmer, it would be possible to control motor speed. The changeover relay controls then motor direction.

    CS
     
    Caroline Springs, Jul 30, 2006
    #13
  14. PSC

    PSC

    Joined:
    Aug 3, 2004
    Messages:
    626
    Likes Received:
    0
    Location:
    Brisbane, Australia
    Caroline,

    Connect any motor to a dimmer, run it at less than 100% and see how long it lasts...

    Then report your findings back on this forum ;)
     
    PSC, Jul 30, 2006
    #14
  15. PSC

    Darpa

    Joined:
    Apr 30, 2006
    Messages:
    426
    Likes Received:
    0
    Location:
    Australia
    EDIT:

    Ignore this post, as Rohan has corrected me later in this thread


    Now now Peter, be nice, and stop trying to teach people a lesson just by tricking them into wasting large amounts of money until they get the point :p
    (Sorry to ruin all your fun mate, I'm just a prick like that :p )

    Caroline Springs, just so you know, motors, or any other devices that are not lights (of the types defined as being suitable for the dimmer), should NEVER be run from a dimmer! Dimmers are so-named because they are designed for "dimming" LIGHTS ONLY!!
     
    Last edited by a moderator: Jul 31, 2006
    Darpa, Jul 30, 2006
    #15
  16. PSC

    BSS

    Joined:
    Aug 4, 2004
    Messages:
    37
    Likes Received:
    0
    Location:
    Sydney Australia
    Why would you want to slow the blinds down any further. Most blinds are painfully slow anyway, with good reason to protect the investment and to limit damage when things start to go wrong in the mechanics.
     
    BSS, Jul 31, 2006
    #16
  17. PSC

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    This is not right.

    Dimmers can control inductive loads. They are also suitable for controlling ceiling and exhaust fans (and yes I know about the noise produced from the triac switching).

    This is stated in the documentation that comes with the dimmer modules, and for the record, I have had both ceiling and exhaust fans running off dimmers for many years, with no problems.

    Now, I have no idea of the suitability of the blind motors, but to say you should never run a motor from a dimmer is wrong.

    Rohan
     
    rhamer, Jul 31, 2006
    #17
  18. PSC

    Darpa

    Joined:
    Apr 30, 2006
    Messages:
    426
    Likes Received:
    0
    Location:
    Australia
    Fair point Rohan :)

    The reason for my statement earlier is just that from personal experience, everyone I've talked to about the subject has strongly recommended against this practice, but I am more than happy to concede being wrong about the subject.

    Some other interesting reading about this topic:

    Switching Ceiling Fans
    Ceiling Fan Control Using Just 1 Button
    Ceiling Sweep Fans and Low Power Supply
    Ceiling Fan control

    Darpa :)
     
    Darpa, Jul 31, 2006
    #18
  19. PSC

    eleroAustralia

    Joined:
    Nov 12, 2004
    Messages:
    44
    Likes Received:
    0
    Location:
    Germany
    Hi there,
    just to clear it up:

    DO NOT RUN BLIND (OR SHUTTER) MOTORS ON A DIMMER

    it WILL damage them (and they do not run any slower if you would connect them anyway :)

    the only exepction would be DC motors (and ramping the voltage down) IF allowed by the specs.
     
    eleroAustralia, Jul 17, 2007
    #19
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.