logic not responding

Discussion in 'C-Touch/HomeGate/SchedulePlus/PICED Software' started by ven, May 13, 2010.

  1. ven

    ven

    Joined:
    Mar 26, 2010
    Messages:
    35
    Likes Received:
    0
    Location:
    Cape Town
    Hi all,

    Let me start withe a brief history, I have a rather large project, 254 used lighting groups and 94 units in total. 4 of witch is colour touch screens. +- 15 pages and one in particalar displays analog cameras that goes through an IP server. (ps: The prevois help here on the speed issue with the camera was highly aprriciated and your suggestions worked).

    Now wat happens is that I use a relay to trigger 6 alarm inputs on the dvr. The dvr works as such that as long as the dry contack is closed it displays a certan camera, when all are open it defalts back to the matrix view. what i need to achive is to switch of a channel, (say camera 1) delay for 1 seconds and switch on a diffrent channel (say camera 2). i orginaly done a scene putting all chanells off and desired channel on. What hapeend is that for a split second two channels or on witch causes the dispaly to flip between the 2 cams.

    My sulotion was logic, firstly setsecene "all cames off" then delay(1) then setlightingstate("desired camera" ON).

    Nothing happend. so I tested with a simple logic of
    if getlightingstate(group1) is on then setlightingstate(group2) to on.

    I then made 2 buttons group1 and group2 with activation display.
    Then trigerd group1 but group2 remains on holiday.

    Tried the same code on a diffrent project and worked fine.

    Can it be that the project is to big or not enough memory?
    there is other logic but only 2 modules of 4 lines, nothing serouis.

    so after my entire book above please help???
     
    ven, May 13, 2010
    #1
  2. ven

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    You have provided a lot of information, but it is a bit hard to know what is going on.

    Can you post the full code and a description of what it is doing compared with what you want it to do?
     
    Darren, May 13, 2010
    #2
  3. ven

    ven

    Joined:
    Mar 26, 2010
    Messages:
    35
    Likes Received:
    0
    Location:
    Cape Town
    Hello Darren.

    What it comes down to is that need to figure out a way for the logic to work witch isn't right now, (Maby add a pac?) and would like to know why the logic is not playing along.
    Currently any logic as explained is futile.

    Or maby a diffrent way for the switching to be done(Keep in mind i need a 1sec delay)
     
    ven, May 13, 2010
    #3
  4. ven

    Shepard

    Joined:
    Jan 19, 2005
    Messages:
    23
    Likes Received:
    0
    Location:
    Sydney
    From my simple brain................

    TimerStart (1)
    once TimerTime (1) = 1 then
    begin setlightingstate("desired camera", 255);
    end;
    once TimerTime (1) = 10 then
    begin setlightingstate("desired camera", 0);
    end;
    once TimerTime (1) = 11 then
    begin setlightingstate("desired camera", 255);
    end;
    once TimerTime (1) = 20 then
    begin setlightingstate("desired camera", 0);
    end;
    .........

    once TimerTime(1) = 1sec more than display of last camera then
    begin
    TimerStart (1);
    end;

    Try it see if it works..
    I could be wrong..
    But the fun is in the experimenting :D
     
    Shepard, May 13, 2010
    #4
  5. ven

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    We understand that you are trying to work out why the logic is not working. Without being able to know exactly what you have done, what you are trying to do and what is happening, it is impossible to provide any specific advice.

    I would think that putting the following code into a separate module which can be enabled and disabled should do what you want:

    Code:
    SetLightingState("Camera 1", On);
    Delay(10);
    SetLightingState("Camera 1", Off);
    Delay(1);
    SetLightingState("Camera 2", On);
    Delay(10);
    SetLightingState("Camera 2", Off);
    Delay(1);
    SetLightingState("Camera 3", On);
    Delay(10);
    SetLightingState("Camera 3", Off);
    Delay(1);
    {etc}
     
    Darren, May 14, 2010
    #5
  6. ven

    ven

    Joined:
    Mar 26, 2010
    Messages:
    35
    Likes Received:
    0
    Location:
    Cape Town
    Hi guys,

    Intresting codes, will give them a bash- but the problem is that any logic that I add doesn't work doesn't matter what the the code is.

    Keeping in mind that the logic that was prevoisly put on runs fine, just anything new does't do anything.
     
    ven, May 14, 2010
    #6
  7. ven

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    I hadn't picked up that point from your previous information. If all additional code fails to work, it is possible that the logic engine is resetting. The log file should show if this is happening.
     
    Darren, May 14, 2010
    #7
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.