Interpretting ErrorFlags

Discussion in 'C-Bus Toolkit and C-Gate Software' started by more-solutions, May 15, 2012.

  1. more-solutions

    more-solutions

    Joined:
    Apr 23, 2006
    Messages:
    283
    Likes Received:
    4
    Location:
    Peterborough, UK
    Eg:
    Code:
    GET 19/P/50 ErrorFlags
    300 //project/19/p/50: ErrorFlags=13
    Is the return value of ErrorFlags documented? The docs I have just say it's the "Unit Error Flags" which doesn't tell me much...
     
    more-solutions, May 15, 2012
    #1
  2. more-solutions

    Don

    Joined:
    Aug 4, 2004
    Messages:
    429
    Likes Received:
    0
    Location:
    Townsville, Australia
    The error flags are low-level diagnostics which were used in the initial stages
    of development of C-Bus products.

    The error flags reside in a single byte.
    The meanings of each bit and the number of bytes of flags may vary in future, and as this is not an officially documented feature, please don't expect to be able to count on this feature to always work as described below.
    Having said that, all wired C-Bus units share most of the following bit assignments:

    Bit 0: Power-on reset has occurred since flags were last reset
    Bit 1: Stack overflow
    Bit 2: Communication transmit error from this unit
    Bit 3: Power-up or watchdog reset has occurred since flags were last reset
    Bit 4: reserved
    Bit 5: EEPROM checksum error (only on early units)
    Bit 6: EEPROM parameter write error has been detected
    Bit 7: reserved

    I've never seen stack overflow occur. It would probably indicate a severe electrical transient causing corruption of the stack pointer but in such a way as to not induce a watchdog reset (Buckley's chance of that!).
    Watchdog reset is useful if you expect problems in electrically noisy environments or if the unit's power supply is marginal.
    EEPROM parameter write error may be useful near a product's end-of-life (over 100,000 parameter changes.. how long would that take using Toolkit?)
    Communication transmit error will often show up on busy networks and is not an idicator of a faulty unit (You could use this flag to optimise a network, but the C-Bus diagnostic program is much easier to use by far!).
     
    Don, May 16, 2012
    #2
  3. more-solutions

    more-solutions

    Joined:
    Apr 23, 2006
    Messages:
    283
    Likes Received:
    4
    Location:
    Peterborough, UK
    Thanks for that info, it's just what I needed. (And sorry for the slow reply to say thanks!)

    What's the difference between bits 0 and 3 ("Power-on" vs "Power-up")? For that matter, what do either of these really mean in practice (since these are the ones I'm getting). They sound like the sort of thing I can ignore, although if (as I assume they are) they're an indication that someone has removed power from them I might be inclined to log and reset the errors when I see it (we already log manual overrides).
     
    more-solutions, May 25, 2012
    #3
  4. more-solutions

    Don

    Joined:
    Aug 4, 2004
    Messages:
    429
    Likes Received:
    0
    Location:
    Townsville, Australia
    Bit 0 is only ever set at power-up
    Bit 3 is set if the unit was powered and received an event that caused a reset (either a very strong electrical transient or very low network voltage).
     
    Don, May 26, 2012
    #4
  5. more-solutions

    more-solutions

    Joined:
    Apr 23, 2006
    Messages:
    283
    Likes Received:
    4
    Location:
    Peterborough, UK
    Looking on site now, I have (for example) ErrorFlags = 13, Network Voltage = 27.7v.

    Based on your info, bits 2&3 would relate to the network voltage.

    I'm looking to add code to read/log the error flags and reset them, is there any reason why this would be a bad idea? I'll log the network voltage as well.

    What would be a good alarm level to set for network voltage? Ideally warning and critical voltage levels would be really helpful.
     
    more-solutions, May 29, 2012
    #5
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.