PAC Timer accuracy

Discussion in 'C-Touch/HomeGate/SchedulePlus/PICED Software' started by jka, Jan 22, 2007.

  1. jka

    jka

    Joined:
    Apr 9, 2006
    Messages:
    19
    Likes Received:
    0
    Location:
    Wollongong
    Hello
    I am connecting a curtain controller using a single relay. The controller needs 1 second (+-0.2sec) to drive to opened and 2 seconds (+-0.2sec) to drive to closed. I am using the PAC to turn the relay on for the required time. My problem is that it does not work every time - more like 3 from 10. The GA "CurtainOpenerSignal" is triggered from a bell press button. We only need fully opened or closed.

    I originally used the code below........
    once (GetLightingState("CurtainOpenerSignal") = ON) then
    begin
    if (CurtainLastOpened = false) then
    begin
    PulseCBusLevel("Local Network", "Lighting", "CURT.OP - Rumpus curtain motor", 100%, 0, "0:00:01", 0%);
    CurtainOpened := true
    end;
    if (CurtainLastOpened = true) then
    begin
    PulseCBusLevel("Local Network", "Lighting", "CURT.OP - Rumpus curtain motor", 100%, 0, "0:00:02", 0%);
    CurtainOpened := false
    end;
    CurtainLastOpened := CurtainOpened;
    end;

    I thought maybe it was the way I used the timing and tried this.......
    once (GetLightingState("CurtainOpenerSignal") = ON) then
    begin
    if (CurtainLastOpened = false) then
    begin
    SetLightingState("CURT.OP - Rumpus curtain motor", ON);
    Delay("0:00:01");
    SetLightingState("CURT.OP - Rumpus curtain motor", OFF);
    CurtainOpened := true
    end;
    if (CurtainLastOpened = true) then
    begin
    SetLightingState("CURT.OP - Rumpus curtain motor", ON);
    Delay("0:00:02");
    SetLightingState("CURT.OP - Rumpus curtain motor", OFF);
    CurtainOpened := false
    end;
    CurtainLastOpened := CurtainOpened;
    end;

    Is this too tight a spec to get from the timer function?
    Also I thought maybe relay bounce??
    If no ideas I can put an oscilliscope on the relay & check what is happening.

    Any help appreciated, regards Jim.
     
    jka, Jan 22, 2007
    #1
  2. jka

    Charlie Crackle

    Joined:
    Aug 3, 2004
    Messages:
    815
    Likes Received:
    8
    Location:
    Melbourne
    I thaught this was going to be a problem... See

    http://www.cbusforums.com/forums/showthread.php?t=3032&page=2

    Works fine on a minder pulse (1) and pulse (2)

    I pointed out to the manufacture that their timing was too strick for it to work reliabily for raw cbus

    The manufacture contacted me the other day and told me they have changed the code. the new timing specs are...

    Open is 0.6 sec -> 1.7 sec
    Close is 1.7 sec -> 2.9 sec

    Also, anything less than 0.1 sec is ignored to prevent contact bounce stopping the motor just after it was started


    I have not tried the modified motor. You might want to return yours to be reprogramed.

    Also the new code fixes the "SONY remote issue..."

    Charles
     
    Last edited by a moderator: Jan 22, 2007
    Charlie Crackle, Jan 22, 2007
    #2
  3. jka

    znelbok

    Joined:
    Aug 3, 2004
    Messages:
    1,151
    Likes Received:
    17
    are they accepting returns for reprogramming.

    I have one that was planned to be used on "raw" c-bus.

    Mick
     
    znelbok, Jan 23, 2007
    #3
  4. jka

    Charlie Crackle

    Joined:
    Aug 3, 2004
    Messages:
    815
    Likes Received:
    8
    Location:
    Melbourne

    I am sure they would. just email them first.

    Charles
     
    Charlie Crackle, Jan 23, 2007
    #4
  5. jka

    Charlie Crackle

    Joined:
    Aug 3, 2004
    Messages:
    815
    Likes Received:
    8
    Location:
    Melbourne
    Darren ,

    I am intersted to know what cbus timing standard deviation on contact closure time would be if you did 100 *

    PulseCBusLevel("Local Network", "Lighting", "CURT.OP - Rumpus curtain motor", 100%, 0, "0:00:02", 0%);

    With different network loads. I assume it is dependant on this as well

    would it be 2 sec + and - 0.5 sec or 2sec + 0.5 sec only or some other numbers.

    Charles
     
    Charlie Crackle, Jan 23, 2007
    #5
  6. jka

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    C-Bus is not really designed for applications requiring precise timing of signals. The short delays in getting a message onto C-Bus vary depending on how busy the bus is at the time. I have not measured the variations in a pulsed group on C-Bus, but I would imagine that it could vary by +/- 0.5 second or so, depending on what is happening on C-Bus at the time.
     
    Darren, Jan 23, 2007
    #6
  7. jka

    jka

    Joined:
    Apr 9, 2006
    Messages:
    19
    Likes Received:
    0
    Location:
    Wollongong
    Thanks for replies!

    Thanks for all the replies and the reference. The people I got this from are very, very helpful and respond to emails very quickly. I will try the modified motor & post back how it goes. As well as the code I sent in the original post, I plan to use the scheduler to open at sunrise +30 mins and close at sunrise -30 mins. Will also list the timing measurements I get with the scope. Regards Jim.
     
    jka, Jan 24, 2007
    #7
  8. jka

    Richo

    Joined:
    Jul 26, 2004
    Messages:
    1,257
    Likes Received:
    0
    Location:
    Adelaide
    If they are interested in a more full featured cbus integration they can look at joining www.cbus-enabled.com (it's free). Pass the info on.
     
    Richo, Jan 24, 2007
    #8
  9. jka

    Charlie Crackle

    Joined:
    Aug 3, 2004
    Messages:
    815
    Likes Received:
    8
    Location:
    Melbourne

    Would it be +/- 0.5 or just +0.5 why would it be - ?? does the software try to make allowances for cbus command propagation time ??

    Charles
     
    Charlie Crackle, Jan 24, 2007
    #9
  10. jka

    Charlie Crackle

    Joined:
    Aug 3, 2004
    Messages:
    815
    Likes Received:
    8
    Location:
    Melbourne
    I have already told them to change the name from cbus input to "automation dry contact control"

    Not really cbus !!!!!!

    They are thinking of making a controller that would control an entire house of curtains. this could have a real cbus input. I think however they would go for a serial port and send commands this could then be connected to a PAC.
    Their motors are very cheap the bus interface would cost more than the motor !!
     
    Charlie Crackle, Jan 24, 2007
    #10
  11. jka

    Richo

    Joined:
    Jul 26, 2004
    Messages:
    1,257
    Likes Received:
    0
    Location:
    Adelaide
    Even if they only want to use serial the cbus-enabled program is a great resource. They can get full documentation on the c-bus protocol, sample code etc...
     
    Richo, Jan 24, 2007
    #11
  12. jka

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    Is the "it's free" comment something new?

    I always thought there was a cost involved.

    Cheers

    Rohan
     
    rhamer, Jan 25, 2007
    #12
  13. jka

    Richo

    Joined:
    Jul 26, 2004
    Messages:
    1,257
    Likes Received:
    0
    Location:
    Adelaide
    Hi Rohan,

    My bad. C-Bus Enabled program membership starts at AU$200.

    Sorry for the confusion.
     
    Richo, Jan 25, 2007
    #13
  14. jka

    Phil.H

    Joined:
    Jul 29, 2004
    Messages:
    466
    Likes Received:
    0
    Location:
    Sydney
    Not so long ago the C-Bus enabled program was about getting access to the C-Bus protocol for the puposes of writing an interface to C-Bus. Because the C-Bus protocol is the core of the C-Bus offering it would be necessary to sign a contract of non disclosure to protect the interests and Intellectual Property of CIS. Part of the program was the supply of some hardware (serial sim) for the purposes of serial connection between PC / developers hardware and a C-Bus network. There was a nominal fee (few hundred dollars) for the sim and other test kit. This is now largely in the past. With the development of C-Gate and more recently the compiled C-Bus drivers it is now possible for the majority of product developers to build a high level interface without having to worry about the base level protocol. This is now allowing C-Bus to become integrated with many other systems quickly and efficiently. C-Bus is not, and does not have to be the B All and End All control system in the world. It will however benefit from being relevant to as many control systems and technologies as possible. The Boys of The Brains Trust should be congratulated for exposing C-Bus to the world in this way. It has been a soap box issue of mine for several years now. Just over a week ago I was in the US of A with a company who we are representing here in Australia. They are building a C-Bus HLI to their Multi Protocol Building Management System (BMS) at my request. The senior engineer over there who has had to reverse engineer many many BMS system protocols stated that the way the C-Bus drivers are presented, the fact Toolkit / C-Gate reference is an XML file and in particular the supporting documentation it the best they have ever seen.

    Boys take the rest of the day off.

    If any of you work in the commercial arena and have a requirement to interface C-Bus to BMS at a high level - call ;)
     
    Last edited by a moderator: Jan 25, 2007
    Phil.H, Jan 25, 2007
    #14
  15. jka

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    $200 is still pretty cheap, I thought it was more like $2000

    Cheers

    Rohan
     
    rhamer, Jan 25, 2007
    #15
  16. jka

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,397
    Likes Received:
    26
    Location:
    Adelaide, South Australia
    $200 is the correct figure. There are a couple of other levels with (slightly) higher fees, but $200 is what it takes to get off the ground.
     
    ashleigh, Jan 25, 2007
    #16
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.