LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying text descriptions of decoded bits

I'm repeatedly reading a 32 bit status word. This word will, normally, have two or three bits at a time set to one, the rest are zero. Each bit has a meaning (text description). I want to display the text descriptions of the set bits in an indicator.

Question is, what kind of indicator, particularly to handle the worst case of all bits being one? I thought of using a table, or a fixed size list box of all strings with those equating to a set bit selected (highlighted), or maybe even a tree indicator who's nodes waxes and wanes depending on the number of bits that are set. Or an array of 32 booleans with the string descriptions next to them, but all of these incur a cost from a real estate perspective.

I thought I would pick some brains and see what ideas you might have putting yourself in the place of the user (my users don't care). What would you like to see for a quick indication of status bit meanings? What about just displaying the 32 bits as a hex value and maybe having a pop up when hovering the mouse over it that shows the text descriptions for each bit set? That's something I've never tried, might be fun.

Thanks,
Bill
0 Kudos
Message 1 of 6
(3,111 Views)

Hi Bill,
      I'm not sure whether this can possibly fit your GUI, but...

I like this way of identifying character-positions in a log-file message-header, and it seems it might work well to identify the set-bits in a binary (ones and zeros) srting.

Script?
|Port#
||Year
||| Month
||| | Day
||| | |  Direction - ">" to DUT, "<" from DUT
||| | |  |
||| | |  |
||| | |  | Message body
||| | |  | |
10YYMMDD > Send Mode Command
01YYMMDD > Send Mode Command
01YYMMDD < Receive Mode Acknowledge

Would it work build a custom "map" for each pattern?

        This little piggy went to market
        |      This little piggy stayed home
        |      |This little piggy was in a quantum state
        |      ||
0000000010000001100000

Cheers!

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
Message 2 of 6
(3,106 Views)
Actually, I hadn't thought of that method....dynamically making visible and setting the position of the descriptions for the set bits. For example:

                         End of Message
           |
00000000000100000000000000000000

          
End of Message
           |      No Response
           |      |
00000000000100000010000000000000

Thanks!
0 Kudos
Message 3 of 6
(3,104 Views)

Your welcome!


@Bill@NGC wrote:
....dynamically making visible and setting the position of the descriptions for the set bits..

Exactly - yet finding a "slick" way to build the "tick" paths might make a good (mini) mini-challenge.

Honestly, it was only recently I noticed this format - in a log-file on a DOS test-station! Smiley Surprised Smiley Very Happy

Cheers!

 

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 4 of 6
(3,089 Views)
This still takes up quite a bit of real estate.  Include your minimum indicator line and 1st level pointing line, you could need 34 lines to display all bits at once.  You'll need to figure out realistically how many lines you'll need to devote on screen for it.  I guess you could use the mouse over event to hide and display the description so you could use the screen for other uses.

I used the following approach on a current project.  Depending on whether or not you can abbreviate you bit names (EOM, NR), you wouldn't take up a lot of space.  I happen to be using System booleans, but you can probably make it smaller than what I have.




Message Edited by Matthew Kelton on 09-23-2007 02:15 AM

Message 5 of 6
(3,085 Views)
Hey Matthew,
      When I first your .png it seemed to ignore Bill's goal to label only the bits that were set, of course one could easily make each label (or caption) visible or not - depending on bit setting - and the worst-case "footprint" of this format as very compact!.
 
Cheers.

Message Edited by tbd on 09-25-2007 01:45 AM

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 6 of 6
(3,039 Views)