Piced Logic - Global Variable Flags

Discussion in 'C-Touch/HomeGate/SchedulePlus/PICED Software' started by leeandj, Nov 1, 2006.

  1. leeandj

    leeandj

    Joined:
    Apr 13, 2006
    Messages:
    39
    Likes Received:
    0
    Location:
    Park City, UT
    Hi,

    I am successfully using DLT buttons to control blinds - one press sends the blind up, the next press stops the blind and the next press sends the blind down. My logic is based on this...
    http://www.cbusforums.com/forums/showthread.php?t=2283

    and uses global variables as flags to 'remember' whether the blind is up or down.

    My problem is that whenever the ctc restarts (or there is a power cut), the variables are reset. This results in some of the flags holding the incorrect state for the blinds. This can be rectified by pressing the button a couple of times to get the blind back in-synch with the variable, but its a nuisance for the client ...

    Is there a way to prevent these variables being reset - ie always remembering their value during a restart?

    Thanks,
    LeeBS
     
    leeandj, Nov 1, 2006
    #1
  2. leeandj

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    There are two possible solutions :
    1. Use System IO Variables - the values of these is restored after a power failure. See the "System IO Functions" topic in the logic help file.
    2. Write the values to a file - this is a lot more work.
     
    Darren, Nov 6, 2006
    #2
  3. leeandj

    leeandj

    Joined:
    Apr 13, 2006
    Messages:
    39
    Likes Received:
    0
    Location:
    Park City, UT
    Thanks Darren.

    Used System I/O variables and it works like a charm!

    Lee.
     
    leeandj, Nov 6, 2006
    #3
  4. leeandj

    JasonCox

    Joined:
    Aug 17, 2004
    Messages:
    75
    Likes Received:
    0
    Another option would be to use group addresses and use the load monitor to save the flags (group addresses). This is very usefull on multi-screen jobs as both screens automatically update each other.:)
     
    JasonCox, Nov 9, 2006
    #4
  5. leeandj

    Charlie Crackle

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

    Can you please elaborate..
     
    Charlie Crackle, Nov 9, 2006
    #5
  6. leeandj

    JasonCox

    Joined:
    Aug 17, 2004
    Messages:
    75
    Likes Received:
    0
    The Load Monitor lets you choose group address from different applications - used by the touch screen and save their level every 5 minutes to the internal drive.

    When the touchscreen re-starts, the levels are already known - just like system IO variables, only system IO cannot be shared between c-bus devices unless they are converted to C-Bus group levels first and then de-coded on the other end.

    So as you could imagine, it is far easier to share group levels than system IO. But if you don't need to share that information accross the network then it doesn't matter!;)
     
    JasonCox, Nov 10, 2006
    #6
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.