What am I missing ?

Discussion in 'C-Bus Wiser 1 Controller' started by CABrouwes, Sep 1, 2011.

  1. CABrouwes

    CABrouwes

    Joined:
    Apr 25, 2009
    Messages:
    86
    Likes Received:
    2
    Location:
    New York Area
    I am trying to develop the logic for a c-bus network before it is actually installed. I am fine with PICED and the necessary Pascal programming. I am now conducting some tests on a Wiser. I have the Wiser set up but not connected to any c-bus network. I have written a very simple test program that works well in the Piced workspace but is ineffective on the wiser.

    The program is simple:

    I define one Boolean IO variable called "toggle".

    I have only one module with the simple code

    once (GetBoolSystemIO("toggle") = true) then
    begin
    Delay("00:00:01");
    SetBoolSystemIO("toggle", false);
    end;


    Then I add one "User IO Boolean" widget to the wiser interface.

    I transfer the project to the wiser and wait until it reboots.

    I can access the wiser screen and see the widget but I don?t get the expected behavior.
    The effect I expect is that if I press on the widget, it will turn "On" for 1 second and then turns off again. This is the effect I obtain in the spice work space. I have a made a number of other tests and everytime it looks like the logic engine is not running or is perhaps stopping.

    What am I missing?
     
    CABrouwes, Sep 1, 2011
    #1
  2. CABrouwes

    CABrouwes

    Joined:
    Apr 25, 2009
    Messages:
    86
    Likes Received:
    2
    Location:
    New York Area
    Update

    Update:

    I was able to get the interface to work as expected but it is very confusing to me how it worked.

    1. I transfer the program to the wiser
    2. Wait for the wiser to restart.
    3. Close down PICED and C-Gate
    4. Restart PICED and C-GAte
    5. Wait , wait, ? and wait

    After 5+ minutes everything seems to be working as expected. I can close PICED and C-gate and the wiser keeps working. I am not even sure closing and re-opening them have anything to do with the outcome.

    Also, noticed the time displayed by the wiser also comes back to the same after I reload a the page in IE. Sometimes it is 1/1/2008 12:00 pm or a time around when I loaded the program.

    Does the wiser need the network clock to start ticking ? Is the network close also necessary to the logic engine but perhaps after a while a fall back mechanism starts

    Can someone help me makes sense of this ?
     
    CABrouwes, Sep 1, 2011
    #2
  3. CABrouwes

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    PICED and C-Gate should have no effect on Wiser.

    The time is stored in the Wiser's CNI which is powered by C-Bus. If you have no C-Bus connection, the Wiser will not remember the time.
     
    Darren, Sep 2, 2011
    #3
  4. CABrouwes

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,427
    Likes Received:
    64
    Location:
    Adelaide
    From memory, the Wiser doesn't run schedules or logic until it has a valid time.

    If it has an internet connection, it should have a time from an NTP server, however it may be that if the firmware can't connect to the C-Bus side of the CNI (because it's not powered) in order to set the time on C-Bus, then it may not recognise the time as being valid yet, preventing logic from running.

    This sounds like it may be the cause of your logic not functioning as expected.

    Nick
     
    NickD, Sep 2, 2011
    #4
  5. CABrouwes

    CABrouwes

    Joined:
    Apr 25, 2009
    Messages:
    86
    Likes Received:
    2
    Location:
    New York Area
    Thanks for your replies. If I put everything together, this is what I think happens: In absence of c-bus power the logic engine waits for a certain amount of time before starting. Then when it starts it updates the CNI time to a value based on an NTP server.

    This is consistent with the fact that the time shown by the router part of the wiser is correct from the beginning as it probably pools an NTP server at start up.

    In any case, it makes sense that the wiser be programmed in such a way. The initialization routines are most likely to need to information from the c-bus network sothe logic engine should wait for the c-bus network to kick in. After a while it also makes sense to let it start anyway as it might be programmed to do other tasks not requiring the C-bus network.

    This leads me to another question about the best way to test wiser logic as in any case it does not seem very practical to test the logic on the real installation. I will post that question separatly.

    Btw, I was surprised not to see any ntp setting on the wiser. It seems the choice of server is hard coded. It is uncommon.

    Thanks for your help.
     
    CABrouwes, Sep 2, 2011
    #5
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.