Run Logic in PICED

Discussion in 'C-Touch/HomeGate/SchedulePlus/PICED Software' started by leonardodonny, Dec 13, 2012.

  1. leonardodonny

    leonardodonny

    Joined:
    Nov 29, 2012
    Messages:
    20
    Likes Received:
    0
    Location:
    Jakarta, Indonesia
    I have made a simple logic in PICED, and i have compile it with no error.
    I want to execute the logic and i assume i have to click this button.

    [​IMG]

    But i've got a problem. The connection to C-BUS took so long and still in waiting mode.

    [​IMG]

    Is this usual? or are there any other way to objectify my logic??

    Looking froward for the answer. :D

    [​IMG]
     
    leonardodonny, Dec 13, 2012
    #1
  2. leonardodonny

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,548
    Likes Received:
    178
    Location:
    Adelaide, Australia
    You need manually connect PICED to C-Bus using menu OPTIONS/CONNECT TO C-BUS. It doesn't do it automatically when you start PICED (or open a project).
     
    Ashley, Dec 13, 2012
    #2
  3. leonardodonny

    leonardodonny

    Joined:
    Nov 29, 2012
    Messages:
    20
    Likes Received:
    0
    Location:
    Jakarta, Indonesia
    Hi Ashley, thank you for your answer. You are right, I've try it and it connect to C-BUS. :D

    Well, the program still won't work. i've made the modules and there are no error when i compile it.
    Though i've read the help tutorial i still confuse, should i code all in the advance folder too?

    [​IMG]

    looking forward for the answer. :D

    [​IMG]
     
    Last edited by a moderator: Dec 14, 2012
    leonardodonny, Dec 14, 2012
    #3
  4. leonardodonny

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,548
    Likes Received:
    178
    Location:
    Adelaide, Australia
    You need to tell us what you are trying to acheive and then post the code you have written. We will be able to help you out then.
     
    Ashley, Dec 14, 2012
    #4
  5. leonardodonny

    leonardodonny

    Joined:
    Nov 29, 2012
    Messages:
    20
    Likes Received:
    0
    Location:
    Jakarta, Indonesia
    Hi Ashley, thank you for your response.
    well, i just want to try my simple code project.
    I thought it would be run just fine.

    Here are the detail:
    [​IMG]

    [​IMG]

    The code in module ba:
    if
    (GetCBusState("relay1", "Lighting", "BB") = ON) and
    (GetCBusState("relay1", "Lighting", "CC") = ON) then
    begin
    SetCBusState("relay1", "Lighting", "AA", ON);
    end;


    The code in module lls:
    if (GetCBusState("relay1", "Lighting", "CC") = ON) then
    begin
    SetCBusState("relay1", "Lighting", "DD", ON);
    SetCBusState("relay2", "Lighting", "EE", ON);
    SetCBusState("relay2", "Lighting", "FF", ON);
    end;


    As you see the code above, i want to turn all the light ON by just turning The "BB" and "CC". Are there any mistake or missing?

    Looking forward for the answer. :D
    [​IMG]
     
    Last edited by a moderator: Dec 14, 2012
    leonardodonny, Dec 14, 2012
    #5
  6. leonardodonny

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,548
    Likes Received:
    178
    Location:
    Adelaide, Australia
    The first thing you need to do is look up the difference between IF and ONCE in the documentation. When the IF statement becomes True it will execute the SetCBusState command every scan (i.e. 200mS) which will flood the network and the Wiser will disable your logic. Replace the IF's with ONCE

    You also appear to have 2 CBus networks called Relay1 and Relay2. Is this really true, and if so how are they connected? What do you understand by a CBus network? Perhaps you could provide a screen shot of your tookit scan.

    I think the problem lies more in your network configuration than your logic.

    Do the individual widgets work as expected?
     
    Ashley, Dec 14, 2012
    #6
  7. leonardodonny

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    To run the logic, just click on the play button (triangle).

    If you are wanting the logic to control C-Bus, you will need to connect to C-Bus first.

    The option you have selected will stop logic from running until C-Bus is connected.
     
    Darren, Dec 15, 2012
    #7
  8. leonardodonny

    leonardodonny

    Joined:
    Nov 29, 2012
    Messages:
    20
    Likes Received:
    0
    Location:
    Jakarta, Indonesia
    Hi Ashley and Darren, thank you for the response.
    Sorry for the delay.

    Yes Ashley, i've just realize that. i've change the IF into ONCE.
    Yes, i do have two network. I know little about networking, but the lightning project in wiser widget work just fine.
    Let's assume i'm wrong in networking, at least the module 'ba', should work right?

    Yes Darren, i've tried to run the project without the C-BUS connection.
    But the logic still won't work.

    Btw, i don't use Colour C-Touch, PAC, and Black & White C-Touch Mark II for the project. I only use Wiser, C-BUS, and 5753L PIR Occupancy Sensor - indoor for the lightning.
    Well, i've trying to run this simple logic for days. I'm still looking forward for the solution. :D

    [​IMG]
     
    Last edited by a moderator: Dec 17, 2012
    leonardodonny, Dec 17, 2012
    #8
  9. leonardodonny

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    The logic will not run without the C-Bus connection if you have the Wait until C-Bus is on-line to start logic option selected.

    My point was that you should switch this option off.
     
    Darren, Dec 19, 2012
    #9
  10. leonardodonny

    leonardodonny

    Joined:
    Nov 29, 2012
    Messages:
    20
    Likes Received:
    0
    Location:
    Jakarta, Indonesia
    Hi Darren, thank you for your response.

    I'm sorry, i haven't share my recent information.
    Well, I has solved the problem.
    I realize that i have to transfer every project update that i have make to the Wiser Home Controller.
    When I transfer it the logic run as i expected.

    Thanks all for your help. :D

    [​IMG]
     
    leonardodonny, Dec 19, 2012
    #10
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.