Dymanic DLT label modification

Discussion in 'C-Gate Developers' started by ievolve, Jan 29, 2012.

  1. ievolve

    ievolve

    Joined:
    Mar 20, 2010
    Messages:
    112
    Likes Received:
    1
    Location:
    Idaho
    Been messing around with my DLT and using a button to send commands to my sonos audio system ()

    I would like to display on the DLT the track name.

    Right now, in cbus toolkit, I made the button an on/off toggle and gave it a group (group 94 actually) called "music", when I assigned it this group, it label was set to "music". Good enough.

    Now, I am trying to modify that label using cgate. The docs seem to imply that something like this should work:
    lighting label //WEBB/254/56 94 2 - text helloworld

    I get a 200ok back from that command, however the DLT text does not change.
    (I will note that c-gate sends a "status" message to me that looks like: lighting label //WEBB/254/56 94 2 - F0 0 68656C6C6F #sourceunit=1 OID=8dca58f0-2c5d-102f-bc8a-886e220fedb0 sessionId=cmd35 commandId={none})

    Any idea what I am doing wrong?
     
    Last edited by a moderator: Jan 29, 2012
    ievolve, Jan 29, 2012
    #1
    1. Advertisements

  2. ievolve

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    The C-Gate command to label group 94, Variant 0 (referred to as Variant 1 in Toolkit) in English with the text "Hello World" is:

    lighting label //PROJECT/254/56 1 94 - 0 48656C6C6F20576F726C64

    The string of characters at the end is the Hexadecimal ASCII text for "Hello World".

    For reference, the Pascal logic to do this is:

    Code:
    SetStringIBSystemIO("Label Group Text", 254, 56, 94, Variant1, 'Hello World');
    
     
    Darren, Jan 29, 2012
    #2
    1. Advertisements

  3. ievolve

    ievolve

    Joined:
    Mar 20, 2010
    Messages:
    112
    Likes Received:
    1
    Location:
    Idaho
    Thanks Darren! Your example worked like a charm.

    I will also note here that if you dont want to convert stuff over to HEX, you can also just use something like:
    lighting label //WEBB/254/56 1 94 - text hello

    Which will print "hello" on the button. Any disadvantage to doing it in this manner?

    Thanks.
     
    ievolve, Jan 30, 2012
    #3
  4. ievolve

    Andy@Mandoon

    Joined:
    Dec 13, 2004
    Messages:
    34
    Likes Received:
    0
    This seems like a great way to communicate the status of other systems.

    Is there any implications with continuously writing to the non-volatile storage of the DLT's? ie. Can I change the labels every hour without concerns for the longevity of the DLT?
     
    Andy@Mandoon, Feb 8, 2012
    #4
  5. ievolve

    ievolve

    Joined:
    Mar 20, 2010
    Messages:
    112
    Likes Received:
    1
    Location:
    Idaho
    @andy, I'd like to know this as well, for instance if I update the outside temperature on a dlt label every 5 minutes or so is that bad?
     
    ievolve, Feb 12, 2012
    #5
  6. ievolve

    Newman

    Joined:
    Aug 3, 2004
    Messages:
    2,203
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    The labels on DLTs are stored in non-volatile memory. That memory has a stated minimum lifetime of 100,000 writes. If you are changing the DLT label hourly this will cause the memory to wear out in 11.4 years. If you are changing the label every 5 minutes this will wear out the memory in 347 days, so this is definitely a bad idea.
     
    Newman, Feb 12, 2012
    #6
  7. ievolve

    fleetz

    Joined:
    Nov 21, 2005
    Messages:
    358
    Likes Received:
    6
    If you have 2.1 version DLT's they are about to spontaneously combust....their flash is only rated around 10,000 write cycles. As Newman pointed out not smart using DLT's for a lot of dynamically changing labels.
     
    fleetz, Feb 12, 2012
    #7
  8. ievolve

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,346
    Likes Received:
    3
    Location:
    Adelaide, South Australia
    When DLT was designed it was expected that DLT labels would be updated on average 10 - 20 times per day. This was the design criteria for a worst case.

    Rationale:
    It was assumed that in normal use, labels would either change very infrequently, or change perhaps a few times a day - due perhaps to things like arm/disarm of a security system, or a dynamic update to a fan speed setting label, or perhaps to a change of label depending on time of day.

    "A few" in that context means about 3 to 5 (roughly), so an allowance of 10 - 20 is a pretty generous step up from that.

    Doing 20 updates / day, thats 7,300 updates / year.

    Using a non-volatile memory good for 100,000 cycles means at that rate you have a service life of about 13 years, and thats probably good enough.

    (It's also fair to assume that the worst case of 20 updates / day is not going to happen every day... if it happened say 5 days out of 7, and the other 2 days were lower... well... you work it out.)

    --------

    I don't know where the version 2.1 / 10,000 cycles came from. As far as I know this does not apply for DLT. They use a flash EEPROM that should do 100K cycles, as pointed out by Newman above.

    --------

    Is this all a disaster waiting to happen? Don't know. Don't think so. The 100K cycles quoted by device manufacturers is normally* their guaranteed minimum cycle lifetime. That means they should do more, and the way statistical device lifetimes are worked out for semiconductor devices, I'd expect a mean lifetime of > 150K cycles, and probably closer to 200K cycles. Of course, this is a mean, not a guaranteed minimum.

    But what that does mean is that for the case of 20 updates / day, I'd reasonably expect most devices, most of the time, installed in average dwellings, to have an installed lifetime of 15 to 20 years. By then you probably care more about pulling it out and replacing it with modern whiz-bangery rather than have it still working. (But if it only lasted 10 years you'd be fairly pissed off.)
     
    Last edited by a moderator: Feb 12, 2012
    ashleigh, Feb 12, 2012
    #8
  9. ievolve

    Don

    Joined:
    Aug 4, 2004
    Messages:
    429
    Likes Received:
    0
    Location:
    Townsville, Australia
    The 10,000 cycles probably came from the earliest C-Bus microcontroller. Back then, we were limited to a small memory array rated at 10,000 erase - write cycles. Not a problem for storing static parameters like group addresses, etc., and saving levels for power recovery was handled in various ways to ensure a product life of at least 20 years under the most demanding conditions.
    This early microcontroller was used in DLT at one stage, but DLT labels were never stored in the 10,000 cycle memory. The labels were in fact managed by a second microcontroller and stored in a different memory.
     
    Don, Feb 12, 2012
    #9
  10. ievolve

    fleetz

    Joined:
    Nov 21, 2005
    Messages:
    358
    Likes Received:
    6
    Hi Ashleigh,

    10,000 was what I was told the 2.1 version DLT write cycles were rated at. 100,000 when 3.0 was released.

    Now have 10 out of 23 2.1 DLT failed here, stop working and won't hold their programming (and hour, a day a week, a month and they fail again). Started failing over 2 years ago when they were only 15 months in service and they just keep dropping off the perch. Suspected is the write cycles exhausted but not yet confirmed.

    Clispal system expert spent half a day going a complete system check here and it passed 100%. There is nothing erroneous on log either after a few days of monitoring.

    So the 10,000 cycles I referred to came from Clipsal only reporting back what I was told.

    Regards,

    Fleetz
     
    fleetz, Feb 13, 2012
    #10
    1. Advertisements

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.