Piced Logic with ignore

Discussion in 'C-Touch/HomeGate/SchedulePlus/PICED Software' started by Ray, Aug 19, 2005.

  1. Ray

    Ray

    Joined:
    Aug 3, 2004
    Messages:
    6
    Likes Received:
    0
    Can any one make some suggestions for me.
    While writing some logic I have come accross the need for IGNORE commands such as we used to use with minder. Eg : If bla bla is on Ignore for 5min then do bla bla.
    I havent figured out how to do this and if we can do this with piced?
     
    Ray, Aug 19, 2005
    #1
  2. Ray

    Richo

    Joined:
    Jul 26, 2004
    Messages:
    1,257
    Likes Received:
    0
    Location:
    Adelaide
    I'm not familiar with the product you mention. What do you mean by ignore? What is being ignored? Could you describe the behaviour.
     
    Richo, Aug 19, 2005
    #2
  3. Ray

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    It's basically a delay.

    For example

    "if light is on ignore for 5 min then turn light off"

    Means if the light is on wait 5 minutes and if it is still on then turn it off.

    The other delay is

    "if light is on delay for 5 min then turn light off"

    Which means if the light goes on then wait 5 minutes and turn the light off regardless of what else has happened to the light in the mean time.
     
    rhamer, Aug 19, 2005
    #3
  4. Ray

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    This can be implemented by using a delay then another test of the condition. For example :

    Code:
    once GetLightingState("Office 1") = OFF then
    begin
      Delay(20);
      if GetLightingState("Office 1") = OFF then
        SetLightingState("Corridor", OFF);
    end;
    Another way is to use a timer as follows :

    Code:
    once (GetLightingState("Office 1") = OFF) then
    begin
      TimerStart(1);
    end;
    
    once not (GetLightingState("Office 1") = OFF) then
    begin
      TimerStop(1);
    end;
    
    once TimerTime(1) = "0:00:20" then
    begin
      SetLightingState("Corridor", OFF);
      TimerStop(1);
    end;
    This second method can be added to a module quickly by doing a right click and selecting Structures | Stay True Timer.

    Eventually there will be a simpler method of doing this.
     
    Darren, Aug 19, 2005
    #4
  5. Ray

    Dave Byron

    Joined:
    Aug 3, 2004
    Messages:
    835
    Likes Received:
    0
    Location:
    Casurina
    Darren
    can you put the above into the logic section as i am sure it will asked many times


    dave
     
    Dave Byron, Aug 19, 2005
    #5
  6. Ray

    Phil.H

    Joined:
    Jul 29, 2004
    Messages:
    466
    Likes Received:
    0
    Location:
    Sydney
    Hmmm

    Dave good question.
    What do you think Darren ;)
     
    Phil.H, Aug 20, 2005
    #6
  7. Ray

    Phil.H

    Joined:
    Jul 29, 2004
    Messages:
    466
    Likes Received:
    0
    Location:
    Sydney
    once not ????

    In the early days maybe the inverse of the original condition might be easier to understand.
    {once (GetLightingState("Office 1") = ON) then}
     
    Phil.H, Aug 20, 2005
    #7
  8. Ray

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    Darren, Aug 22, 2005
    #8
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.